Added RNTI type short string

This commit is contained in:
Xavier Arteaga 2021-05-04 13:13:38 +02:00 committed by Xavier Arteaga
parent 5e6983f8e6
commit b02a0d3db9
2 changed files with 30 additions and 0 deletions

View File

@ -478,6 +478,13 @@ typedef struct SRSRAN_API {
*/
SRSRAN_API const char* srsran_rnti_type_str(srsran_rnti_type_t rnti_type);
/**
* @brief Get the short RNTI type name for NR
* @param rnti_type RNTI type name
* @return Constant string with the short RNTI type name
*/
SRSRAN_API const char* srsran_rnti_type_str_short(srsran_rnti_type_t rnti_type);
/**
* @brief Get the RNTI type name for NR
* @param rnti_type RNTI type name

View File

@ -37,6 +37,29 @@ const char* srsran_rnti_type_str(srsran_rnti_type_t rnti_type)
}
return "unknown";
}
const char* srsran_rnti_type_str_short(srsran_rnti_type_t rnti_type)
{
switch (rnti_type) {
case srsran_rnti_type_c:
return "c";
case srsran_rnti_type_p:
return "p";
case srsran_rnti_type_si:
return "si";
case srsran_rnti_type_ra:
return "ra";
case srsran_rnti_type_tc:
return "tc";
case srsran_rnti_type_cs:
return "cs";
case srsran_rnti_type_sp_csi:
return "sp-csi";
case srsran_rnti_type_mcs_c:
return "mcs-c";
default:; // Do nothing
}
return "unknown";
}
const char* srsran_dci_format_nr_string(srsran_dci_format_nr_t format)
{