aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/osmo_bsc_rf.h
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2011-08-19 19:38:31 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-09-11 16:20:45 +0200
commit65924a5fe85c34a46ad8b163b43cd2aa4de3fa94 (patch)
treee1a24902ee301b337f1f1a514353283c521241cb /openbsc/include/openbsc/osmo_bsc_rf.h
parent11620111f452c2c30cf9957b733ea0320c64ed4d (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/include/openbsc/osmo_bsc_rf.h')
-rw-r--r--openbsc/include/openbsc/osmo_bsc_rf.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/osmo_bsc_rf.h b/openbsc/include/openbsc/osmo_bsc_rf.h
index 6db28cd64..d3e2caba4 100644
--- a/openbsc/include/openbsc/osmo_bsc_rf.h
+++ b/openbsc/include/openbsc/osmo_bsc_rf.h
@@ -1,9 +1,28 @@
#ifndef OSMO_BSC_RF
#define OSMO_BSC_RF
+#include <openbsc/gsm_data.h>
#include <osmocom/core/write_queue.h>
#include <osmocom/core/timer.h>
+enum osmo_bsc_rf_opstate {
+ OSMO_BSC_RF_OPSTATE_INOPERATIONAL,
+ OSMO_BSC_RF_OPSTATE_OPERATIONAL,
+};
+
+enum osmo_bsc_rf_adminstate {
+ OSMO_BSC_RF_ADMINSTATE_UNLOCKED,
+ OSMO_BSC_RF_ADMINSTATE_LOCKED,
+};
+
+enum osmo_bsc_rf_policy {
+ OSMO_BSC_RF_POLICY_OFF,
+ OSMO_BSC_RF_POLICY_ON,
+ OSMO_BSC_RF_POLICY_GRACE,
+ OSMO_BSC_RF_POLICY_UNKNOWN,
+};
+
+
struct gsm_network;
struct osmo_bsc_rf {
@@ -30,6 +49,12 @@ struct osmo_bsc_rf_conn {
struct osmo_bsc_rf *rf;
};
+const char *osmo_bsc_rf_get_opstate_name(enum osmo_bsc_rf_opstate opstate);
+const char *osmo_bsc_rf_get_adminstate_name(enum osmo_bsc_rf_adminstate adminstate);
+const char *osmo_bsc_rf_get_policy_name(enum osmo_bsc_rf_policy policy);
+enum osmo_bsc_rf_opstate osmo_bsc_rf_get_opstate_by_bts(struct gsm_bts *bts);
+enum osmo_bsc_rf_adminstate osmo_bsc_rf_get_adminstate_by_bts(struct gsm_bts *bts);
+enum osmo_bsc_rf_policy osmo_bsc_rf_get_policy_by_bts(struct gsm_bts *bts);
struct osmo_bsc_rf *osmo_bsc_rf_create(const char *path, struct gsm_network *net);
#endif