|
|
|
@ -65,53 +65,7 @@ void rrc::init(const rrc_cfg_t& cfg_,
|
|
|
|
|
|
|
|
|
|
if (cfg.sibs[12].type() == asn1::rrc::sys_info_r8_ies_s::sib_type_and_info_item_c_::types::sib13_v920 &&
|
|
|
|
|
cfg.enable_mbsfn) {
|
|
|
|
|
srslte::sib2_mbms_t sibs2;
|
|
|
|
|
sibs2.mbsfn_sf_cfg_list_present = cfg.sibs[1].sib2().mbsfn_sf_cfg_list_present;
|
|
|
|
|
sibs2.nof_mbsfn_sf_cfg = cfg.sibs[1].sib2().mbsfn_sf_cfg_list.size();
|
|
|
|
|
for (int i = 0; i < sibs2.nof_mbsfn_sf_cfg; i++) {
|
|
|
|
|
sibs2.mbsfn_sf_cfg_list[i].nof_alloc_subfrs = srslte::mbsfn_sf_cfg_t::sf_alloc_type_t::one_frame;
|
|
|
|
|
sibs2.mbsfn_sf_cfg_list[i].radioframe_alloc_offset =
|
|
|
|
|
cfg.sibs[1].sib2().mbsfn_sf_cfg_list[i].radioframe_alloc_offset;
|
|
|
|
|
sibs2.mbsfn_sf_cfg_list[i].radioframe_alloc_period =
|
|
|
|
|
(srslte::mbsfn_sf_cfg_t::alloc_period_t)cfg.sibs[1].sib2().mbsfn_sf_cfg_list[i].radioframe_alloc_period.value;
|
|
|
|
|
sibs2.mbsfn_sf_cfg_list[i].sf_alloc =
|
|
|
|
|
(uint32_t)cfg.sibs[1].sib2().mbsfn_sf_cfg_list[i].sf_alloc.one_frame().to_number();
|
|
|
|
|
}
|
|
|
|
|
srslte::sib13_t sibs13;
|
|
|
|
|
sibs13.notif_cfg.notif_offset = cfg.sibs[12].sib13_v920().notif_cfg_r9.notif_offset_r9;
|
|
|
|
|
sibs13.notif_cfg.notif_repeat_coeff =
|
|
|
|
|
(srslte::mbms_notif_cfg_t::coeff_t)cfg.sibs[12].sib13_v920().notif_cfg_r9.notif_repeat_coeff_r9.value;
|
|
|
|
|
sibs13.notif_cfg.notif_sf_idx = cfg.sibs[12].sib13_v920().notif_cfg_r9.notif_sf_idx_r9;
|
|
|
|
|
sibs13.nof_mbsfn_area_info = cfg.sibs[12].sib13_v920().mbsfn_area_info_list_r9.size();
|
|
|
|
|
for (uint32_t i = 0; i < sibs13.nof_mbsfn_area_info; i++) {
|
|
|
|
|
sibs13.mbsfn_area_info_list[i].mbsfn_area_id =
|
|
|
|
|
cfg.sibs[12].sib13_v920().mbsfn_area_info_list_r9[i].mbsfn_area_id_r9;
|
|
|
|
|
sibs13.mbsfn_area_info_list[i].notif_ind = cfg.sibs[12].sib13_v920().mbsfn_area_info_list_r9[i].notif_ind_r9;
|
|
|
|
|
sibs13.mbsfn_area_info_list[i].mcch_cfg.sig_mcs = (srslte::mbsfn_area_info_t::mcch_cfg_t::sig_mcs_t)cfg.sibs[12]
|
|
|
|
|
.sib13_v920()
|
|
|
|
|
.mbsfn_area_info_list_r9[i]
|
|
|
|
|
.mcch_cfg_r9.sig_mcs_r9.value;
|
|
|
|
|
sibs13.mbsfn_area_info_list[i].mcch_cfg.sf_alloc_info =
|
|
|
|
|
cfg.sibs[12].sib13_v920().mbsfn_area_info_list_r9[i].mcch_cfg_r9.sf_alloc_info_r9.to_number();
|
|
|
|
|
sibs13.mbsfn_area_info_list[i].mcch_cfg.mcch_repeat_period =
|
|
|
|
|
(srslte::mbsfn_area_info_t::mcch_cfg_t::repeat_period_t)cfg.sibs[12]
|
|
|
|
|
.sib13_v920()
|
|
|
|
|
.mbsfn_area_info_list_r9[i]
|
|
|
|
|
.mcch_cfg_r9.mcch_repeat_period_r9.value;
|
|
|
|
|
sibs13.mbsfn_area_info_list[i].mcch_cfg.mcch_offset =
|
|
|
|
|
cfg.sibs[12].sib13_v920().mbsfn_area_info_list_r9[i].mcch_cfg_r9.mcch_offset_r9;
|
|
|
|
|
sibs13.mbsfn_area_info_list[i].mcch_cfg.mcch_mod_period =
|
|
|
|
|
(srslte::mbsfn_area_info_t::mcch_cfg_t::mod_period_t)cfg.sibs[12]
|
|
|
|
|
.sib13_v920()
|
|
|
|
|
.mbsfn_area_info_list_r9[i]
|
|
|
|
|
.mcch_cfg_r9.mcch_mod_period_r9.value;
|
|
|
|
|
sibs13.mbsfn_area_info_list[i].non_mbsfn_region_len = (srslte::mbsfn_area_info_t::region_len_t)cfg.sibs[12]
|
|
|
|
|
.sib13_v920()
|
|
|
|
|
.mbsfn_area_info_list_r9[i]
|
|
|
|
|
.non_mbsfn_region_len.value;
|
|
|
|
|
sibs13.mbsfn_area_info_list[i].notif_ind = cfg.sibs[12].sib13_v920().mbsfn_area_info_list_r9[i].notif_ind_r9;
|
|
|
|
|
}
|
|
|
|
|
configure_mbsfn_sibs(&sibs2, &sibs13);
|
|
|
|
|
configure_mbsfn_sibs();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cell_res_list.reset(new freq_res_common_list{cfg});
|
|
|
|
@ -748,8 +702,58 @@ uint32_t rrc::generate_sibs()
|
|
|
|
|
return nof_messages;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void rrc::configure_mbsfn_sibs(srslte::sib2_mbms_t* sib2_, srslte::sib13_t* sib13_)
|
|
|
|
|
void rrc::configure_mbsfn_sibs()
|
|
|
|
|
{
|
|
|
|
|
// populate struct with sib2 values needed in PHY/MAC
|
|
|
|
|
srslte::sib2_mbms_t sibs2;
|
|
|
|
|
sibs2.mbsfn_sf_cfg_list_present = cfg.sibs[1].sib2().mbsfn_sf_cfg_list_present;
|
|
|
|
|
sibs2.nof_mbsfn_sf_cfg = cfg.sibs[1].sib2().mbsfn_sf_cfg_list.size();
|
|
|
|
|
for (int i = 0; i < sibs2.nof_mbsfn_sf_cfg; i++) {
|
|
|
|
|
sibs2.mbsfn_sf_cfg_list[i].nof_alloc_subfrs = srslte::mbsfn_sf_cfg_t::sf_alloc_type_t::one_frame;
|
|
|
|
|
sibs2.mbsfn_sf_cfg_list[i].radioframe_alloc_offset =
|
|
|
|
|
cfg.sibs[1].sib2().mbsfn_sf_cfg_list[i].radioframe_alloc_offset;
|
|
|
|
|
sibs2.mbsfn_sf_cfg_list[i].radioframe_alloc_period =
|
|
|
|
|
(srslte::mbsfn_sf_cfg_t::alloc_period_t)cfg.sibs[1].sib2().mbsfn_sf_cfg_list[i].radioframe_alloc_period.value;
|
|
|
|
|
sibs2.mbsfn_sf_cfg_list[i].sf_alloc =
|
|
|
|
|
(uint32_t)cfg.sibs[1].sib2().mbsfn_sf_cfg_list[i].sf_alloc.one_frame().to_number();
|
|
|
|
|
}
|
|
|
|
|
// populate struct with sib13 values needed for PHY/MAC
|
|
|
|
|
srslte::sib13_t sibs13;
|
|
|
|
|
sibs13.notif_cfg.notif_offset = cfg.sibs[12].sib13_v920().notif_cfg_r9.notif_offset_r9;
|
|
|
|
|
sibs13.notif_cfg.notif_repeat_coeff =
|
|
|
|
|
(srslte::mbms_notif_cfg_t::coeff_t)cfg.sibs[12].sib13_v920().notif_cfg_r9.notif_repeat_coeff_r9.value;
|
|
|
|
|
sibs13.notif_cfg.notif_sf_idx = cfg.sibs[12].sib13_v920().notif_cfg_r9.notif_sf_idx_r9;
|
|
|
|
|
sibs13.nof_mbsfn_area_info = cfg.sibs[12].sib13_v920().mbsfn_area_info_list_r9.size();
|
|
|
|
|
for (uint32_t i = 0; i < sibs13.nof_mbsfn_area_info; i++) {
|
|
|
|
|
sibs13.mbsfn_area_info_list[i].mbsfn_area_id =
|
|
|
|
|
cfg.sibs[12].sib13_v920().mbsfn_area_info_list_r9[i].mbsfn_area_id_r9;
|
|
|
|
|
sibs13.mbsfn_area_info_list[i].notif_ind = cfg.sibs[12].sib13_v920().mbsfn_area_info_list_r9[i].notif_ind_r9;
|
|
|
|
|
sibs13.mbsfn_area_info_list[i].mcch_cfg.sig_mcs = (srslte::mbsfn_area_info_t::mcch_cfg_t::sig_mcs_t)cfg.sibs[12]
|
|
|
|
|
.sib13_v920()
|
|
|
|
|
.mbsfn_area_info_list_r9[i]
|
|
|
|
|
.mcch_cfg_r9.sig_mcs_r9.value;
|
|
|
|
|
sibs13.mbsfn_area_info_list[i].mcch_cfg.sf_alloc_info =
|
|
|
|
|
cfg.sibs[12].sib13_v920().mbsfn_area_info_list_r9[i].mcch_cfg_r9.sf_alloc_info_r9.to_number();
|
|
|
|
|
sibs13.mbsfn_area_info_list[i].mcch_cfg.mcch_repeat_period =
|
|
|
|
|
(srslte::mbsfn_area_info_t::mcch_cfg_t::repeat_period_t)cfg.sibs[12]
|
|
|
|
|
.sib13_v920()
|
|
|
|
|
.mbsfn_area_info_list_r9[i]
|
|
|
|
|
.mcch_cfg_r9.mcch_repeat_period_r9.value;
|
|
|
|
|
sibs13.mbsfn_area_info_list[i].mcch_cfg.mcch_offset =
|
|
|
|
|
cfg.sibs[12].sib13_v920().mbsfn_area_info_list_r9[i].mcch_cfg_r9.mcch_offset_r9;
|
|
|
|
|
sibs13.mbsfn_area_info_list[i].mcch_cfg.mcch_mod_period =
|
|
|
|
|
(srslte::mbsfn_area_info_t::mcch_cfg_t::mod_period_t)cfg.sibs[12]
|
|
|
|
|
.sib13_v920()
|
|
|
|
|
.mbsfn_area_info_list_r9[i]
|
|
|
|
|
.mcch_cfg_r9.mcch_mod_period_r9.value;
|
|
|
|
|
sibs13.mbsfn_area_info_list[i].non_mbsfn_region_len = (srslte::mbsfn_area_info_t::region_len_t)cfg.sibs[12]
|
|
|
|
|
.sib13_v920()
|
|
|
|
|
.mbsfn_area_info_list_r9[i]
|
|
|
|
|
.non_mbsfn_region_len.value;
|
|
|
|
|
sibs13.mbsfn_area_info_list[i].notif_ind = cfg.sibs[12].sib13_v920().mbsfn_area_info_list_r9[i].notif_ind_r9;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// pack MCCH for transmission and pass relevant MCCH values to PHY/MAC
|
|
|
|
|
pack_mcch();
|
|
|
|
|
srslte::mcch_msg_t mcch_t;
|
|
|
|
|
mcch_t.common_sf_alloc_period = srslte::mcch_msg_t::common_sf_alloc_period_t::rf64;
|
|
|
|
@ -775,14 +779,13 @@ void rrc::configure_mbsfn_sibs(srslte::sib2_mbms_t* sib2_, srslte::sib13_t* sib1
|
|
|
|
|
pmch_item->data_mcs = mbms_mcs;
|
|
|
|
|
pmch_item->mch_sched_period = srslte::pmch_info_t::mch_sched_period_t::rf64;
|
|
|
|
|
pmch_item->sf_alloc_end = 64 * 6;
|
|
|
|
|
phy->configure_mbsfn(sib2_, sib13_, mcch_t);
|
|
|
|
|
mac->write_mcch(sib2_, sib13_, &mcch_t, mcch_payload_buffer, current_mcch_length);
|
|
|
|
|
phy->configure_mbsfn(&sibs2, &sibs13, mcch_t);
|
|
|
|
|
mac->write_mcch(&sibs2, &sibs13, &mcch_t, mcch_payload_buffer, current_mcch_length);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int rrc::pack_mcch()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
mcch.msg.set_c1();
|
|
|
|
|
mcch.msg.set_c1();
|
|
|
|
|
mbsfn_area_cfg_r9_s& area_cfg_r9 = mcch.msg.c1().mbsfn_area_cfg_r9();
|
|
|
|
|
area_cfg_r9.common_sf_alloc_period_r9 = mbsfn_area_cfg_r9_s::common_sf_alloc_period_r9_e_::rf64;
|
|
|
|
|