|
|
|
@ -16,8 +16,59 @@ using namespace asn1::rrc_nr;
|
|
|
|
|
|
|
|
|
|
namespace srsenb {
|
|
|
|
|
|
|
|
|
|
srslog::basic_logger& get_logger(const rrc_nr_cfg_t& cfg)
|
|
|
|
|
{
|
|
|
|
|
static srslog::basic_logger& log_obj = srslog::fetch_basic_logger(cfg.log_name);
|
|
|
|
|
return log_obj;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int fill_csi_report_from_enb_cfg(const rrc_nr_cfg_t& cfg, csi_meas_cfg_s& csi_meas_cfg)
|
|
|
|
|
{
|
|
|
|
|
csi_meas_cfg.csi_report_cfg_to_add_mod_list_present = true;
|
|
|
|
|
csi_meas_cfg.csi_report_cfg_to_add_mod_list.resize(1);
|
|
|
|
|
|
|
|
|
|
auto& csi_report = csi_meas_cfg.csi_report_cfg_to_add_mod_list[0];
|
|
|
|
|
csi_report.report_cfg_id = 0;
|
|
|
|
|
csi_report.res_for_ch_meas = 0;
|
|
|
|
|
csi_report.csi_im_res_for_interference_present = true;
|
|
|
|
|
csi_report.csi_im_res_for_interference = 1;
|
|
|
|
|
csi_report.report_cfg_type.set_periodic();
|
|
|
|
|
csi_report.report_cfg_type.periodic().report_slot_cfg.set_slots80();
|
|
|
|
|
csi_report.report_cfg_type.periodic().pucch_csi_res_list.resize(1);
|
|
|
|
|
csi_report.report_cfg_type.periodic().pucch_csi_res_list[0].ul_bw_part_id = 0;
|
|
|
|
|
csi_report.report_cfg_type.periodic().pucch_csi_res_list[0].pucch_res = 1; // was 17 in orig PCAP
|
|
|
|
|
csi_report.report_quant.set_cri_ri_pmi_cqi();
|
|
|
|
|
// Report freq config (optional)
|
|
|
|
|
csi_report.report_freq_cfg_present = true;
|
|
|
|
|
csi_report.report_freq_cfg.cqi_format_ind_present = true;
|
|
|
|
|
csi_report.report_freq_cfg.cqi_format_ind =
|
|
|
|
|
asn1::rrc_nr::csi_report_cfg_s::report_freq_cfg_s_::cqi_format_ind_opts::wideband_cqi;
|
|
|
|
|
csi_report.time_restrict_for_ch_meass = asn1::rrc_nr::csi_report_cfg_s::time_restrict_for_ch_meass_opts::not_cfgured;
|
|
|
|
|
csi_report.time_restrict_for_interference_meass =
|
|
|
|
|
asn1::rrc_nr::csi_report_cfg_s::time_restrict_for_interference_meass_opts::not_cfgured;
|
|
|
|
|
csi_report.group_based_beam_report.set_disabled();
|
|
|
|
|
// Skip CQI table (optional)
|
|
|
|
|
csi_report.cqi_table_present = true;
|
|
|
|
|
csi_report.cqi_table = asn1::rrc_nr::csi_report_cfg_s::cqi_table_opts::table2;
|
|
|
|
|
csi_report.subband_size = asn1::rrc_nr::csi_report_cfg_s::subband_size_opts::value1;
|
|
|
|
|
|
|
|
|
|
if (cfg.cell_list[0].duplex_mode == SRSRAN_DUPLEX_MODE_FDD) {
|
|
|
|
|
csi_report.report_cfg_type.periodic().report_slot_cfg.slots80() = 5;
|
|
|
|
|
} else {
|
|
|
|
|
csi_report.report_cfg_type.periodic().report_slot_cfg.slots80() = 7;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return SRSRAN_SUCCESS;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int fill_csi_meas_from_enb_cfg(const rrc_nr_cfg_t& cfg, csi_meas_cfg_s& csi_meas_cfg)
|
|
|
|
|
{
|
|
|
|
|
// Fill CSI Report
|
|
|
|
|
if (fill_csi_report_from_enb_cfg(cfg, csi_meas_cfg) != SRSRAN_SUCCESS) {
|
|
|
|
|
get_logger(cfg).error("Failed to configure eNB CSI Report");
|
|
|
|
|
return SRSRAN_ERROR;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Fill NZP-CSI Resources
|
|
|
|
|
csi_meas_cfg.nzp_csi_rs_res_to_add_mod_list_present = true;
|
|
|
|
|
if (cfg.cell_list[0].duplex_mode == SRSRAN_DUPLEX_MODE_FDD) {
|
|
|
|
|