configure and start ra proc

Fix crash due to missing init
master
David Rupprecht 4 years ago committed by David Rupprecht
parent 876858b44c
commit a7949e69c8

@ -76,6 +76,10 @@ public:
virtual void setup_lcid(const srslte::logical_channel_config_t& config) = 0;
virtual void set_config(const srslte::bsr_cfg_t& bsr_cfg) = 0;
virtual void set_config(const srslte::sr_cfg_t& sr_cfg) = 0;
virtual void set_config(const srslte::rach_nr_cfg_t& rach_cfg) = 0;
// RRC triggers MAC ra procedure
virtual void start_ra_procedure() = 0;
// RRC informs MAC about the (randomly) selected ID used for contention-based RA
virtual void set_contention_id(const uint64_t ue_identity) = 0;

@ -43,6 +43,8 @@ int mac_nr::init(const mac_nr_args_t& args_, phy_interface_mac_nr* phy_, rlc_int
pcap->open(args.pcap.filename.c_str());
}
proc_ra.init(phy, this, &task_sched);
started = true;
return SRSLTE_SUCCESS;

@ -554,32 +554,37 @@ bool rrc_nr::apply_mac_cell_group(const mac_cell_group_cfg_s& mac_cell_group_cfg
bool rrc_nr::apply_sp_cell_cfg(const sp_cell_cfg_s& sp_cell_cfg)
{
// TODO Setup PHY @andre and @phy interface?
if (sp_cell_cfg.recfg_with_sync_present) {
const recfg_with_sync_s& recfg_with_sync = sp_cell_cfg.recfg_with_sync;
mac->set_crnti(recfg_with_sync.new_ue_id);
if(recfg_with_sync.sp_cell_cfg_common_present){
if(recfg_with_sync.sp_cell_cfg_common.ul_cfg_common_present){
if(recfg_with_sync.sp_cell_cfg_common.ul_cfg_common.init_ul_bwp.rach_cfg_common_present){
// mac->set_rach_common_config();
if (recfg_with_sync.sp_cell_cfg_common_present) {
if (recfg_with_sync.sp_cell_cfg_common.ul_cfg_common_present) {
const bwp_ul_common_s* bwp_ul_common = &recfg_with_sync.sp_cell_cfg_common.ul_cfg_common.init_ul_bwp;
if (bwp_ul_common->rach_cfg_common_present) {
if (bwp_ul_common->rach_cfg_common.type() == setup_release_c<rach_cfg_common_s>::types_opts::setup) {
const rach_cfg_common_s& rach_cfg_common = bwp_ul_common->rach_cfg_common.setup();
rach_nr_cfg_t rach_nr_cfg = make_mac_rach_cfg(rach_cfg_common);
mac->set_config(rach_nr_cfg);
}
}
}
}
mac->start_ra_procedure();
}
return true;
}
bool rrc_nr::apply_cell_group_cfg(const cell_group_cfg_s& cell_group_cfg)
{
if (cell_group_cfg.rlc_bearer_to_add_mod_list_present == true) {
if (cell_group_cfg.rlc_bearer_to_add_mod_list_present) {
for (uint32_t i = 0; i < cell_group_cfg.rlc_bearer_to_add_mod_list.size(); i++) {
apply_rlc_add_mod(cell_group_cfg.rlc_bearer_to_add_mod_list[i]);
}
}
if (cell_group_cfg.mac_cell_group_cfg_present == true) {
if (cell_group_cfg.mac_cell_group_cfg_present) {
apply_mac_cell_group(cell_group_cfg.mac_cell_group_cfg);
}
if (cell_group_cfg.phys_cell_group_cfg_present == true) {
if (cell_group_cfg.phys_cell_group_cfg_present) {
log_h->warning("Not handling physical cell group config");
}
if (cell_group_cfg.sp_cell_cfg_present) {

Loading…
Cancel
Save