"Igor R"
From my experience, it doesn't behave like that.
It would be something easier to work vice versa. First the more
"specialized" inner states could do there work and then the "generalized"
outer states can do the everything else.
That's what happens usually.
Maybe there's some problem with your FSM definition?
Hi,
you're right. I've wrote a simplified example and all works like expected.
But can't currently find any bug in my definitions. Here is the working
simplified example:
#include
{ typedef boost::mpl::list < boost::statechart::custom_reaction< E >
reactions; boost::statechart::result react( const E& ); };
struct X : boost::statechart::simple_state< X , A::orthogonal< 0 >
{ typedef boost::mpl::list < boost::statechart::custom_reaction< E >
reactions; boost::statechart::result react( const E& ); }; struct Y : boost::statechart::simple_state< Y , A::orthogonal< 1 >
{}; struct Z : boost::statechart::simple_state< Z , A::orthogonal< 2 >
{}; } #include "statechart.h" machine::machine() { state_machine_t::initiate(); } bool machine::unit_test() { machine m; m.process_event(E()); return true; } namespace state { boost::statechart::result A::react( const E& evt ) { std::cout << "A" << std::endl; return discard_event(); } boost::statechart::result X::react( const E& evt ) { std::cout << "X" << std::endl; return forward_event(); } } // end namespace state Pirx!