[S] Change in osmo-bsc[master]: nokia_site: add reset_type attribute
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/39315?usp=email ) Change subject: nokia_site: add reset_type attribute ...................................................................... nokia_site: add reset_type attribute Change-Id: I0f31cd711768c963e5c14c0f4969ff76cb05c12b --- M src/osmo-bsc/bts_nokia_site.c 1 file changed, 27 insertions(+), 2 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/osmo-bsc/bts_nokia_site.c b/src/osmo-bsc/bts_nokia_site.c index 256b49f..e68cf35 100644 --- a/src/osmo-bsc/bts_nokia_site.c +++ b/src/osmo-bsc/bts_nokia_site.c @@ -598,6 +598,21 @@ return get_value_string(nokia_severity, severity); } +static const struct value_string nokia_reset_type[] = { + { 0, "OMU reset" }, /* BTS is still able to carry traffic */ + { 1, "Site reset" }, + { 2, "Reserved" }, + { 3, "Autoconfiguration site reset" }, + { 4, "MetroSite VTGA reset" }, + { 5, "Total reset" }, /* Complete reset of Packet Abis BTS and Conversion Function reset */ + { 0, NULL } +}; + +static const char *get_reset_type_string(uint8_t reset_type) +{ + return get_value_string(nokia_reset_type, reset_type); +} + /* TODO: put in a separate file ? */ /* some message IDs */ @@ -621,6 +636,7 @@ #define NOKIA_EI_ADD_INFO 0x51 #define NOKIA_EI_SEVERITY 0x4B #define NOKIA_EI_ALARM_DETAIL 0x94 +#define NOKIA_EI_RESET_TYPE 0x18 #define OM_ALLOC_SIZE 1024 #define OM_HEADROOM_SIZE 128 @@ -1670,6 +1686,7 @@ uint8_t info[256]; uint8_t ack = 0xFF; uint8_t severity = 0xFF; + uint8_t reset_type = 0xFF; int str_len; int len_data; @@ -1693,11 +1710,19 @@ case NOKIA_MSG_OMU_STARTED: if (find_element(noh->data, len_data, NOKIA_EI_BTS_TYPE, &bts->nokia.bts_type, - sizeof(uint8_t)) == sizeof(uint8_t)) + sizeof(uint8_t)) == sizeof(uint8_t)) { LOG_BTS(bts, DNM, LOGL_INFO, "Rx BTS type = %d (%s)\n", bts->nokia.bts_type, get_bts_type_string(bts->nokia.bts_type)); - else + } else { LOG_BTS(bts, DNM, LOGL_ERROR, "BTS type not found in NOKIA_MSG_OMU_STARTED\n"); + } + if (find_element(noh->data, len_data, NOKIA_EI_RESET_TYPE, &reset_type, + sizeof(reset_type))) { + LOG_BTS(bts, DNM, LOGL_INFO, "Rx BTS reset type = '%s'\n", + get_reset_type_string(reset_type)); + } else { + LOG_BTS(bts, DNM, LOGL_ERROR, "BTS reset type not found in NOKIA_MSG_OMU_STARTED\n"); + } /* send START_DOWNLOAD_REQ */ abis_nm_download_req(bts, ref); break; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/39315?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I0f31cd711768c963e5c14c0f4969ff76cb05c12b Gerrit-Change-Number: 39315 Gerrit-PatchSet: 7 Gerrit-Owner: csaba.sipos <metro4@freemail.hu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: pespin <pespin@sysmocom.de>
participants (1)
-
laforge