Introduce VTY command 'ccch load-indication-period <0-255>'

Change-Id: Id9d23238863c02a72bcf32942f6b0d40be127904
This commit is contained in:
Pau Espin 2022-04-25 17:18:48 +02:00 committed by pespin
parent f5183911c8
commit c3487dd19d
4 changed files with 22 additions and 2 deletions

View File

@ -471,8 +471,10 @@ struct gsm_bts {
} pwr_ctrl; /* TS 44.060 Table 12.9.1 */
} gprs;
/* threshold (in percent) when BTS shall send CCCH LOAD IND */
/* CCCH Load Threshold: threshold (in percent) when BTS shall send CCCH LOAD IND */
uint8_t ccch_load_ind_thresh;
/* CCCH Load Indication Period: how often (secs) to send CCCH LOAD IND when over CCCH Load Threshold. */
uint8_t ccch_load_ind_period;
/* RACH NM values */
int rach_b_thresh;

View File

@ -266,6 +266,7 @@ struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, struct gsm_bts_sm *bts_sm
bts->c0->ts[0].pchan_from_config = GSM_PCHAN_CCCH_SDCCH4; /* TODO: really?? */
bts->ccch_load_ind_thresh = 10; /* 10% of Load: Start sending CCCH LOAD IND */
bts->ccch_load_ind_period = 1; /* Send CCCH LOAD IND every 1 second */
bts->rach_b_thresh = -1;
bts->rach_ldavg_slots = -1;

View File

@ -71,7 +71,7 @@ struct msgb *nanobts_gen_set_bts_attr(struct gsm_bts *bts)
msgb_tv_put(msgb, NM_ATT_CCCH_L_T, bts->ccch_load_ind_thresh);
/* CCCH Load Indication Period (3GPP TS 12.21 sec 9.4.11), seconds */
msgb_tv_put(msgb, NM_ATT_CCCH_L_I_P, 1);
msgb_tv_put(msgb, NM_ATT_CCCH_L_I_P, bts->ccch_load_ind_period);
/* RACH Busy Threshold (3GPP TS 12.21 sec 9.4.44), -dBm */
buf[0] = 90; /* -90 dBm as default "busy" threshold */

View File

@ -926,6 +926,19 @@ DEFUN_USRATTR(cfg_bts_ccch_load_ind_thresh,
return CMD_SUCCESS;
}
DEFUN_USRATTR(cfg_bts_ccch_load_ind_period,
cfg_bts_ccch_load_ind_period_cmd,
X(BSC_VTY_ATTR_RESTART_ABIS_OML_LINK),
"ccch load-indication-period <0-255>",
CCCH_STR
"Period of time at which BTS sends RSL CCCH LOAD IND\n"
"CCCH Load Indication Period in seconds (Default: 1)\n")
{
struct gsm_bts *bts = vty->index;
bts->ccch_load_ind_period = atoi(argv[0]);
return CMD_SUCCESS;
}
#define NM_STR "Network Management\n"
DEFUN_USRATTR(cfg_bts_rach_nm_b_thresh,
@ -4166,6 +4179,9 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
if (bts->ccch_load_ind_thresh != 10)
vty_out(vty, " ccch load-indication-threshold %u%s",
bts->ccch_load_ind_thresh, VTY_NEWLINE);
if (bts->ccch_load_ind_period != 1)
vty_out(vty, " ccch load-indication-period %u%s",
bts->ccch_load_ind_period, VTY_NEWLINE);
if (bts->rach_b_thresh != -1)
vty_out(vty, " rach nm busy threshold %u%s",
bts->rach_b_thresh, VTY_NEWLINE);
@ -4479,6 +4495,7 @@ int bts_vty_init(void)
install_element(BTS_NODE, &cfg_bts_chan_desc_bs_ag_blks_res_cmd);
install_element(BTS_NODE, &cfg_bts_chan_dscr_bs_ag_blks_res_cmd);
install_element(BTS_NODE, &cfg_bts_ccch_load_ind_thresh_cmd);
install_element(BTS_NODE, &cfg_bts_ccch_load_ind_period_cmd);
install_element(BTS_NODE, &cfg_bts_rach_nm_b_thresh_cmd);
install_element(BTS_NODE, &cfg_bts_rach_nm_ldavg_cmd);
install_element(BTS_NODE, &cfg_bts_cell_barred_cmd);