
18 Aug
2008
18 Aug
'08
5:07 p.m.
Thomas Klimpel wrote:
Andrey Semashev wrote:
I've attached another version of the example with a transition map (see usb_fsm_transition_based.cpp). Note that all transition logic is encapsulated in transitions and all processing is in states.
I'm unable to see how the "transition map" enters into the code. You make a typedef
typedef mpl::vector< ...
::type Transitions;
but I cannot see "Transitions" used anywhere in the code. Is there some magic that the included headers use this typedef? That would be scary to me.
Sorry, I missed that. The transition table should be provided as the third template parameter for the state machine. fsm::state_machine< StateList, void, Transitions > machine;