2013/7/25 Peter Stuge <peter@stuge.se>
Ivan Kluchnikov wrote:
> This is new version of patch for review and merge:
>
> - more user-friendly interface for command:
>     rach access-control-class 2 barred
>     rach access-control-class 11 allowed

Yes, much better than before, but perhaps spend the half hour it
takes to write that %d-%d parser using sscanf?

You are welcome :)
If you implement %d-%d parser, I will change style of this VTY command.



> +++ b/openbsc/src/libbsc/bsc_vty.c
..
> @@ -2059,6 +2067,51 @@ DEFUN(cfg_bts_rach_ec_allowed, cfg_bts_rach_ec_allowed_cmd,
>       return CMD_SUCCESS;
>  }
>
> +DEFUN(cfg_bts_rach_ac_class, cfg_bts_rach_ac_class_cmd,
> +      "rach access-control-class (0|1|2|3|4|5|6|7|8|9|11|12|13|14|15) (barred|allowed)",
> +      RACH_STR
> +      "Set access control class\n"
> +      "Access control class 0\n"
> +      "Access control class 1\n"
> +      "Access control class 2\n"
> +      "Access control class 3\n"
> +      "Access control class 4\n"
> +      "Access control class 5\n"
> +      "Access control class 6\n"
> +      "Access control class 7\n"
> +      "Access control class 8\n"
> +      "Access control class 9\n"
> +      "Access control class 11 for PLMN use\n"
> +      "Access control class 12 for security services\n"
> +      "Access control class 13 for public utilities (e.g. water/gas suppliers)\n"
> +      "Access control class 14 for emergency services\n"
> +      "Access control class 15 for PLMN staff\n"
> +      "barred to use access control class\n"
> +      "allowed to use access control class\n")
> +{

Is that long array of strings correct?

I think, yes, because it works.
Do you know other way to do it?
 


//Peter




--
Regards,
Ivan Kluchnikov.
http://fairwaves.ru