From 5f4b0b1e0c3137ac99f0d8d52ff73e371bca498a Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Wed, 29 Apr 2020 10:32:18 +0100 Subject: [PATCH] added default sf_mapping for cqi and sr in the enb parser --- srsenb/src/enb_cfg_parser.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/srsenb/src/enb_cfg_parser.cc b/srsenb/src/enb_cfg_parser.cc index 3ecac6fb8..0ac499ccf 100644 --- a/srsenb/src/enb_cfg_parser.cc +++ b/srsenb/src/enb_cfg_parser.cc @@ -352,9 +352,16 @@ int mbsfn_area_info_list_parser::parse(Setting& root) int field_sf_mapping::parse(libconfig::Setting& root) { - *nof_subframes = root["subframe"].getLength(); - for (uint32_t i = 0; i < *nof_subframes; i++) { - sf_mapping[i] = root["subframe"][i]; + if (root.exists("subframe")) { + *nof_subframes = root["subframe"].getLength(); + for (uint32_t i = 0; i < *nof_subframes; i++) { + sf_mapping[i] = root["subframe"][i]; + } + } else { + *nof_subframes = root["period"]; + for (uint32_t i = 0; i < *nof_subframes; ++i) { + sf_mapping[i] = i; + } } return 0; }