[msm] Event does not get processed after exiting an interrupt state
Hi all! I got a state machine with 2 regions. The second region has two states ("Run" and "Interrupt"), one is an interrupt state. The region starts in the non interrupt state, just like in the MSM example "Orthogonal regions, terminate state, event deferring". The event called Ev_Resume leads to a transition from state Interrupt back to state Run. In on_entry() of Run I fire an event which never gets processed. Is at that time the FSM still interrupted, i.e. event processing still blocked? Christopher
Hi Christopher,
I got a state machine with 2 regions. The second region has two states ("Run" and "Interrupt"), one is an interrupt state. The region starts in the non interrupt state, just like in the MSM example "Orthogonal regions, terminate state, event deferring".
The event called Ev_Resume leads to a transition from state Interrupt back to state Run. In on_entry() of Run I fire an event which never gets processed. Is at that time the FSM still interrupted, i.e. event processing still blocked?
Correct. This is the default. Not a great one, but I'm wary of breaking existing code. In your on_entry, the flag is still active. You can override this in the front-end. See http://www.boost.org/doc/libs/1_58_0/libs/msm/doc/HTML/ch03s05.html#d0e2714 I think a better default would be: active_state_switch_after_exit. HTH, Christophe
participants (2)
-
Chrisopher Vogl
-
christophe.j.henry@gmail.com