mirror of https://github.com/pvnis/srsRAN_4G.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
93 lines
4.1 KiB
C
93 lines
4.1 KiB
C
4 years ago
|
/**
|
||
|
*
|
||
|
* \section COPYRIGHT
|
||
|
*
|
||
4 years ago
|
* Copyright 2013-2021 Software Radio Systems Limited
|
||
4 years ago
|
*
|
||
|
* By using this file, you agree to the terms and conditions set
|
||
|
* forth in the LICENSE file which can be found at the top level of
|
||
|
* the distribution.
|
||
|
*
|
||
|
*/
|
||
|
|
||
4 years ago
|
#ifndef SRSRAN_CSI_NR_H
|
||
|
#define SRSRAN_CSI_NR_H
|
||
4 years ago
|
|
||
|
#include "uci_cfg_nr.h"
|
||
|
|
||
|
/**
|
||
|
* @brief Fills Uplink Control Information data with triggered reports for the given slot
|
||
|
* @param cfg CSI report configuration
|
||
|
* @param slot_idx Slot index within the radio frame
|
||
|
* @param measurements CSI measurements
|
||
|
* @param[out] uci_data Uplink Control Information data
|
||
4 years ago
|
* @return The number CSI reports for transmission if the provided data is valid, SRSRAN_ERROR code otherwise
|
||
4 years ago
|
*/
|
||
4 years ago
|
SRSRAN_API int srsran_csi_generate_reports(const srsran_csi_hl_cfg_t* cfg,
|
||
4 years ago
|
uint32_t slot_idx,
|
||
4 years ago
|
const srsran_csi_measurements_t measurements[SRSRAN_CSI_MAX_NOF_RESOURCES],
|
||
|
srsran_csi_report_cfg_t report_cfg[SRSRAN_CSI_MAX_NOF_REPORT],
|
||
|
srsran_csi_report_value_t report_value[SRSRAN_CSI_MAX_NOF_REPORT]);
|
||
4 years ago
|
|
||
|
/**
|
||
|
* @brief Compute number of CSI bits necessary to transmit all the CSI reports for a PUCCH transmission
|
||
|
* @param report_list Provides the CSI report list
|
||
|
* @param nof_reports Number of CSI reports in the list
|
||
4 years ago
|
* @return The number of bits if the provided list is valid, SRSRAN_ERROR code otherwise
|
||
4 years ago
|
*/
|
||
4 years ago
|
SRSRAN_API int srsran_csi_part1_nof_bits(const srsran_csi_report_cfg_t* report_list, uint32_t nof_reports);
|
||
4 years ago
|
|
||
4 years ago
|
/**
|
||
|
* @brief Checks if the report list contains part 2 CSI report
|
||
|
* @param report_list Report list
|
||
|
* @param nof_reports Number of reports in the list
|
||
|
* @return True if at least one report contains part 2, false otherwise
|
||
|
*/
|
||
4 years ago
|
SRSRAN_API bool srsran_csi_has_part2(const srsran_csi_report_cfg_t* report_list, uint32_t nof_reports);
|
||
4 years ago
|
|
||
4 years ago
|
/**
|
||
4 years ago
|
* @brief Pack CSI part 1 bits for a PUCCH or PUSCH transmission
|
||
4 years ago
|
* @param report_list Provides the CSI report list
|
||
|
* @param nof_reports Number of CSI reports in the list
|
||
|
* @param o_csi1 CSI bits
|
||
|
* @param max_o_csi1 Maximum number of CSI bits
|
||
4 years ago
|
* @return number of packed bits if provided data is valid, SRSRAN_ERROR code otherwise
|
||
4 years ago
|
*/
|
||
4 years ago
|
SRSRAN_API int srsran_csi_part1_pack(const srsran_csi_report_cfg_t* report_cfg,
|
||
|
const srsran_csi_report_value_t* report_value,
|
||
4 years ago
|
uint32_t nof_reports,
|
||
|
uint8_t* o_csi1,
|
||
|
uint32_t max_o_csi1);
|
||
|
|
||
4 years ago
|
/**
|
||
|
*@brief Unpacks CSI part 1 bits for PUCCH or PUSCH transmission
|
||
|
* @param report_list Provides the CSI report list
|
||
|
* @param nof_reports Number of CSI reports in the list
|
||
|
* @param o_csi1 CSI bits
|
||
|
* @param max_o_csi1 Maximum number of CSI bits
|
||
|
* @param report_value
|
||
4 years ago
|
* @return SRSRAN_SUCCESS if provided data is valid, SRSRAN_ERROR code otherwise
|
||
4 years ago
|
*/
|
||
4 years ago
|
SRSRAN_API int srsran_csi_part1_unpack(const srsran_csi_report_cfg_t* report_cfg,
|
||
4 years ago
|
uint32_t nof_reports,
|
||
|
uint8_t* o_csi1,
|
||
|
uint32_t max_o_csi1,
|
||
4 years ago
|
srsran_csi_report_value_t* report_value);
|
||
4 years ago
|
|
||
4 years ago
|
/**
|
||
|
* @brief Converts to string a given list of CSI reports
|
||
|
* @param report_cfg Report configuration list
|
||
|
* @param report_value Report value list
|
||
|
* @param nof_reports Number of reports
|
||
|
* @param str String pointer
|
||
|
* @param str_len Maximum string length
|
||
|
* @return Number of used characters
|
||
|
*/
|
||
4 years ago
|
SRSRAN_API uint32_t srsran_csi_str(const srsran_csi_report_cfg_t* report_cfg,
|
||
|
const srsran_csi_report_value_t* report_value,
|
||
4 years ago
|
uint32_t nof_reports,
|
||
|
char* str,
|
||
|
uint32_t str_len);
|
||
|
|
||
4 years ago
|
#endif // SRSRAN_CSI_NR_H
|