fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-bsc/+/27743 )
Change subject: VTY: clarify help for the Adaptive Multi Rate settings
......................................................................
VTY: clarify help for the Adaptive Multi Rate settings
* Always say 'codec mode', not just 'codec'.
* Suggest proper modes in AMR_{TH,HY}_HELP_STR.
* Use 3GPP's definition of threshold and hysteresis.
* Clarify that threshold and hysteresis values are in 0.5 dB steps.
Change-Id: I996eae8aafeb2850e5e1a6f5a7764d745e1289b5
Related: SYS#5917, OS#4984
---
M src/osmo-bsc/bts_vty.c
1 file changed, 34 insertions(+), 18 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/43/27743/1
diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c
index d675922..1411cd3 100644
--- a/src/osmo-bsc/bts_vty.c
+++ b/src/osmo-bsc/bts_vty.c
@@ -2386,10 +2386,12 @@
#define AMR_TEXT "Adaptive Multi Rate settings\n"
#define AMR_MODE_TEXT "Codec modes to use with AMR codec\n"
-#define AMR_START_TEXT "Initial codec to use with AMR\n" \
- "Automatically\nFirst codec\nSecond codec\nThird codec\nFourth codec\n"
-#define AMR_TH_TEXT "AMR threshold between codecs\nMS side\nBTS side\n"
-#define AMR_HY_TEXT "AMR hysteresis between codecs\nMS side\nBTS side\n"
+#define AMR_START_TEXT "Initial codec mode to use with AMR\n" \
+ "Automatically\nFirst mode\nSecond mode\nThird mode\nFourth mode\n"
+#define AMR_MS_BTS_TEXT "MS side\nBTS side\n"
+#define AMR_TH_TEXT "Lower threshold(s) for switching between codec modes\n"
AMR_MS_BTS_TEXT
+#define AMR_HY_TEXT "Hysteresis value(s) to obtain the higher threshold(s) " \
+ "for switching between codec modes\n" AMR_MS_BTS_TEXT
static int get_amr_from_arg(struct vty *vty, int argc, const char *argv[], int full)
{
@@ -2546,8 +2548,10 @@
#define AMR_TCHH_PAR_STR " (0|1|2|3|4|5)"
#define AMR_TCHH_HELP_STR "4,75k\n5,15k\n5,90k\n6,70k\n7,40k\n7,95k\n"
-#define AMR_TH_HELP_STR "Threshold between codec 1 and 2\n"
-#define AMR_HY_HELP_STR "Hysteresis between codec 1 and 2\n"
+#define AMR_TH_HELP_STR(a, b) \
+ "Threshold between codec mode " a " and " b " (in 0.5 dB
steps)\n"
+#define AMR_HY_HELP_STR(a, b) \
+ "Hysteresis between codec mode " a " and " b " (in 0.5 dB
steps)\n"
DEFUN_USRATTR(cfg_bts_amr_fr_modes1,
cfg_bts_amr_fr_modes1_cmd,
@@ -2612,7 +2616,7 @@
X(BSC_VTY_ATTR_NEW_LCHAN),
"amr tch-f threshold (ms|bts) <0-63>",
AMR_TEXT "Full Rate\n" AMR_TH_TEXT
- AMR_TH_HELP_STR)
+ AMR_TH_HELP_STR("1", "2"))
{
get_amr_th_from_arg(vty, 2, argv, 1);
return check_amr_config(vty);
@@ -2623,7 +2627,8 @@
X(BSC_VTY_ATTR_NEW_LCHAN),
"amr tch-f threshold (ms|bts) <0-63> <0-63>",
AMR_TEXT "Full Rate\n" AMR_TH_TEXT
- AMR_TH_HELP_STR AMR_TH_HELP_STR)
+ AMR_TH_HELP_STR("1", "2")
+ AMR_TH_HELP_STR("2", "3"))
{
get_amr_th_from_arg(vty, 3, argv, 1);
return check_amr_config(vty);
@@ -2634,7 +2639,9 @@
X(BSC_VTY_ATTR_NEW_LCHAN),
"amr tch-f threshold (ms|bts) <0-63> <0-63> <0-63>",
AMR_TEXT "Full Rate\n" AMR_TH_TEXT
- AMR_TH_HELP_STR AMR_TH_HELP_STR AMR_TH_HELP_STR)
+ AMR_TH_HELP_STR("1", "2")
+ AMR_TH_HELP_STR("2", "3")
+ AMR_TH_HELP_STR("3", "4"))
{
get_amr_th_from_arg(vty, 4, argv, 1);
return check_amr_config(vty);
@@ -2645,7 +2652,7 @@
X(BSC_VTY_ATTR_NEW_LCHAN),
"amr tch-f hysteresis (ms|bts) <0-15>",
AMR_TEXT "Full Rate\n" AMR_HY_TEXT
- AMR_HY_HELP_STR)
+ AMR_HY_HELP_STR("1", "2"))
{
get_amr_hy_from_arg(vty, 2, argv, 1);
return check_amr_config(vty);
@@ -2656,7 +2663,8 @@
X(BSC_VTY_ATTR_NEW_LCHAN),
"amr tch-f hysteresis (ms|bts) <0-15> <0-15>",
AMR_TEXT "Full Rate\n" AMR_HY_TEXT
- AMR_HY_HELP_STR AMR_HY_HELP_STR)
+ AMR_HY_HELP_STR("1", "2")
+ AMR_HY_HELP_STR("2", "3"))
{
get_amr_hy_from_arg(vty, 3, argv, 1);
return CMD_SUCCESS;
@@ -2667,7 +2675,9 @@
X(BSC_VTY_ATTR_NEW_LCHAN),
"amr tch-f hysteresis (ms|bts) <0-15> <0-15> <0-15>",
AMR_TEXT "Full Rate\n" AMR_HY_TEXT
- AMR_HY_HELP_STR AMR_HY_HELP_STR AMR_HY_HELP_STR)
+ AMR_HY_HELP_STR("1", "2")
+ AMR_HY_HELP_STR("2", "3")
+ AMR_HY_HELP_STR("3", "4"))
{
get_amr_hy_from_arg(vty, 4, argv, 1);
return check_amr_config(vty);
@@ -2736,7 +2746,7 @@
X(BSC_VTY_ATTR_NEW_LCHAN),
"amr tch-h threshold (ms|bts) <0-63>",
AMR_TEXT "Half Rate\n" AMR_TH_TEXT
- AMR_TH_HELP_STR)
+ AMR_TH_HELP_STR("1", "2"))
{
get_amr_th_from_arg(vty, 2, argv, 0);
return check_amr_config(vty);
@@ -2747,7 +2757,8 @@
X(BSC_VTY_ATTR_NEW_LCHAN),
"amr tch-h threshold (ms|bts) <0-63> <0-63>",
AMR_TEXT "Half Rate\n" AMR_TH_TEXT
- AMR_TH_HELP_STR AMR_TH_HELP_STR)
+ AMR_TH_HELP_STR("1", "2")
+ AMR_TH_HELP_STR("2", "3"))
{
get_amr_th_from_arg(vty, 3, argv, 0);
return check_amr_config(vty);
@@ -2758,7 +2769,9 @@
X(BSC_VTY_ATTR_NEW_LCHAN),
"amr tch-h threshold (ms|bts) <0-63> <0-63> <0-63>",
AMR_TEXT "Half Rate\n" AMR_TH_TEXT
- AMR_TH_HELP_STR AMR_TH_HELP_STR AMR_TH_HELP_STR)
+ AMR_TH_HELP_STR("1", "2")
+ AMR_TH_HELP_STR("2", "3")
+ AMR_TH_HELP_STR("3", "4"))
{
get_amr_th_from_arg(vty, 4, argv, 0);
return check_amr_config(vty);
@@ -2769,7 +2782,7 @@
X(BSC_VTY_ATTR_NEW_LCHAN),
"amr tch-h hysteresis (ms|bts) <0-15>",
AMR_TEXT "Half Rate\n" AMR_HY_TEXT
- AMR_HY_HELP_STR)
+ AMR_HY_HELP_STR("1", "2"))
{
get_amr_hy_from_arg(vty, 2, argv, 0);
return check_amr_config(vty);
@@ -2780,7 +2793,8 @@
X(BSC_VTY_ATTR_NEW_LCHAN),
"amr tch-h hysteresis (ms|bts) <0-15> <0-15>",
AMR_TEXT "Half Rate\n" AMR_HY_TEXT
- AMR_HY_HELP_STR AMR_HY_HELP_STR)
+ AMR_HY_HELP_STR("1", "2")
+ AMR_HY_HELP_STR("2", "3"))
{
get_amr_hy_from_arg(vty, 3, argv, 0);
return check_amr_config(vty);
@@ -2791,7 +2805,9 @@
X(BSC_VTY_ATTR_NEW_LCHAN),
"amr tch-h hysteresis (ms|bts) <0-15> <0-15> <0-15>",
AMR_TEXT "Half Rate\n" AMR_HY_TEXT
- AMR_HY_HELP_STR AMR_HY_HELP_STR AMR_HY_HELP_STR)
+ AMR_HY_HELP_STR("1", "2")
+ AMR_HY_HELP_STR("2", "3")
+ AMR_HY_HELP_STR("3", "4"))
{
get_amr_hy_from_arg(vty, 4, argv, 0);
return check_amr_config(vty);
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/27743
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I996eae8aafeb2850e5e1a6f5a7764d745e1289b5
Gerrit-Change-Number: 27743
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange