From 0c9bc5422a267e51381bbc715b826f2681390e38 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Tue, 17 Oct 2017 12:35:48 +0200 Subject: osmo-bts-trx: vty: various fixes of 'write file' and doc On 'write file': - Write 'osmotrx' before 'maxdly' and 'maxdlynb' (broken since "Introduce new phy_link and phy_instance abstraction" d784e50747b8cf0ce505489e1451f75be5ccbd4b) - Fix indenting of 'write file' output, command 'osmotrx timing-advance-loop', had a stray space in case there is not a 'no' preceding it. Add some missing instances of OSMOTRX_STR doc strings. examples/osmo-bts.cfg: - Drop 'settsc', the command no longer exists. - Fix indenting of 'osmotrx rx-gain' command. osmo-bts does not feature VTY tests, so it is pointless to add example files to test these fixes. We should probably add VTY tests separately. However, I have briefly tested manually (and hence found all of these issues). Change-Id: I018eaef40345bfa26e12eb7d09e83a52596c1000 --- doc/examples/trx/osmo-bts.cfg | 3 +-- src/osmo-bts-trx/trx_vty.c | 14 +++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/examples/trx/osmo-bts.cfg b/doc/examples/trx/osmo-bts.cfg index c267fd02..805d9296 100644 --- a/doc/examples/trx/osmo-bts.cfg +++ b/doc/examples/trx/osmo-bts.cfg @@ -21,14 +21,13 @@ line vty ! phy 0 instance 0 - osmotrx rx-gain 1 + osmotrx rx-gain 1 osmotrx ip local 127.0.0.1 osmotrx ip remote 127.0.0.1 bts 0 band 1800 ipa unit-id 6969 0 oml remote-ip 192.168.122.1 - settsc gsmtap-sapi ccch gsmtap-sapi pdtch trx 0 diff --git a/src/osmo-bts-trx/trx_vty.c b/src/osmo-bts-trx/trx_vty.c index a7a433be..1dfc617c 100644 --- a/src/osmo-bts-trx/trx_vty.c +++ b/src/osmo-bts-trx/trx_vty.c @@ -207,6 +207,7 @@ DEFUN(cfg_phy_no_timing_advance_loop, cfg_phy_no_timing_advance_loop_cmd, DEFUN(cfg_phyinst_maxdly, cfg_phyinst_maxdly_cmd, "osmotrx maxdly <0-31>", + OSMOTRX_STR "Set the maximum acceptable delay of an Access Burst (in GSM symbols)." " Access Burst is the first burst a mobile transmits in order to establish" " a connection and it is used to estimate Timing Advance (TA) which is" @@ -230,6 +231,7 @@ DEFUN(cfg_phyinst_maxdly, cfg_phyinst_maxdly_cmd, DEFUN(cfg_phyinst_maxdlynb, cfg_phyinst_maxdlynb_cmd, "osmotrx maxdlynb <0-31>", + OSMOTRX_STR "Set the maximum acceptable delay of a Normal Burst (in GSM symbols)." " USE FOR TESTING ONLY, DON'T CHANGE IN PRODUCTION USE!" " During normal operation, Normal Bursts delay are controled by a Timing" @@ -396,7 +398,8 @@ DEFUN(cfg_phyinst_no_tx_atten, cfg_phyinst_no_tx_atten_cmd, DEFUN(cfg_phyinst_no_maxdly, cfg_phyinst_no_maxdly_cmd, "no osmotrx maxdly", - NO_STR "Unset the maximum delay of GSM symbols\n") + NO_STR OSMOTRX_STR + "Unset the maximum delay of GSM symbols\n") { struct phy_instance *pinst = vty->index; struct trx_l1h *l1h = pinst->u.osmotrx.hdl; @@ -408,7 +411,8 @@ DEFUN(cfg_phyinst_no_maxdly, cfg_phyinst_no_maxdly_cmd, DEFUN(cfg_phyinst_no_maxdlynb, cfg_phyinst_no_maxdlynb_cmd, "no osmotrx maxdlynb", - NO_STR "Unset the maximum delay of GSM symbols\n") + NO_STR OSMOTRX_STR + "Unset the maximum delay of GSM symbols\n") { struct phy_instance *pinst = vty->index; struct trx_l1h *l1h = pinst->u.osmotrx.hdl; @@ -502,7 +506,7 @@ void bts_model_config_write_phy(struct vty *vty, struct phy_link *plink) vty_out(vty, " osmotrx ms-power-loop %d%s", plink->u.osmotrx.trx_target_rssi, VTY_NEWLINE); else vty_out(vty, " no osmotrx ms-power-loop%s", VTY_NEWLINE); - vty_out(vty, " %s osmotrx timing-advance-loop%s", (plink->u.osmotrx.trx_ta_loop) ? "" : "no", VTY_NEWLINE); + vty_out(vty, " %sosmotrx timing-advance-loop%s", (plink->u.osmotrx.trx_ta_loop) ? "" : "no ", VTY_NEWLINE); if (plink->u.osmotrx.base_port_local) vty_out(vty, " osmotrx base-port local %"PRIu16"%s", @@ -535,9 +539,9 @@ void bts_model_config_write_phy_inst(struct vty *vty, struct phy_instance *pinst l1h->config.power, VTY_NEWLINE); } if (l1h->config.maxdly_valid) - vty_out(vty, " maxdly %d%s", l1h->config.maxdly, VTY_NEWLINE); + vty_out(vty, " osmotrx maxdly %d%s", l1h->config.maxdly, VTY_NEWLINE); if (l1h->config.maxdlynb_valid) - vty_out(vty, " maxdlynb %d%s", l1h->config.maxdlynb, VTY_NEWLINE); + vty_out(vty, " osmotrx maxdlynb %d%s", l1h->config.maxdlynb, VTY_NEWLINE); if (l1h->config.slotmask != 0xff) vty_out(vty, " slotmask %d %d %d %d %d %d %d %d%s", l1h->config.slotmask & 1, -- cgit v1.2.3