From b750647cd8f76f35a1222e23bd785bc55646946d Mon Sep 17 00:00:00 2001 From: faluco Date: Fri, 12 Feb 2021 11:32:12 +0100 Subject: [PATCH] - Remove the cause field in the rrc disconnect event. - Add the sib9 enb home name field to the sectors events, but leave the value as a TODO. --- lib/include/srslte/common/enb_events.h | 2 +- lib/src/common/enb_events.cc | 14 +++++++------- srsenb/src/stack/rrc/rrc_ue.cc | 2 -- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/include/srslte/common/enb_events.h b/lib/include/srslte/common/enb_events.h index 6ae82e345..96131a702 100644 --- a/lib/include/srslte/common/enb_events.h +++ b/lib/include/srslte/common/enb_events.h @@ -33,7 +33,7 @@ public: virtual void log_rrc_connected(uint32_t enb_cc_idx, const std::string& asn1, unsigned error_code, uint16_t rnti) = 0; /// Logs into the underlying log channel the RRC disconnected event. - virtual void log_rrc_disconnect(uint32_t enb_cc_idx, unsigned reason, unsigned rrc_cause, uint16_t rnti) = 0; + virtual void log_rrc_disconnect(uint32_t enb_cc_idx, unsigned reason, uint16_t rnti) = 0; /// Logs into the underlying log channel the S1 context create event. virtual void log_s1_ctx_create(uint32_t enb_cc_idx, uint32_t mme_id, uint32_t enb_id, uint16_t rnti) = 0; diff --git a/lib/src/common/enb_events.cc b/lib/src/common/enb_events.cc index 614e49d70..358a29e4b 100644 --- a/lib/src/common/enb_events.cc +++ b/lib/src/common/enb_events.cc @@ -23,7 +23,7 @@ class null_event_logger : public event_logger_interface { public: void log_rrc_connected(uint32_t enb_cc_idx, const std::string& asn1, unsigned error_code, uint16_t rnti) override {} - void log_rrc_disconnect(uint32_t enb_cc_idx, unsigned reason, unsigned rrc_cause, uint16_t rnti) override {} + void log_rrc_disconnect(uint32_t enb_cc_idx, unsigned reason, uint16_t rnti) override {} void log_s1_ctx_create(uint32_t enb_cc_idx, uint32_t mme_id, uint32_t enb_id, uint16_t rnti) override {} void log_s1_ctx_delete(uint32_t enb_cc_idx, uint32_t mme_id, uint32_t enb_id, uint16_t rnti) override {} void log_sector_start(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) override {} @@ -58,8 +58,8 @@ DECLARE_METRIC("asn1_message", metric_asn1_message, std::string, ""); /// Context for sector start/stop. DECLARE_METRIC("pci", metric_pci, uint32_t, ""); DECLARE_METRIC("cell_identity", metric_cell_identity, std::string, ""); -//:TODO: sib9_home_enb_name as string -DECLARE_METRIC_SET("event_data", mset_sector_event, metric_pci, metric_cell_identity); +DECLARE_METRIC("sib9_home_enb_name", metric_sib9_home_enb_name, std::string, ""); +DECLARE_METRIC_SET("event_data", mset_sector_event, metric_pci, metric_cell_identity, metric_sib9_home_enb_name); using sector_event_t = srslog:: build_context_type; @@ -79,8 +79,7 @@ using rrc_connect_event_t = srslog::build_context_type("rrc_disconnect"); ctx.get().write(reason); ctx.get().write(rnti); - ctx.get().write(rrc_cause); event_channel(ctx); } @@ -182,6 +180,7 @@ public: ctx.write("sector_start"); ctx.get().write(pci); ctx.get().write(fmt::to_string(cell_id)); + ctx.get().write("TODO"); event_channel(ctx); } @@ -195,6 +194,7 @@ public: ctx.write("sector_stop"); ctx.get().write(pci); ctx.get().write(fmt::to_string(cell_id)); + ctx.get().write("TODO"); event_channel(ctx); } diff --git a/srsenb/src/stack/rrc/rrc_ue.cc b/srsenb/src/stack/rrc/rrc_ue.cc index 312a67282..039415225 100644 --- a/srsenb/src/stack/rrc/rrc_ue.cc +++ b/srsenb/src/stack/rrc/rrc_ue.cc @@ -110,7 +110,6 @@ void rrc::ue::activity_timer_expired() parent->s1ap->user_release(rnti, asn1::s1ap::cause_radio_network_opts::user_inactivity); event_logger::get().log_rrc_disconnect(ue_cell_list.get_ue_cc_idx(UE_PCELL_CC_IDX)->cell_common->enb_cc_idx, static_cast(rrc_idle_transition_cause::timeout), - 0, rnti); } else { if (rnti != SRSLTE_MRNTI) { @@ -763,7 +762,6 @@ void rrc::ue::send_connection_release() // Log rrc release event. event_logger::get().log_rrc_disconnect(ue_cell_list.get_ue_cc_idx(UE_PCELL_CC_IDX)->cell_common->enb_cc_idx, static_cast(rrc_idle_transition_cause::release), - static_cast(rel_ies.release_cause), rnti); }