|
Boost : |
Subject: Re: [boost] [msm] Nested submachines and explicit state entry
From: Richard Szabo (sz.richard_at_[hidden])
Date: 2010-06-10 02:12:35
On 9 June 2010 19:36, Christophe Henry
<christophe.j.henry_at_[hidden]> wrote:
>>> 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 Inner1_
>>which is a frontend instead of Inner1 caused that the on initial transition
>>is getting triggered after entry of Inner1
>
> Ah yes I forgot that I corrected that one too.
>
>>I found it even strange that it compiles when the frontend of and
>>inner state machine is used in the outer state machine transition
>>table.
>
> This surprises me a little because I tried with g++ 4.4 to replace in
> the corrected example Inner1 by Inner1_ in SM1's table and the
> compiler correctly complained. What did you do?
Well I have added to the little example a PseudoEntry1 state for the
RunningStateMachine_.
I have added a new row to the RunningStateMachine_ transition table
form the PseudoEntry1
on reception of even1 go to Inner1_ and with VC9 it compiles with both
ways without and error.
1).
_row < PseudoEntry1 , event1 , Inner1_
>,
2).
_row < PseudoEntry1 , event1 , Inner1
>,
see attachment.
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk