Boost logo

Boost Users :

From: Igor R. (igor_rubinov_at_[hidden])
Date: 2008-04-15 10:42:54


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
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net