This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged.
Change subject: abis_nm: Add abis_nm_admin_name() API
......................................................................
abis_nm: Add abis_nm_admin_name() API
Similar APIs exist for opstate and availability status.
This patch does not break backward compatibility because osmo-bsc still
requires direct use of the structure in get_string_value().
Change-Id: Ieace734aaff3f07606113feddde65b75202d96d6
---
M include/osmocom/gsm/abis_nm.h
1 file changed, 7 insertions(+), 0 deletions(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/include/osmocom/gsm/abis_nm.h b/include/osmocom/gsm/abis_nm.h
index e031ee1..dd7ba0d 100644
--- a/include/osmocom/gsm/abis_nm.h
+++ b/include/osmocom/gsm/abis_nm.h
@@ -28,9 +28,16 @@
const char *abis_nm_event_type_name(uint8_t cause);
const char *abis_nm_severity_name(uint8_t cause);
extern const struct tlv_definition abis_nm_att_tlvdef;
+
const char *abis_nm_opstate_name(uint8_t os);
const char *abis_nm_avail_name(uint8_t avail);
const char *abis_nm_test_name(uint8_t test);
+/*! Get human-readable string for OML administrative state */
+static inline const char *abis_nm_admin_name(uint8_t admin)
+{
+ return get_value_string(abis_nm_adm_state_names, admin);
+}
+
extern const struct tlv_definition abis_nm_osmo_att_tlvdef;
extern const struct tlv_definition abis_nm_att_tlvdef_ipa;
--
To view, visit https://gerrit.osmocom.org/4355
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ieace734aaff3f07606113feddde65b75202d96d6
Gerrit-PatchSet: 3
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>