Added SS type conversion to string

master
Xavier Arteaga 3 years ago committed by Andre Puschmann
parent 7ba5099bee
commit 63bb86bce1

@ -492,6 +492,13 @@ SRSRAN_API const char* srsran_rnti_type_str(srsran_rnti_type_t rnti_type);
*/
SRSRAN_API const char* srsran_rnti_type_str_short(srsran_rnti_type_t rnti_type);
/**
* @brief Get the Search Space Type string for a given type
* @param ss_type The given Search Space Type
* @return The string describing the SS Type
*/
SRSRAN_API const char* srsran_ss_type_str(srsran_search_space_type_t ss_type);
/**
* @brief Get the RNTI type name for NR
* @param rnti_type RNTI type name

@ -63,6 +63,31 @@ const char* srsran_rnti_type_str_short(srsran_rnti_type_t rnti_type)
return "unknown";
}
const char* srsran_ss_type_str(srsran_search_space_type_t ss_type)
{
switch (ss_type) {
case srsran_search_space_type_common_0:
return "common0";
case srsran_search_space_type_common_0A:
return "common0A";
case srsran_search_space_type_common_1:
return "common1";
case srsran_search_space_type_common_2:
return "common2";
case srsran_search_space_type_common_3:
return "common3";
case srsran_search_space_type_ue:
return "ue";
case srsran_search_space_type_rar:
return "rar";
case srsran_search_space_type_cg:
return "cg";
default:; // Do nothing
break;
}
return "unknown";
}
const char* srsran_dci_format_nr_string(srsran_dci_format_nr_t format)
{
switch (format) {

@ -177,7 +177,7 @@ int srsran_ra_dl_nr_time(const srsran_sch_hl_cfg_nr_t* cfg,
srsran_ra_dl_nr_time_default_A(m, cfg->typeA_pos, grant);
}
} else {
ERROR("Unhandled case %s, ss_type=%d", srsran_rnti_type_str(rnti_type), ss_type);
ERROR("Unhandled case %s, ss_type=%s", srsran_rnti_type_str(rnti_type), srsran_ss_type_str(ss_type));
}
// Validate S and L parameters
@ -340,4 +340,3 @@ uint32_t srsran_ra_nr_type1_riv(uint32_t N_prb, uint32_t start_rb, uint32_t leng
{
return srsran_sliv_from_s_and_l(N_prb, start_rb, length_rb);
}

@ -114,11 +114,12 @@ static int work_ue_dl(srsran_ue_dl_nr_t* ue_dl, srsran_slot_cfg_t* slot)
// Print PDCCH blind search candidates
for (uint32_t i = 0; i < ue_dl->pdcch_info_count; i++) {
const srsran_ue_dl_nr_pdcch_info_t* info = &ue_dl->pdcch_info[i];
INFO("PDCCH: rnti=0x%x, crst_id=%d, ss_type=%d, ncce=%d, al=%d, EPRE=%+.2f, RSRP=%+.2f, corr=%.3f; "
INFO("PDCCH: %s-rnti=0x%x, crst_id=%d, ss_type=%s, ncce=%d, al=%d, EPRE=%+.2f, RSRP=%+.2f, corr=%.3f; "
"nof_bits=%d; crc=%s;",
srsran_rnti_type_str_short(info->dci_ctx.rnti_type),
info->dci_ctx.rnti,
info->dci_ctx.coreset_id,
info->dci_ctx.ss_type,
srsran_ss_type_str(info->dci_ctx.ss_type),
info->dci_ctx.location.ncce,
info->dci_ctx.location.L,
info->measure.epre_dBfs,

@ -175,12 +175,14 @@ void cc_worker::decode_pdcch_dl()
if (logger.debug.enabled()) {
for (uint32_t i = 0; i < ue_dl.pdcch_info_count; i++) {
const srsran_ue_dl_nr_pdcch_info_t* info = &ue_dl.pdcch_info[i];
logger.debug("PDCCH: dci=%s, rnti=%x, crst_id=%d, ss_type=%d, ncce=%d, al=%d, EPRE=%+.2f, RSRP=%+.2f, corr=%.3f; "
logger.debug(
"PDCCH: dci=%s, %s-rnti=%x, crst_id=%d, ss_type=%s, ncce=%d, al=%d, EPRE=%+.2f, RSRP=%+.2f, corr=%.3f; "
"evm=%f; nof_bits=%d; crc=%s;",
srsran_dci_format_nr_string(info->dci_ctx.format),
srsran_rnti_type_str_short(info->dci_ctx.rnti_type),
info->dci_ctx.rnti,
info->dci_ctx.coreset_id,
info->dci_ctx.ss_type,
srsran_ss_type_str(info->dci_ctx.ss_type),
info->dci_ctx.location.ncce,
info->dci_ctx.location.L,
info->measure.epre_dBfs,

Loading…
Cancel
Save