Make SIB2 mbsfn settings optional

master
Ismael Gomez 6 years ago
parent 2e53478a3b
commit 13cba873d5

@ -211,37 +211,37 @@ int enb::parse_sib2(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUC
liblte_rrc_time_alignment_timer_text, LIBLTE_RRC_TIME_ALIGNMENT_TIMER_N_ITEMS) liblte_rrc_time_alignment_timer_text, LIBLTE_RRC_TIME_ALIGNMENT_TIMER_N_ITEMS)
); );
parser::section mbsfnSubframeConfigList("mbsfnSubframeConfigList");
sib2.add_subsection(&mbsfnSubframeConfigList);
sib2.add_field( bool mbsfn_present=false;
mbsfnSubframeConfigList.set_optional(&mbsfn_present);
if (mbsfn_present) {
data->mbsfn_subfr_cnfg_list_size = 1;
}
mbsfnSubframeConfigList.add_field(
new parser::field<uint32> new parser::field<uint32>
("mbsfnSubframeConfigListLength", &data->mbsfn_subfr_cnfg_list_size) ("subframeAllocation", &data->mbsfn_subfr_cnfg_list[0].subfr_alloc)
); );
mbsfnSubframeConfigList.add_field(
new parser::field<uint8>
("radioframeAllocationOffset", &data->mbsfn_subfr_cnfg_list[0].radio_fr_alloc_offset)
);
parser::section mbsfnSubframeConfigList("mbsfnSubframeConfigList"); mbsfnSubframeConfigList.add_field(
sib2.add_subsection(&mbsfnSubframeConfigList); new parser::field_enum_str<LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_ENUM>
("subframeAllocationNumFrames", &data->mbsfn_subfr_cnfg_list[0].subfr_alloc_num_frames,
liblte_rrc_subframe_allocation_num_frames_text,LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_N_ITEMS)
);
mbsfnSubframeConfigList.add_field( mbsfnSubframeConfigList.add_field(
new parser::field<uint32> new parser::field_enum_str<LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_ENUM>
("subframeAllocation", &data->mbsfn_subfr_cnfg_list[0].subfr_alloc) ("radioframeAllocationPeriod", &data->mbsfn_subfr_cnfg_list[0].radio_fr_alloc_period,
); liblte_rrc_radio_frame_allocation_period_text, LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_N_ITEMS)
);
mbsfnSubframeConfigList.add_field(
new parser::field<uint8>
("radioframeAllocationOffset", &data->mbsfn_subfr_cnfg_list[0].radio_fr_alloc_offset)
);
mbsfnSubframeConfigList.add_field(
new parser::field_enum_str<LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_ENUM>
("subframeAllocationNumFrames", &data->mbsfn_subfr_cnfg_list[0].subfr_alloc_num_frames,
liblte_rrc_subframe_allocation_num_frames_text,LIBLTE_RRC_SUBFRAME_ALLOCATION_NUM_FRAMES_N_ITEMS)
);
mbsfnSubframeConfigList.add_field(
new parser::field_enum_str<LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_ENUM>
("radioframeAllocationPeriod", &data->mbsfn_subfr_cnfg_list[0].radio_fr_alloc_period,
liblte_rrc_radio_frame_allocation_period_text, LIBLTE_RRC_RADIO_FRAME_ALLOCATION_PERIOD_N_ITEMS)
);
parser::section freqinfo("freqInfo"); parser::section freqinfo("freqInfo");
sib2.add_subsection(&freqinfo); sib2.add_subsection(&freqinfo);

Loading…
Cancel
Save