Report the SIB9 home enb name in the enb sector start/sector stop events.

master
faluco 3 years ago committed by faluco
parent 2fd3ed789a
commit 934802d23c

@ -44,10 +44,10 @@ public:
virtual void log_s1_ctx_delete(uint32_t enb_cc_idx, uint32_t mme_id, uint32_t enb_id, uint16_t rnti) = 0; virtual void log_s1_ctx_delete(uint32_t enb_cc_idx, uint32_t mme_id, uint32_t enb_id, uint16_t rnti) = 0;
/// Logs into the underlying log channel when a sector has been started. /// Logs into the underlying log channel when a sector has been started.
virtual void log_sector_start(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) = 0; virtual void log_sector_start(uint32_t cc_idx, uint32_t pci, uint32_t cell_id, const std::string &hnb_name) = 0;
/// Logs into the underlying log channel when a sector has been stopped. /// Logs into the underlying log channel when a sector has been stopped.
virtual void log_sector_stop(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) = 0; virtual void log_sector_stop(uint32_t cc_idx, uint32_t pci, uint32_t cell_id, const std::string &hnb_name) = 0;
/// Logs into the underlying log channel a measurement report event. /// Logs into the underlying log channel a measurement report event.
virtual void log_measurement_report(uint32_t enb_cc_idx, virtual void log_measurement_report(uint32_t enb_cc_idx,

@ -33,8 +33,8 @@ public:
{} {}
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_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_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 {} void log_sector_start(uint32_t cc_idx, uint32_t pci, uint32_t cell_id, const std::string& hnb_name) override {}
void log_sector_stop(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) override {} void log_sector_stop(uint32_t cc_idx, uint32_t pci, uint32_t cell_id, const std::string& hnb_name) override {}
void log_measurement_report(uint32_t enb_cc_idx, void log_measurement_report(uint32_t enb_cc_idx,
const std::string& asn1_oct_str, const std::string& asn1_oct_str,
const std::string& asn1_txt_str, const std::string& asn1_txt_str,
@ -236,7 +236,7 @@ public:
event_channel(ctx); event_channel(ctx);
} }
void log_sector_start(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) override void log_sector_start(uint32_t cc_idx, uint32_t pci, uint32_t cell_id, const std::string& hnb_name) override
{ {
register_pci(cc_idx, pci); register_pci(cc_idx, pci);
@ -249,11 +249,11 @@ public:
ctx.write<metric_event_name>("sector_start"); ctx.write<metric_event_name>("sector_start");
ctx.get<mset_sector_event>().write<metric_pci>(pci); ctx.get<mset_sector_event>().write<metric_pci>(pci);
ctx.get<mset_sector_event>().write<metric_cell_identity>(fmt::to_string(cell_id)); ctx.get<mset_sector_event>().write<metric_cell_identity>(fmt::to_string(cell_id));
ctx.get<mset_sector_event>().write<metric_sib9_home_enb_name>("TODO"); ctx.get<mset_sector_event>().write<metric_sib9_home_enb_name>(hnb_name);
event_channel(ctx); event_channel(ctx);
} }
void log_sector_stop(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) override void log_sector_stop(uint32_t cc_idx, uint32_t pci, uint32_t cell_id, const std::string& hnb_name) override
{ {
sector_event_t ctx(""); sector_event_t ctx("");
@ -264,7 +264,7 @@ public:
ctx.write<metric_event_name>("sector_stop"); ctx.write<metric_event_name>("sector_stop");
ctx.get<mset_sector_event>().write<metric_pci>(pci); ctx.get<mset_sector_event>().write<metric_pci>(pci);
ctx.get<mset_sector_event>().write<metric_cell_identity>(fmt::to_string(cell_id)); ctx.get<mset_sector_event>().write<metric_cell_identity>(fmt::to_string(cell_id));
ctx.get<mset_sector_event>().write<metric_sib9_home_enb_name>("TODO"); ctx.get<mset_sector_event>().write<metric_sib9_home_enb_name>(hnb_name);
event_channel(ctx); event_channel(ctx);
} }

@ -102,8 +102,10 @@ int enb::init(const all_args_t& args_)
started = true; // set to true in any case to allow stopping the eNB if an error happened started = true; // set to true in any case to allow stopping the eNB if an error happened
// Now that everything is setup, log sector start events. // Now that everything is setup, log sector start events.
const std::string& sib9_hnb_name =
rrc_cfg.sibs[8].sib9().hnb_name_present ? rrc_cfg.sibs[8].sib9().hnb_name.to_string() : "";
for (unsigned i = 0, e = rrc_cfg.cell_list.size(); i != e; ++i) { for (unsigned i = 0, e = rrc_cfg.cell_list.size(); i != e; ++i) {
event_logger::get().log_sector_start(i, rrc_cfg.cell_list[i].pci, rrc_cfg.cell_list[i].cell_id); event_logger::get().log_sector_start(i, rrc_cfg.cell_list[i].pci, rrc_cfg.cell_list[i].cell_id, sib9_hnb_name);
} }
if (ret == SRSRAN_SUCCESS) { if (ret == SRSRAN_SUCCESS) {
@ -134,8 +136,10 @@ void enb::stop()
} }
// Now that everything is teared down, log sector stop events. // Now that everything is teared down, log sector stop events.
const std::string& sib9_hnb_name =
rrc_cfg.sibs[8].sib9().hnb_name_present ? rrc_cfg.sibs[8].sib9().hnb_name.to_string() : "";
for (unsigned i = 0, e = rrc_cfg.cell_list.size(); i != e; ++i) { for (unsigned i = 0, e = rrc_cfg.cell_list.size(); i != e; ++i) {
event_logger::get().log_sector_stop(i, rrc_cfg.cell_list[i].pci, rrc_cfg.cell_list[i].cell_id); event_logger::get().log_sector_stop(i, rrc_cfg.cell_list[i].pci, rrc_cfg.cell_list[i].cell_id, sib9_hnb_name);
} }
started = false; started = false;

Loading…
Cancel
Save