From 68acad25c6b93f3bebb1822a4902b89a552e600b Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Tue, 25 Aug 2020 11:30:33 +0100 Subject: [PATCH] altered default SR and CQI mapping in rr.conf parsing to avoid collisions --- srsenb/src/enb_cfg_parser.cc | 10 +++++----- srsenb/src/enb_cfg_parser.h | 8 +++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/srsenb/src/enb_cfg_parser.cc b/srsenb/src/enb_cfg_parser.cc index d738b7f46..10acdacae 100644 --- a/srsenb/src/enb_cfg_parser.cc +++ b/srsenb/src/enb_cfg_parser.cc @@ -359,9 +359,9 @@ int field_sf_mapping::parse(libconfig::Setting& root) sf_mapping[i] = root["subframe"][i]; } } else { - *nof_subframes = root["period"]; - for (uint32_t i = 0; i < *nof_subframes; ++i) { - sf_mapping[i] = i; + *nof_subframes = static_cast(root["period"]) / 2; + for (uint32_t i = 0; i < *nof_subframes; i++) { + sf_mapping[i] = i * 2 + default_offset; } } return 0; @@ -635,7 +635,7 @@ int parse_rr(all_args_t* args_, rrc_cfg_t* rrc_cfg_) sched_request_cnfg.add_field(make_asn1_enum_number_parser("dsr_trans_max", &rrc_cfg_->sr_cfg.dsr_max)); sched_request_cnfg.add_field(new parser::field("period", &rrc_cfg_->sr_cfg.period)); sched_request_cnfg.add_field(new parser::field("nof_prb", &rrc_cfg_->sr_cfg.nof_prb)); - sched_request_cnfg.add_field(new field_sf_mapping(rrc_cfg_->sr_cfg.sf_mapping, &rrc_cfg_->sr_cfg.nof_subframes)); + sched_request_cnfg.add_field(new field_sf_mapping(rrc_cfg_->sr_cfg.sf_mapping, &rrc_cfg_->sr_cfg.nof_subframes, 0)); parser::section cqi_report_cnfg("cqi_report_cnfg"); phy_cfg_.add_subsection(&cqi_report_cnfg); @@ -646,7 +646,7 @@ int parse_rr(all_args_t* args_, rrc_cfg_t* rrc_cfg_) cqi_report_cnfg.add_field(new parser::field("m_ri", &rrc_cfg_->cqi_cfg.m_ri)); cqi_report_cnfg.add_field(new parser::field("nof_prb", &rrc_cfg_->cqi_cfg.nof_prb)); cqi_report_cnfg.add_field(new parser::field("simultaneousAckCQI", &rrc_cfg_->cqi_cfg.simultaneousAckCQI)); - cqi_report_cnfg.add_field(new field_sf_mapping(rrc_cfg_->cqi_cfg.sf_mapping, &rrc_cfg_->cqi_cfg.nof_subframes)); + cqi_report_cnfg.add_field(new field_sf_mapping(rrc_cfg_->cqi_cfg.sf_mapping, &rrc_cfg_->cqi_cfg.nof_subframes, 1)); /* RRC config section */ parser::section rrc_cnfg("cell_list"); diff --git a/srsenb/src/enb_cfg_parser.h b/srsenb/src/enb_cfg_parser.h index 706cd5b65..a86034531 100644 --- a/srsenb/src/enb_cfg_parser.h +++ b/srsenb/src/enb_cfg_parser.h @@ -140,10 +140,11 @@ private: class field_sf_mapping : public parser::field_itf { public: - field_sf_mapping(uint32_t* sf_mapping_, uint32_t* nof_subframes_) + field_sf_mapping(uint32_t* sf_mapping_, uint32_t* nof_subframes_, uint32_t default_offset_) { - sf_mapping = sf_mapping_; - nof_subframes = nof_subframes_; + sf_mapping = sf_mapping_; + nof_subframes = nof_subframes_; + default_offset = default_offset_; } int parse(Setting& root) override; const char* get_name() override { return "sf_mapping"; } @@ -151,6 +152,7 @@ public: private: uint32_t* sf_mapping; uint32_t* nof_subframes; + uint32_t default_offset; }; class field_qci final : public parser::field_itf