simplified power off state transition

master
Francisco Paisana 5 years ago committed by Francisco Paisana
parent ff988127fe
commit 4ac07e5abb

@ -317,9 +317,10 @@ protected:
auto react(emm_ta_updating_initiated& s, tau_outcome_ev ev) -> to_state<emm_registered>; auto react(emm_ta_updating_initiated& s, tau_outcome_ev ev) -> to_state<emm_registered>;
auto react(emm_ta_updating_initiated& s, tau_reject_other_cause_ev ev) -> to_state<emm_deregistered>; auto react(emm_ta_updating_initiated& s, tau_reject_other_cause_ev ev) -> to_state<emm_deregistered>;
auto react(emm_deregistered_initiated& s, detach_accept_ev ev) -> to_state<emm_deregistered>; auto react(emm_deregistered_initiated& s, detach_accept_ev ev) -> to_state<emm_deregistered>;
template <typename AnyState, // on power-off go to deregistered state. Disable react if we are already in deregistered
typename = typename std::enable_if<not std::is_same<AnyState, emm_deregistered>::value>::type> template <typename AnyState>
auto react(AnyState& s, power_off_ev ev) -> to_state<emm_deregistered>; auto react(AnyState& s, power_off_ev ev) -> to_state<emm_deregistered>;
auto react(emm_deregistered& s, power_off_ev ev) -> srslte::same_state { return {}; }
state_list<emm_null_st, state_list<emm_null_st,
emm_deregistered, emm_deregistered,
@ -398,7 +399,7 @@ auto nas_fsm::react(emm_deregistered_initiated& s, detach_accept_ev ev) -> to_st
LOGEVENT(); LOGEVENT();
return {}; return {};
} }
template <typename AnyState, typename> template <typename AnyState>
auto nas_fsm::react(AnyState& s, power_off_ev ev) -> to_state<emm_deregistered> auto nas_fsm::react(AnyState& s, power_off_ev ev) -> to_state<emm_deregistered>
{ {
LOGEVENT(); LOGEVENT();

Loading…
Cancel
Save