From f1c05f6826a34426066cf53df3b4361531e2ef90 Mon Sep 17 00:00:00 2001 From: Francisco Date: Tue, 8 Dec 2020 16:25:51 +0000 Subject: [PATCH] add sector id to ues in mac metrics --- srsenb/src/stack/mac/ue.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/srsenb/src/stack/mac/ue.cc b/srsenb/src/stack/mac/ue.cc index 7ece3521b..b2c596af6 100644 --- a/srsenb/src/stack/mac/ue.cc +++ b/srsenb/src/stack/mac/ue.cc @@ -525,6 +525,11 @@ void ue::metrics_read(mac_metrics_t* metrics_) metrics.ul_buffer = sched->get_ul_buffer(rnti); metrics.dl_buffer = sched->get_dl_buffer(rnti); + // set PCell sector id + std::array cc_list = sched->get_enb_ue_cc_map(rnti); + auto it = std::find(cc_list.begin(), cc_list.end(), 0); + metrics.cc_idx = std::distance(cc_list.begin(), it); + memcpy(metrics_, &metrics, sizeof(mac_metrics_t)); phr_counter = 0;