libosmogsm 1.7.0
Osmocom GSM library
Loading...
Searching...
No Matches
bts_features.h
Go to the documentation of this file.
1#pragma once
2
5
6#define MAX_BTS_FEATURES 128
7
8/* N. B: always add new features to the end of the list (right before _NUM_BTS_FEAT) to avoid breaking compatibility
9 with BTS compiled against earlier version of this header. Also make sure that the description strings
10 osmo_bts_features_descs[] in gsm_data.c are also updated accordingly! */
38
39extern const struct value_string osmo_bts_features_descs[];
40
41static inline const char *osmo_bts_features_desc(enum osmo_bts_features val)
43
44const char *osmo_bts_feature_name(enum osmo_bts_features feature)
45 OSMO_DEPRECATED("Use osmo_bts_features_desc() instead");
46
47extern const struct value_string osmo_bts_features_names[];
48
49static inline const char *osmo_bts_features_name(enum osmo_bts_features val)
51
52static inline int osmo_bts_set_feature(struct bitvec *features, enum osmo_bts_features feature)
53{
55 return bitvec_set_bit_pos(features, feature, 1);
56}
57
58static inline int osmo_bts_unset_feature(struct bitvec *features, enum osmo_bts_features feature)
59{
61 return bitvec_set_bit_pos(features, feature, 0);
62}
63
64static inline bool osmo_bts_has_feature(const struct bitvec *features, enum osmo_bts_features feature)
65{
67 return bitvec_get_bit_pos(features, feature) == ONE;
68}
static const char * osmo_bts_features_desc(enum osmo_bts_features val)
Definition bts_features.h:41
static const char * osmo_bts_features_name(enum osmo_bts_features val)
Definition bts_features.h:49
static int osmo_bts_set_feature(struct bitvec *features, enum osmo_bts_features feature)
Definition bts_features.h:52
#define MAX_BTS_FEATURES
Definition bts_features.h:6
const struct value_string osmo_bts_features_descs[]
Definition bts_features.c:21
static bool osmo_bts_has_feature(const struct bitvec *features, enum osmo_bts_features feature)
Definition bts_features.h:64
const char * osmo_bts_feature_name(enum osmo_bts_features feature) OSMO_DEPRECATED("Use osmo_bts_features_desc() instead")
return description string of a BTS feature (osmo_bts_features_descs).
Definition bts_features.c:51
static int osmo_bts_unset_feature(struct bitvec *features, enum osmo_bts_features feature)
Definition bts_features.h:58
const struct value_string osmo_bts_features_names[]
Definition bts_features.c:56
osmo_bts_features
Definition bts_features.h:11
@ BTS_FEAT_ABIS_OSMO_PCU
Definition bts_features.h:32
@ BTS_FEAT_SPEECH_H_AMR
Definition bts_features.h:25
@ BTS_FEAT_PAGING_COORDINATION
Definition bts_features.h:27
@ _NUM_BTS_FEAT
Definition bts_features.h:36
@ BTS_FEAT_SPEECH_F_V1
Definition bts_features.h:21
@ BTS_FEAT_OML_ALERTS
Definition bts_features.h:18
@ BTS_FEAT_AGCH_PCH_PROP
Definition bts_features.h:19
@ BTS_FEAT_ECSD
Definition bts_features.h:15
@ BTS_FEAT_DYN_TS_SDCCH8
Definition bts_features.h:34
@ BTS_FEAT_IPV6_NSVC
Definition bts_features.h:28
@ BTS_FEAT_MULTI_TSC
Definition bts_features.h:17
@ BTS_FEAT_BCCH_POWER_RED
Definition bts_features.h:33
@ BTS_FEAT_VAMOS
Definition bts_features.h:31
@ BTS_FEAT_SPEECH_F_AMR
Definition bts_features.h:24
@ BTS_FEAT_ACCH_REP
Definition bts_features.h:29
@ BTS_FEAT_GPRS
Definition bts_features.h:13
@ BTS_FEAT_ETWS_PN
Definition bts_features.h:26
@ BTS_FEAT_CCN
Definition bts_features.h:30
@ BTS_FEAT_HOPPING
Definition bts_features.h:16
@ BTS_FEAT_HSCSD
Definition bts_features.h:12
@ BTS_FEAT_SPEECH_H_V1
Definition bts_features.h:22
@ BTS_FEAT_CBCH
Definition bts_features.h:20
@ BTS_FEAT_ACCH_TEMP_OVP
Definition bts_features.h:35
@ BTS_FEAT_EGPRS
Definition bts_features.h:14
@ BTS_FEAT_SPEECH_F_EFR
Definition bts_features.h:23
int bitvec_set_bit_pos(struct bitvec *bv, unsigned int bitnr, enum bit_value bit)
enum bit_value bitvec_get_bit_pos(const struct bitvec *bv, unsigned int bitnr)
ONE
#define OSMO_ASSERT(exp)
#define OSMO_DEPRECATED(text)
const char * get_value_string(const struct value_string *vs, uint32_t val)