diff options
author | Daniel Willmann <daniel@totalueberwachung.de> | 2011-08-19 19:38:31 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-09-11 16:20:45 +0200 |
commit | 65924a5fe85c34a46ad8b163b43cd2aa4de3fa94 (patch) | |
tree | e1a24902ee301b337f1f1a514353283c521241cb /openbsc/src/osmo-bsc | |
parent | 11620111f452c2c30cf9957b733ea0320c64ed4d (diff) |
osmo-bsc: Include rf statistics in the location-state TRAP as well
The first fields are still the location up to the height.
The next field is "operational" if any of the trx are operational,
otherwise "inoperational"
The second to last field contains "locked" if all of the trx are in the
admin state, otherwise "unlocked".
The last field represents the rf policy currently in effect. It is one
of (on|off|grace|unknown).
<tstamp>,<valid>,<lat>,<lon>,<height>,<oper>,<admin>,<policy>
Diffstat (limited to 'openbsc/src/osmo-bsc')
-rw-r--r-- | openbsc/src/osmo-bsc/osmo_bsc_ctrl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c index a241f7e70..ba8c1d264 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c @@ -58,6 +58,7 @@ static int get_bts_loc(struct ctrl_cmd *cmd, void *data); static void generate_location_state_trap(struct gsm_bts *bts, struct bsc_msc_connection *msc_con) { struct ctrl_cmd *cmd; + const char *oper, *admin, *policy; cmd = ctrl_cmd_create(msc_con, CTRL_TYPE_TRAP); if (!cmd) { @@ -72,6 +73,12 @@ static void generate_location_state_trap(struct gsm_bts *bts, struct bsc_msc_con cmd->node = bts; get_bts_loc(cmd, NULL); + oper = osmo_bsc_rf_get_opstate_name(osmo_bsc_rf_get_opstate_by_bts(bts)); + admin = osmo_bsc_rf_get_adminstate_name(osmo_bsc_rf_get_adminstate_by_bts(bts)); + policy = osmo_bsc_rf_get_policy_name(osmo_bsc_rf_get_policy_by_bts(bts)); + + cmd->reply = talloc_asprintf_append(cmd->reply, ",%s,%s,%s", oper, admin, policy); + osmo_bsc_send_trap(cmd, msc_con); talloc_free(cmd); } |