Added short NR CSI information

master
Xavier Arteaga 3 years ago
parent 73260fb335
commit 003c6e524c

@ -645,7 +645,7 @@ SRSRAN_API bool srsran_duplex_nr_is_ul(const srsran_duplex_config_nr_t* cfg, uin
SRSRAN_API int srsran_carrier_to_cell(const srsran_carrier_nr_t* carrier, srsran_cell_t* cell);
/**
* @brief Writes Channel State Information measurement into a string
* @brief Writes detailed Channel State Information measurement into a string
* @param meas Provides the measurement
* @param str Provides string
* @param str_len Maximum string length
@ -653,6 +653,15 @@ SRSRAN_API int srsran_carrier_to_cell(const srsran_carrier_nr_t* carrier, srsran
*/
SRSRAN_API uint32_t srsran_csi_meas_info(const srsran_csi_trs_measurements_t* meas, char* str, uint32_t str_len);
/**
* @brief Writes short Channel State Information measurement into a string
* @param meas Provides the measurement
* @param str Provides string
* @param str_len Maximum string length
* @return The number of writen characters
*/
SRSRAN_API uint32_t srsran_csi_meas_info_short(const srsran_csi_trs_measurements_t* meas, char* str, uint32_t str_len);
/**
* @brief Converts a given string into a subcarrier spacing
* @param str Provides the string

@ -434,6 +434,22 @@ uint32_t srsran_csi_meas_info(const srsran_csi_trs_measurements_t* meas, char* s
meas->delay_us);
}
uint32_t srsran_csi_meas_info_short(const srsran_csi_trs_measurements_t* meas, char* str, uint32_t str_len)
{
if (meas == NULL || str == NULL || str_len == 0) {
return 0;
}
return srsran_print_check(str,
str_len,
0,
"epre=%+.1f snr=%+.1f cfo=%+.1f delay=%+.1f ",
meas->epre_dB,
meas->snr_dB,
meas->cfo_hz,
meas->delay_us);
}
srsran_subcarrier_spacing_t srsran_subcarrier_spacing_from_str(const char* str)
{
if (str == NULL) {

Loading…
Cancel
Save