diff options
author | Max <msuraev@sysmocom.de> | 2019-03-13 16:35:09 +0100 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2019-03-24 18:54:52 +0100 |
commit | a4de02db5db1e90eee071d62a4a502d8cde4b8a7 (patch) | |
tree | 25933b45ab1ce68cf3d7c5035b4f4b4fae98eaf2 /src/coding_scheme.c | |
parent | 02fbfc15c7678cb02a19b4c2f01f9efc80756d14 (diff) |
MCS: move Mode enum outside of class definition
Move Mode (EDGE/GPRS) definition and related functions outside of
GprsCodingScheme class. This allows us to use standard libosmocore
value_string functions.
Change-Id: I3baaac7f1ca3f5b88917a23c1679d63847455f47
Diffstat (limited to 'src/coding_scheme.c')
-rw-r--r-- | src/coding_scheme.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/coding_scheme.c b/src/coding_scheme.c index 93278e7e..135ddd27 100644 --- a/src/coding_scheme.c +++ b/src/coding_scheme.c @@ -85,3 +85,14 @@ uint8_t num_data_block_header_bits(enum HeaderType ht) OSMO_ASSERT(ht < NUM_HEADER_TYPES); return hdr_type_info[ht].data_block_header_bits; } + +const struct value_string mode_names[] = { + { GPRS, "GPRS" }, + { EGPRS_GMSK, "EGPRS_GMSK-only"}, + { EGPRS, "EGPRS"}, + { 0, NULL } +}; + +const char *mode_name(enum mcs_kind val) { + return get_value_string(mode_names, val); +} |