This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/20976 ) Change subject: vty: auto-generate cmd and doc strings for cfg_filler_type_cmd ...................................................................... vty: auto-generate cmd and doc strings for cfg_filler_type_cmd Change-Id: I7fb228c63f3246f443ece67106abba0432b1659e --- M CommonLibs/trx_vty.c 1 file changed, 21 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/76/20976/1 diff --git a/CommonLibs/trx_vty.c b/CommonLibs/trx_vty.c index 507d7b3..e672928 100644 --- a/CommonLibs/trx_vty.c +++ b/CommonLibs/trx_vty.c @@ -67,6 +67,15 @@ { 0, NULL } }; +static const struct value_string filler_docs[] = { + { FILLER_ZERO, "Send an empty burst (default)" }, + { FILLER_DUMMY, "Send a Dummy Burst on C0 (TRX0) and empty burst on other channels" }, + { FILLER_NORM_RAND, "Send a GMSK modulated Normal Burst with random bits (spectrum mask testing)" }, + { FILLER_EDGE_RAND, "Send an 8-PSK modulated Normal Burst with random bits (spectrum mask testing)" }, + { FILLER_ACCESS_RAND, "Send an Access Burst with random bits (Rx/Tx alignment testing)" }, + { 0, NULL } +}; + struct trx_ctx *trx_from_vty(struct vty *v) { @@ -330,19 +339,11 @@ return CMD_SUCCESS; } -DEFUN(cfg_filler, cfg_filler_type_cmd, - "filler type (zero|dummy|random-nb-gmsk|random-nb-8psk|random-ab)", +#define CFG_FILLER_DOC_STR \ "Filler burst settings\n" - "Filler burst type (default=zero)\n" - "Send an empty burst when there is nothing to send (default)\n" - "Send a dummy burst when there is nothing to send on C0 (TRX0) and empty burst on other channels.\n" - "Send a GMSK modulated Normal Burst with random bits when there is nothing to send." - " Use for spectrum mask testing. Configure 'filler tsc' to set training sequence.\n" - "Send an 8-PSK modulated Normal Burst with random bits when there is nothing to send." - " Use for spectrum mask testing. Configure 'filler tsc' to set training sequence.\n" - "Send an Access Burst with random bits when there is nothing to send. Use for Rx/Tx alignment." - " Configure 'filler access-burst-delay' to introduce artificial delay.\n" -) + +DEFUN(cfg_filler, cfg_filler_type_cmd, + "AUTO-GENERATED", "AUTO-GENERATED") { struct trx_ctx *trx = trx_from_vty(vty); // trx->cfg.filler is unsigned, so we need an interim int var to detect errors @@ -359,7 +360,7 @@ DEFUN(cfg_test_rtsc, cfg_filler_tsc_cmd, "filler tsc <0-7>", - "Filler burst settings\n" + CFG_FILLER_DOC_STR "Set the TSC for GMSK/8-PSK Normal Burst random fillers. Used only with 'random-nb-gmsk' and" " 'random-nb-8psk' filler types. (default=0)\n" "TSC\n") @@ -373,7 +374,7 @@ DEFUN(cfg_test_rach_delay, cfg_filler_rach_delay_cmd, "filler access-burst-delay <0-68>", - "Filler burst settings\n" + CFG_FILLER_DOC_STR "Set the delay for Access Burst random fillers. Used only with 'random-ab' filler type. (default=0)\n" "RACH delay in symbols\n") { @@ -736,6 +737,12 @@ int trx_vty_init(struct trx_ctx* trx) { + cfg_filler_type_cmd.string = vty_cmd_string_from_valstr(trx, filler_types, + "filler type (", "|", ")", 0); + cfg_filler_type_cmd.doc = vty_cmd_string_from_valstr(trx, filler_docs, + CFG_FILLER_DOC_STR "What to do when there is nothing to send " + "(filler type, default=zero)\n", "\n", "", 0); + g_trx_ctx = trx; install_element_ve(&show_trx_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/20976 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I7fb228c63f3246f443ece67106abba0432b1659e Gerrit-Change-Number: 20976 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201029/a3c3c748/attachment.htm>