Hi,
> template<>> void sc::asynchronous_state_machine<> YourClassName, YourInitialStateName >::initiate_impl() {}
Now I try to define and test some "contents" of my FSM, and for some reason it doesn't work so far...
The 1st problem is that in_state_reaction(s) are not triggered. The machine enters some inner state, then EvMyEvent1 is posted by the machine creator. The in_state_reactions are defined at the outermost level - in MyMachine itself. IIUC, any event that has no reaction in a current state, is forwarded to the outer one, right? So the foolowing definition should be ok:
class MyMachine : public sc::asynchronous_state_machine<MyMachine, InitialState>, public SomeOtherBaseClass
{
void doSomething1(const EvMyEvent1 &ev)
{
//implementation
}
void doSomething2(const EvMyEvent2 &ev)
{
//implementation
}
public:
typedef mpl::list
<
sc::in_state_reaction<EvMyEvent1, MyMachine, &MyMachine::doSomething1>,
sc::in_state_reaction<EvMyEvent2, MyMachine, &MyMachine::doSomething2>,
> reactions;
};
However, doSomething() functions are not called, and I even can't put there breakpoint (dropped out by the linker?). It I define them in cpp, the breakpoints can be set, but the functions are not called anyway...
Any idea would be appreciated!
Thanks,
Igor'.
Explore the seven wonders of the world Learn more!