[msm] is that correct behavior?

Hi Christophe, For an fsm with orthogonal regions if any region rejects an event (guard returns false), the library blocks all anonymous transitions. for example, an fsm has two regions. Region 0 returns HANDLED_TRUE, region 1 returns HANDLED_GUARD_REJECT for the same event. region_processing_helper combines it into a single "HANDLED_TRUE | HANDLED_GUARD_REJECT" value. However function process_event_internal<> (state_machine.hpp) creates handle_eventless_transitions_helper that takes (handled == HANDLED_TRUE) as a condition for allowing transitions. should it be (handled & HANDLED_TRUE)? as a result, fsm is stuck in event that has an anonymous transition to another event. PS. I've seen the same condition (handled == HANDLED_TRUE) in do_post_handle_deferred function, but I do not use deferred events so I did not check that part.

For an fsm with orthogonal regions if any region rejects an event (guard returns false), the library blocks all anonymous transitions.
for example, an fsm has two regions. Region 0 returns HANDLED_TRUE, region 1 returns HANDLED_GUARD_REJECT for the same event. region_processing_helper combines it into a single "HANDLED_TRUE | HANDLED_GUARD_REJECT" value.
However function process_event_internal<> (state_machine.hpp) creates handle_eventless_transitions_helper that takes (handled == HANDLED_TRUE) as a condition for allowing transitions.
should it be (handled & HANDLED_TRUE)?
as a result, fsm is stuck in event that has an anonymous transition to another event.
PS. I've seen the same condition (handled == HANDLED_TRUE) in do_post_handle_deferred function, but I do not use deferred events so I did not check that part.
Hi, you're right, it clearly is a bug. I took some time to think if your solution is correct and I think it is, so I committed it into the develop branch. Thanks for the report and fix, Christophe
participants (2)
-
christophe.j.henry@gmail.com
-
Sam Fisher