fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/43638?usp=email ) Change subject: libosmo-trx/trxc: add osmo_trxc_chan_comb_name() ...................................................................... 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(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve 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 https://gerrit.osmocom.org/c/osmo-trx/+/43638?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Ibba82407cd2ab0c564c85059fa1b5bcf4aa86c2e Gerrit-Change-Number: 43638 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: pespin <pespin@sysmocom.de>