Hi,
I am using Boost 1.47.0, and wrote a state machine in MSM with 2
parallel regions. In each region, one state has a flag defined.
According to the documentation, when I ask the flag the following way:
sm.is_flag_active()
then it returns true if both regions are in a state with the flag.
However, it doesn't work for me.
I have attached an example of this problem. It has the states
Stopped1, Started1 and Stopped2, Started2 for the two regions
respectively. The states Started1 and Started2 has the flag
FlagStarted attached. The flag is checked after each call of
process_event. The output of the program is the following:
Entering Stopped1
Entering Stopped2
(sm.is_flag_active()): no
(sm.is_flag_active()): no
Leaving Stopped1
Entering Started1
(sm.is_flag_active()): yes
(sm.is_flag_active()): no
Leaving Stopped2
Entering Started2
(sm.is_flag_active()): yes
(sm.is_flag_active()): no
After the second transition, we are in state (Started1, Started2). The
flag should be active here, but it isn't. Is there a problem with MSM,
or am I doing something wrong?
--
Péter