diff options
author | Max <msuraev@sysmocom.de> | 2017-04-10 13:59:14 +0200 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2017-05-09 09:09:55 +0000 |
commit | 7507aef92b75c86b6ecc11b2a7bbbc378a8dea51 (patch) | |
tree | 5fd7cbeb13149075147ded89eafaf34b79dd4232 /openbsc/include/openbsc/gsm_data_shared.h | |
parent | 93ffbd0029d1200dfa51a0e68b4c11743f1cc0e8 (diff) |
Make BTS type and variant converters shareable
* move value_string definition and corresponding functions for BTS type
to shared header to make it re-usable by OsmoBTS
* use consistent function naming
* add similar functions for BTS variant
* add enum to be used by OML Attribute Reporting to distinguish between
type, variant and other info
Change-Id: Ida94725a6fce968443541e3526f48f13758031fd
Related: OS#1614
Diffstat (limited to 'openbsc/include/openbsc/gsm_data_shared.h')
-rw-r--r-- | openbsc/include/openbsc/gsm_data_shared.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 8f566d227..0586d8a3c 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -505,6 +505,12 @@ enum gsm_bts_type_variant { _NUM_BTS_VARIANT }; +/* Used by OML layer for BTS Attribute reporting */ +enum bts_attribute { + BTS_TYPE_VARIANT, + BTS_SUB_MODEL, +}; + struct vty; struct gsm_bts_model { @@ -864,6 +870,14 @@ struct gsm_bts *gsm_bts_num(struct gsm_network *net, int num); struct gsm_bts_trx *gsm_bts_trx_alloc(struct gsm_bts *bts); struct gsm_bts_trx *gsm_bts_trx_num(const struct gsm_bts *bts, int num); +enum gsm_bts_type str2btstype(const char *arg); +const char *btstype2str(enum gsm_bts_type type); + +enum bts_attribute str2btsattr(const char *s); +const char *btsatttr2str(enum bts_attribute v); + +enum gsm_bts_type_variant str2btsvariant(const char *arg); +const char *btsvariant2str(enum gsm_bts_type_variant v); const struct value_string gsm_pchant_names[13]; const struct value_string gsm_pchant_descs[13]; |