fixeria has uploaded this change for review.
libosmo-trx/trxc: add osmo_trxc_chan_comb_name()
Change-Id: Ibba82407cd2ab0c564c85059fa1b5bcf4aa86c2e
---
M libosmo-trx/include/osmocom/trx/trxc.h
M libosmo-trx/src/trxc.c
2 files changed, 24 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/38/43638/1
diff --git a/libosmo-trx/include/osmocom/trx/trxc.h b/libosmo-trx/include/osmocom/trx/trxc.h
index 3844357..9c2799a 100644
--- a/libosmo-trx/include/osmocom/trx/trxc.h
+++ b/libosmo-trx/include/osmocom/trx/trxc.h
@@ -86,6 +86,12 @@
OSMO_TRXC_CHAN_COMB_PDTCH = 13, /*!< PDTCH+PACCH+PTCCH */
};
+extern const struct value_string osmo_trxc_chan_comb_names[];
+static inline const char *osmo_trxc_chan_comb_name(enum osmo_trxc_chan_comb comb)
+{
+ return get_value_string(osmo_trxc_chan_comb_names, comb);
+}
+
/*! VAMOS-enabled channel combinations: the \c chan_comb parameter of SETSLOT
* is symbolic (not numeric) for these. */
enum osmo_trxc_vamos_comb {
diff --git a/libosmo-trx/src/trxc.c b/libosmo-trx/src/trxc.c
index 9425068..553df3e 100644
--- a/libosmo-trx/src/trxc.c
+++ b/libosmo-trx/src/trxc.c
@@ -44,6 +44,24 @@
{ 0, NULL }
};
+const struct value_string osmo_trxc_chan_comb_names[] = {
+ { OSMO_TRXC_CHAN_COMB_UNUSED, "UNUSED" },
+ { OSMO_TRXC_CHAN_COMB_TCHF, "TCH/F" },
+ { OSMO_TRXC_CHAN_COMB_TCHH_IDLE, "TCH/H (sub-ch 1 idle)" },
+ { OSMO_TRXC_CHAN_COMB_TCHH, "TCH/H" },
+ { OSMO_TRXC_CHAN_COMB_BCCH, "BCCH" },
+ { OSMO_TRXC_CHAN_COMB_BCCH_SDCCH4, "BCCH+SDCCH/4" },
+ { OSMO_TRXC_CHAN_COMB_CCCH, "CCCH" },
+ { OSMO_TRXC_CHAN_COMB_SDCCH8, "SDCCH/8" },
+ { OSMO_TRXC_CHAN_COMB_TCHF_FACCH_SACCHM, "TCH/F+FACCH+SACCH/M" },
+ { OSMO_TRXC_CHAN_COMB_TCHF_SACCHM, "TCH/F+SACCH/M" },
+ { OSMO_TRXC_CHAN_COMB_TCHFD_SACCHMD, "TCH/FD+SACCH/MD" },
+ { OSMO_TRXC_CHAN_COMB_PBCCH, "PBCCH" },
+ { OSMO_TRXC_CHAN_COMB_PCCCH, "PCCCH" },
+ { OSMO_TRXC_CHAN_COMB_PDTCH, "PDTCH" },
+ { 0, NULL }
+};
+
const struct value_string osmo_trxc_vamos_comb_names[] = {
{ OSMO_TRXC_VAMOS_COMB_VFF, "VFF" },
{ OSMO_TRXC_VAMOS_COMB_VHH, "VHH" },
To view, visit change 43638. To unsubscribe, or for help writing mail filters, visit settings.