From 7507aef92b75c86b6ecc11b2a7bbbc378a8dea51 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 10 Apr 2017 13:59:14 +0200 Subject: 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 --- openbsc/include/openbsc/gsm_data_shared.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'openbsc/include') 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]; -- cgit v1.2.3