Boost logo

Boost :

Subject: Re: [boost] [msm] Nested submachines and explicit state entry
From: Michael.Herchel_at_[hidden]
Date: 2010-06-10 03:33:30

Hi Christophe,

>>> There are several reasons to this and it took me a while to figure out
>>> what was happening.
>>> The first one is that there are 2 errors in the example:
>>> RunningStateMachine::Inner1::direct<RunningStateMachine_::Inner1_>
should be:
>>> RunningStateMachine::direct<RunningStateMachine_::Inner1>
>>> As you are directly entering RunningStateMachine, not Inner1.
>>actually I have made 2 mistakes :). One above the second is that I used
>>which is a frontend instead of Inner1 caused that the on initial
>>is getting triggered after entry of Inner1

>Ah yes I forgot that I corrected that one too.

Could you please also correct the documentation regarding explicit entry.
In the documentation you explicitly say that you have to pass the front
end, which is wrong according to you.

MSM Documentation (section: Explicit Entry):
You can then use it as target in a transition with State1 as source:
_row < State1, Event2, SubFsm2::direct< SubFsm2_::SubState2> >
The syntax deserves some explanation. SubFsm2_ is a front end. SubState2
is a nested state, therefore the SubFsm2_::SubState2 syntax. The
containing machine (containing State1 and SubFsm2) refers to the backend
instance (SubFsm2). SubFsm2::direct states that an explicit entry is

So I think the code snippet has to look like as follows (SubFsm2 instead
of SubFsm2_):
_row < State1, Event2, SubFsm2::direct< SubFsm2::SubState2> >


Boost list run by bdawes at, gregod at, cpdaniel at, john at