48 hfsm(etl::message_router_id_t
id)
73 do_enters_result result = do_enters(ETL_NULLPTR,
p_first_state,
true);
75 if (result.active_state_id != ifsm_state::No_State_Change)
81 p_state = state_list[result.active_state_id];
83 process_state_change(result.next_state_id);
87 if (have_changed_state(result.next_state_id))
90 p_state = state_list[result.next_state_id];
107 do_exits(ETL_NULLPTR, p_state);
110 p_state = ETL_NULLPTR;
150 while (
s != ETL_NULLPTR)
176 struct do_enters_result
197 do_enters_result result = do_enters(
p_root,
p_target->p_parent,
false);
200 if (result.active_state_id != ifsm_state::No_State_Change)
213 if (
next_state != ifsm_state::No_State_Change)
221 while (
p_target->p_default_child != ETL_NULLPTR)
228 if (
next_state != ifsm_state::No_State_Change)
249 while (p_current->p_active_child != ETL_NULLPTR)
251 p_current = p_current->p_active_child;
255 while (p_current !=
p_root)
257 p_current->on_exit_state();
258 p_current = p_current->p_parent;
267 if (is_self_transition(next_state_id))
269 p_state->on_exit_state();
270 next_state_id = p_state->on_enter_state();
273 while (have_changed_state(next_state_id))
280 do_exits(
p_root, p_state);
283 next_state_id = result.next_state_id;
285 if (result.active_state_id != ifsm_state::No_State_Change)
291 p_state = state_list[result.active_state_id];
295 else if (result.next_state_id != ifsm_state::No_State_Change)
300 p_state = state_list[result.next_state_id];
309 return p_state->get_state_id();