set RRC args by-value

This commit is contained in:
Andre Puschmann 2018-07-13 13:09:16 +02:00
parent c012a6ea83
commit bd59d72b9f
3 changed files with 7 additions and 4 deletions

View File

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

View File

@ -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.nof_supported_bands = 1;
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
std::vector<uint32_t> earfcn_list;

View File

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