From caf37b8e62eee405273627e3ed4ccd296aa70ad2 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Mon, 5 Oct 2020 17:06:35 +0200 Subject: [PATCH] Added serving cell index in UCI/CSI report trace --- lib/src/phy/phch/uci.c | 4 ++-- srsue/src/phy/cc_worker.cc | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/src/phy/phch/uci.c b/lib/src/phy/phch/uci.c index 1238b18ff..1550f0d6e 100644 --- a/lib/src/phy/phch/uci.c +++ b/lib/src/phy/phch/uci.c @@ -939,10 +939,10 @@ int srslte_uci_data_info(srslte_uci_cfg_t* uci_cfg, srslte_uci_value_t* uci_data n = srslte_print_check(str, str_len, n, ", ri=%d", uci_data->ri); } - char cqi_str[SRSLTE_CQI_STR_MAX_CHAR] = ""; if (uci_cfg->cqi.data_enable) { + char cqi_str[SRSLTE_CQI_STR_MAX_CHAR] = ""; srslte_cqi_value_tostring(&uci_cfg->cqi, &uci_data->cqi, cqi_str, SRSLTE_CQI_STR_MAX_CHAR); - n = srslte_print_check(str, str_len, n, "%s", cqi_str); + n = srslte_print_check(str, str_len, n, "%s (cc=%d)", cqi_str, uci_cfg->cqi.scell_index); } return n; diff --git a/srsue/src/phy/cc_worker.cc b/srsue/src/phy/cc_worker.cc index d50db9de1..7e3b5ea0d 100644 --- a/srsue/src/phy/cc_worker.cc +++ b/srsue/src/phy/cc_worker.cc @@ -822,6 +822,9 @@ uint32_t cc_worker::get_wideband_cqi() void cc_worker::set_uci_periodic_cqi(srslte_uci_data_t* uci_data) { srslte_ue_dl_gen_cqi_periodic(&ue_dl, &ue_dl_cfg, get_wideband_cqi(), CURRENT_TTI_TX, uci_data); + + // Store serving cell index for logging purposes + uci_data->cfg.cqi.scell_index = cc_idx; } void cc_worker::set_uci_aperiodic_cqi(srslte_uci_data_t* uci_data)