nas: rename start_attach_request to start_attach_proc

this is to better differentiate from "send_attach_request" that
only packs and send the actual attach request message. The
entire attach procedure may include PLMN search, etc.
master
Andre Puschmann 5 years ago
parent 9239bb14a6
commit 94c6034339

@ -207,7 +207,7 @@ public:
class nas_interface_ue
{
public:
virtual void start_attach_request(srslte::proc_state_t* proc_result, srslte::establishment_cause_t cause_) = 0;
virtual void start_attach_proc(srslte::proc_state_t* proc_result, srslte::establishment_cause_t cause_) = 0;
virtual bool detach_request(const bool switch_off) = 0;
};

@ -60,7 +60,7 @@ public:
bool get_ipv6_addr(uint8_t* ipv6_addr);
// UE interface
void start_attach_request(srslte::proc_state_t* result, srslte::establishment_cause_t cause_) final;
void start_attach_proc(srslte::proc_state_t* result, srslte::establishment_cause_t cause_) final;
bool detach_request(const bool switch_off) final;
void plmn_search_completed(const rrc_interface_nas::found_plmn_t found_plmns[rrc_interface_nas::MAX_FOUND_PLMNS],

@ -167,7 +167,7 @@ bool ue_stack_lte::switch_on()
{
if (running) {
pending_tasks.try_push(ue_queue_id,
[this]() { nas.start_attach_request(nullptr, srslte::establishment_cause_t::mo_sig); });
[this]() { nas.start_attach_proc(nullptr, srslte::establishment_cause_t::mo_sig); });
return true;
}
return false;

@ -338,7 +338,7 @@ void nas::timer_expired(uint32_t timeout_id)
if (timeout_id == t3402.id()) {
nas_log->info("Timer T3402 expired: trying to attach again\n");
attach_attempt_counter = 0; // Sec. 5.5.1.1
start_attach_request(nullptr, srslte::establishment_cause_t::mo_sig);
start_attach_proc(nullptr, srslte::establishment_cause_t::mo_sig);
} else if (timeout_id == t3410.id()) {
// Section 5.5.1.2.6 case c)
attach_attempt_counter++;
@ -357,7 +357,7 @@ void nas::timer_expired(uint32_t timeout_id)
}
} else if (timeout_id == t3411.id()) {
nas_log->info("Timer T3411 expired: trying to attach again\n");
start_attach_request(nullptr, srslte::establishment_cause_t::mo_sig);
start_attach_proc(nullptr, srslte::establishment_cause_t::mo_sig);
} else if (timeout_id == t3421.id()) {
nas_log->info("Timer T3421 expired: entering EMM_STATE_DEREGISTERED\n");
// TODO: TS 24.301 says to resend detach request but doesn't say how often before entering EMM_STATE_DEREGISTERED
@ -365,7 +365,7 @@ void nas::timer_expired(uint32_t timeout_id)
enter_emm_deregistered();
} else if (timeout_id == reattach_timer.id()) {
nas_log->info("Reattach timer expired: trying to attach again\n");
start_attach_request(nullptr, srslte::establishment_cause_t::mo_sig);
start_attach_proc(nullptr, srslte::establishment_cause_t::mo_sig);
} else {
nas_log->error("Timeout from unknown timer id %d\n", timeout_id);
}
@ -379,7 +379,7 @@ void nas::timer_expired(uint32_t timeout_id)
* The function returns true if the UE could attach correctly or false in case of error or timeout during attachment.
*
*/
void nas::start_attach_request(srslte::proc_state_t* result, srslte::establishment_cause_t cause_)
void nas::start_attach_proc(srslte::proc_state_t* result, srslte::establishment_cause_t cause_)
{
nas_log->info("Attach Request with cause %s.\n", to_string(cause_).c_str());
switch (state) {
@ -2380,7 +2380,7 @@ void nas::handle_airplane_mode_sim()
// NAS is deregistered
task_handler->defer_callback(cfg.sim.airplane_t_off_ms, [&]() {
// Disabling airplane mode again
start_attach_request(nullptr, srslte::establishment_cause_t::mo_sig);
start_attach_proc(nullptr, srslte::establishment_cause_t::mo_sig);
airplane_mode_state = DISABLED;
});
}

@ -153,7 +153,7 @@ public:
bool switch_on() final
{
proc_state_t proc_result;
nas->start_attach_request(&proc_result, srslte::establishment_cause_t::mo_data);
nas->start_attach_proc(&proc_result, srslte::establishment_cause_t::mo_data);
while (not proc_result.is_complete()) {
usleep(1000);
}

Loading…
Cancel
Save