Re: [Boost-users] [msm] EUML submachine without macro
Christophe Henry wrote:
you're just a little too fast as I added the example in the 1.47 release. In the meantime, the submachine example can be found there: http://svn.boost.org/svn/boost/trunk/libs/msm/doc/HTML/examples/CompositeTut...
Thank you for quick reply! Works like a charm. Kudos for your excellent library! Best Regards, Ray
you're just a little too fast as I added the example in the 1.47 release. In the meantime, the submachine example can be found there: http://svn.boost.org/svn/boost/trunk/libs/msm/doc/HTML/examples/CompositeTut...
Thank you for quick reply! Works like a charm. Kudos for your excellent library!
Best Regards, Ray
Thanks :) Have fun with the library! Regards, Christophe
Hi Christophe,
I have an addition question regarding the pseudo exit point.
The following code adds a pseudo exit point to your
CompositeTutorialWithEumlTable.cpp example:
// Exit event
struct exit_impl : msm::front::euml::euml_event
Hi Christophe,
I have an addition question regarding the pseudo exit point.
The following code adds a pseudo exit point to your CompositeTutorialWithEumlTable.cpp example:
// Exit event struct exit_impl : msm::front::euml::euml_event
{}; exit_impl ev_exit; ... // Submachine struct _Playing : public msm::front::state_machine_def<_Playing > { ... // Pseudo exit state struct Exit_ : public msm::front::exit_pseudo_state , public msm::front::euml::euml_state {}; static Exit_ Exit; ... BOOST_MSM_EUML_DECLARE_TRANSITION_TABLE(( Exit == Song1 + ev_exit ),transition_table ) }; I'm in doubt what should be stated in the main machine's transition table. The Stopped state is never reached when this line is used:
Stopped == exit_pt_(Playing , _Playing::Exit) + ev_exit
However, this entry works:
Stopped == Playing + ev_exit
Could you please clarify what should be actually entered.
Hi Ray, this usage of eUML is new so I haven't tried all cases yet and this is one I didn't think out comnpletely. I'm working on a solution, but it'll take a little longer to have it working in all cases. I think I might still need a few more days. Christophe
I have an addition question regarding the pseudo exit point.
The following code adds a pseudo exit point to your CompositeTutorialWithEumlTable.cpp example:
// Exit event struct exit_impl : msm::front::euml::euml_event
{}; exit_impl ev_exit; ... // Submachine struct _Playing : public msm::front::state_machine_def<_Playing > { ... // Pseudo exit state struct Exit_ : public msm::front::exit_pseudo_state , public msm::front::euml::euml_state {}; static Exit_ Exit; ... BOOST_MSM_EUML_DECLARE_TRANSITION_TABLE(( Exit == Song1 + ev_exit ),transition_table ) }; I'm in doubt what should be stated in the main machine's transition table. The Stopped state is never reached when this line is used:
Stopped == exit_pt_(Playing , _Playing::Exit) + ev_exit
However, this entry works:
Stopped == Playing + ev_exit
Could you please clarify what should be actually entered.
I'm unsure why it didn't work but I found a way around. You'll need to get
the trunk version.
Unfortunately this means a small breaking change in the definition of
submachines to:
typedef boost::msm::back::state_machine
participants (3)
-
Christophe Henry
-
ray@maya-studio.com
-
rayg