power_control: add CTRL command for sending default params
There exists a VTY command for sending default power control params, but so far there was no CTRL counterpart for it. This patch adds a SET command 'send-power-control-defaults': $ osmo_ctrl.py \ --host 127.0.0.1 -p 4249 \ --set "bts.0.send-power-control-defaults" 1 Similar to 'send-new-system-informations', this command takes an arbitrary dummy value (required for SET), which is simply ignored. Change-Id: Ib370bd97ee2d9f72f8bec553550b1792d1345387 Related: SYS#6138
This commit is contained in:
parent
6e9f5e54d2
commit
8631189d9e
|
@ -33,6 +33,7 @@ TRX-specific commands are additionally prefixed with TRX number e. g.
|
||||||
|bts.N.cell-identity|RW|No|"<id>"|Set/Get Cell Identity (value between (0, 65535)).
|
|bts.N.cell-identity|RW|No|"<id>"|Set/Get Cell Identity (value between (0, 65535)).
|
||||||
|bts.N.apply-configuration|WO|No|Ignored|Restart BTS via OML.
|
|bts.N.apply-configuration|WO|No|Ignored|Restart BTS via OML.
|
||||||
|bts.N.send-new-system-informations|WO|No|Ignored|Regenerate and resend System Information messages for given BTS.
|
|bts.N.send-new-system-informations|WO|No|Ignored|Regenerate and resend System Information messages for given BTS.
|
||||||
|
|bts.N.send-power-control-defaults|WO|No|Ignored|Resend default power control parameters for given BTS.
|
||||||
|bts.N.channel-load|RO|No|"<name>,<used>,<total>"|See <<chanlo>> for details.
|
|bts.N.channel-load|RO|No|"<name>,<used>,<total>"|See <<chanlo>> for details.
|
||||||
|bts.N.oml-connection-state|RO|No|"connected", "disconnected", "degraded"|Indicate the status of OML connection of BTS.
|
|bts.N.oml-connection-state|RO|No|"connected", "disconnected", "degraded"|Indicate the status of OML connection of BTS.
|
||||||
|bts.N.oml-uptime|RO|No|<uptime>|Return OML link uptime in seconds.
|
|bts.N.oml-uptime|RO|No|<uptime>|Return OML link uptime in seconds.
|
||||||
|
|
|
@ -53,13 +53,24 @@ BTS that accepts the default parameters at startup without triggering the A-bis/
|
||||||
link re-establishment and thus interrupting the service. The following command
|
link re-establishment and thus interrupting the service. The following command
|
||||||
triggers resending of both MS/BS power control parameters:
|
triggers resending of both MS/BS power control parameters:
|
||||||
|
|
||||||
|
.Example: Resending default power control parameters via the VTY
|
||||||
----
|
----
|
||||||
# Resending from the 'enable' node:
|
# Resending from the 'enable' node:
|
||||||
OsmoBSC# bts 0 resend-power-control-defaults
|
OsmoBSC# bts 0 <1> resend-power-control-defaults
|
||||||
|
|
||||||
# Resending from any configuration node (note prefix 'do'):
|
# Resending from any configuration node (note prefix 'do'):
|
||||||
OsmoBSC(config-ms-power-ctrl)# do bts 0 resend-power-control-defaults
|
OsmoBSC(config-ms-power-ctrl)# do bts 0 <1> resend-power-control-defaults
|
||||||
----
|
----
|
||||||
|
<1> BTS number for which to resend default power control parameters.
|
||||||
|
|
||||||
|
.Example: Resending default power control parameters via the CTRL
|
||||||
|
----
|
||||||
|
$ osmo_ctrl.py \
|
||||||
|
--host 127.0.0.1 <1> -p 4249 \
|
||||||
|
--set "bts.0.send-power-control-defaults" 1 <2>
|
||||||
|
----
|
||||||
|
<1> Remote address of the host running osmo-bsc (localhost in this example).
|
||||||
|
<2> An arbitrary dummy value (ignored). Required because SET command is used.
|
||||||
|
|
||||||
NOTE: The above statement mostly applies to parameters for dynamic power control
|
NOTE: The above statement mostly applies to parameters for dynamic power control
|
||||||
mode (see below). Switching between power control modes, as well as changing
|
mode (see below). Switching between power control modes, as well as changing
|
||||||
|
|
|
@ -290,6 +290,33 @@ static int set_bts_si(struct ctrl_cmd *cmd, void *data)
|
||||||
}
|
}
|
||||||
CTRL_CMD_DEFINE_WO_NOVRF(bts_si, "send-new-system-informations");
|
CTRL_CMD_DEFINE_WO_NOVRF(bts_si, "send-new-system-informations");
|
||||||
|
|
||||||
|
static int set_bts_power_ctrl_defs(struct ctrl_cmd *cmd, void *data)
|
||||||
|
{
|
||||||
|
const struct gsm_bts *bts = cmd->node;
|
||||||
|
const struct gsm_bts_trx *trx;
|
||||||
|
|
||||||
|
if (bts->ms_power_ctrl.mode != GSM_PWR_CTRL_MODE_DYN_BTS) {
|
||||||
|
cmd->reply = "BTS is not using dyn-bts mode";
|
||||||
|
return CTRL_CMD_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bts->model->power_ctrl_send_def_params == NULL) {
|
||||||
|
cmd->reply = "Not implemented for this BTS model";
|
||||||
|
return CTRL_CMD_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
llist_for_each_entry(trx, &bts->trx_list, list) {
|
||||||
|
if (bts->model->power_ctrl_send_def_params(trx) != 0) {
|
||||||
|
cmd->reply = "power_ctrl_send_def_params() failed";
|
||||||
|
return CTRL_CMD_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd->reply = "Default power control parameters have been sent";
|
||||||
|
return CTRL_CMD_REPLY;
|
||||||
|
}
|
||||||
|
CTRL_CMD_DEFINE_WO_NOVRF(bts_power_ctrl_defs, "send-power-control-defaults");
|
||||||
|
|
||||||
static int get_bts_chan_load(struct ctrl_cmd *cmd, void *data)
|
static int get_bts_chan_load(struct ctrl_cmd *cmd, void *data)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -799,6 +826,7 @@ int bsc_base_ctrl_cmds_install(void)
|
||||||
rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_ci);
|
rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_ci);
|
||||||
rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_apply_config);
|
rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_apply_config);
|
||||||
rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_si);
|
rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_si);
|
||||||
|
rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_power_ctrl_defs);
|
||||||
rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_chan_load);
|
rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_chan_load);
|
||||||
rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_oml_conn);
|
rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_oml_conn);
|
||||||
rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_oml_up);
|
rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_oml_up);
|
||||||
|
|
Loading…
Reference in New Issue