set RRC args by-value

master
Andre Puschmann 6 years ago
parent c012a6ea83
commit bd59d72b9f

@ -280,7 +280,7 @@ public:
void stop(); void stop();
rrc_state_t get_state(); rrc_state_t get_state();
void set_args(rrc_args_t *args); void set_args(rrc_args_t args);
// Timeout callback interface // Timeout callback interface
void timer_expired(uint32_t timeout_id); void timer_expired(uint32_t timeout_id);

@ -232,7 +232,10 @@ bool ue::init(all_args_t *args_) {
args->rrc.supported_bands[0] = srslte_band_get_band(args->rf.dl_earfcn); args->rrc.supported_bands[0] = srslte_band_get_band(args->rf.dl_earfcn);
args->rrc.nof_supported_bands = 1; args->rrc.nof_supported_bands = 1;
args->rrc.ue_category = atoi(args->ue_category_str.c_str()); args->rrc.ue_category = atoi(args->ue_category_str.c_str());
rrc.set_args(&args->rrc);
// set args and initialize RRC
rrc.set_args(args->rrc);
rrc.init(&phy, &mac, &rlc, &pdcp, &nas, usim, &gw, &mac, &rrc_log);
// Currently EARFCN list is set to only one frequency as indicated in ue.conf // Currently EARFCN list is set to only one frequency as indicated in ue.conf
std::vector<uint32_t> earfcn_list; std::vector<uint32_t> earfcn_list;

@ -237,8 +237,8 @@ bool rrc::have_drb() {
return drb_up; return drb_up;
} }
void rrc::set_args(rrc_args_t *args) { void rrc::set_args(rrc_args_t args_) {
memcpy(&this->args, args, sizeof(rrc_args_t)); args = args_;
} }
/* /*

Loading…
Cancel
Save