SRSENB: set UE common PHY configuration in RRC::UE constructor

master
Xavier Arteaga 5 years ago committed by Xavier Arteaga
parent 5893f66364
commit 4c61ffd391

@ -348,9 +348,18 @@ public:
///< UE's Physical layer dedicated configuration
phy_interface_rrc_lte::phy_rrc_dedicated_list_t phy_rrc_dedicated_list = {};
/**
* Setups the PCell physical layer common configuration of the UE from the SIB2 message. This methods is designed to
* be called from the constructor.
*
* @param config ASN1 Common SIB struct carrying the common physical layer parameters
*/
void apply_setup_phy_common(const asn1::rrc::rr_cfg_common_sib_s& config);
/**
* Setups the PCell physical layer dedicated configuration of the UE. This method shall be called from the
* connection setup only.
*
* @param phys_cfg_ded ASN1 Physical layer configuration dedicated
*/
void apply_setup_phy_config(const asn1::rrc::phys_cfg_ded_s& phys_cfg_ded);

@ -1023,6 +1023,9 @@ rrc::ue::ue(rrc* outer_rrc, uint16_t rnti_, const sched_interface::ue_cfg_t& sch
integ_algo = srslte::INTEGRITY_ALGORITHM_ID_EIA0;
cipher_algo = srslte::CIPHERING_ALGORITHM_ID_EEA0;
mobility_handler.reset(new rrc_mobility(this));
// Configure
apply_setup_phy_common(parent->cfg.sibs[1].sib2().rr_cfg_common);
}
rrc_state_t rrc::ue::get_state()
@ -2148,6 +2151,28 @@ void rrc::ue::send_dl_dcch(dl_dcch_msg_s* dl_dcch_msg, srslte::unique_byte_buffe
}
}
void rrc::ue::apply_setup_phy_common(const asn1::rrc::rr_cfg_common_sib_s& config)
{
// Return if no cell is supported
if (phy_rrc_dedicated_list.empty()) {
return;
}
// Flatten common configuration
auto& current_phy_cfg = phy_rrc_dedicated_list[0].phy_cfg;
set_phy_cfg_t_common_prach(&current_phy_cfg, &config.prach_cfg.prach_cfg_info, config.prach_cfg.root_seq_idx);
set_phy_cfg_t_common_pdsch(&current_phy_cfg, config.pdsch_cfg_common);
set_phy_cfg_t_common_pusch(&current_phy_cfg, config.pusch_cfg_common);
set_phy_cfg_t_common_pucch(&current_phy_cfg, config.pucch_cfg_common);
set_phy_cfg_t_common_srs(&current_phy_cfg, config.srs_ul_cfg_common);
set_phy_cfg_t_common_pwr_ctrl(&current_phy_cfg, config.ul_pwr_ctrl_common);
// Send configuration to physical layer
if (parent->phy != nullptr) {
parent->phy->set_config_dedicated(rnti, phy_rrc_dedicated_list);
}
}
void rrc::ue::apply_setup_phy_config(const asn1::rrc::phys_cfg_ded_s& phys_cfg_ded)
{
// Return if no cell is supported

Loading…
Cancel
Save