Boost::MSM do_actions while in state
Is there any way to do this? Using boost::msm?
I know for fact that you can implement transition actions using the library,
I've searched a lot around the internet and I didn't find my answer.
So basically let's say I want to do this:
http://boost.2283326.n4.nabble.com/file/t371323/boost_msm_1.png
boost_msm_1.png
http://boost.2283326.n4.nabble.com/file/t371323/boost_msm_1.png
diagram1.cpp http://boost.2283326.n4.nabble.com/file/t371323/diagram1.cpp
#include
On 30/06/2018 07:25, IgnacioVizzo wrote:
But I want the machine to DO an action ONCE the Entry_action has completed and BEFORE the states exits. This is sort of a token or mark, like it's used in petri nets and GRAFCETS, basically. I want to add this boost_msm_2.png http://boost.2283326.n4.nabble.com/file/t371323/boost_msm_2.png
And the output for should be something like / OUTPUT // ==>entry_action // -DO ACTION- // [guard] // <==exit_action // -v- transition_action -v- // ==>entry_action // -DO ACTION- // [guard] // <==exit_action // -v- transition_action -v- // ==>entry_action
How is this different from adding your action to the end of the existing entry_action? If you instead want to trigger your action externally, then it probably should be a state transition action; either back to the same state if you want to be able to trigger it multiple times or to an alternate state or substate if you want to only do it once.
participants (2)
-
Gavin Lambert
-
IgnacioVizzo