Boost logo

Boost Users :

Subject: Re: [Boost-users] Accessing MSM attribute under specific conditions causes non-compile
From: Chiem Whua Ma (boost.reg_at_[hidden])
Date: 2012-09-06 01:02:12


Hi again.

I understand what you are saying and I guess the real problem comes down to
my (mis)understanding. The fsm object, as written, isn't a state machine
-- rather it's a composite state. The fsm object itself represents the
outer shell state, and the states inside the fsm represent the submachine.
This is very clear when using a fsm as a sub-state-machine, but not so
clear from the top level.

Now that I better understand what's going on, I can see that you
implmentation is indeed fully correct, it's just confusing to me because of
nomenclature.

I guess if there were any change, it would be to rename fsm's to
"composite_states", and then write in the documentation that the top-level
FSM is always composed of a single composite_state which you call directly,
as the only difference between a composite state and an fsm is that an fsm
would not normally have an entry and exit action.

This is even more clear when I note that having an entry action on both the
FSM and the initial state "seems redundant." And it is, but only for the
top-most level composite state. For composite state embedded in other
machines, history could cause the entry action on the composite state to be
called, but the not the entry action on the (normally) initial state.

As it seems too late for a change of that magnitude, I'll just have to
content myself with a better understanding of what's going on...

Thanks for taking your time to help.

-Chiem



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net