Defines | |
#define | FSMA_Switch(fsm) |
#define | FSMA_Print(exiting) |
#define | FSMA_State(s) if (___condition_seen = false, ___exit = true, ___fsm->state() == s) |
#define | FSMA_Event_Transition(transition, condition, target, action) |
#define | FSMA_No_Event_Transition(transition, condition, target, action) |
#define | FSMA_Transition(transition, condition, target, action) |
#define | FSMA_Enter(action) |
|
Value: if (!___is_event) \ { \ if (___condition_seen) \ error("FSMA_Enter() must precede all FSMA_*_Transition()'s in the code"); \ action; \ } |
|
Value: ___condition_seen = true; if (condition && ___is_event) \ { \ ___is_event = false; \ FSMA_Transition(transition, condition, target, action) |
|
Value: ___condition_seen = true; if (condition && !___is_event) \ { \ FSMA_Transition(transition, condition, target, action) |
|
Value: (ev << "FSM " << ___fsm->name() \ << ((exiting) ? ": leaving state " : ": entering state ") \ << ___fsm->stateName() << endl) |
|
|
|
Value: bool ___is_event = true; \ bool ___exit = false; \ bool ___condition_seen = false; \ int ___c = 0; \ cFSM *___fsm = &fsm; \ EV << "processing event in state machine " << fsm.name() << endl; \ while (!___exit && (___c++ < FSM_MAXT || (opp_error(eINFLOOP, fsm.stateName()), 0))) |
|
Value: FSMA_Print(true); \ EV << "firing " << #transition << " transition for " << ___fsm->name() << endl; \ action; \ ___fsm->setState(target, #target); \ FSMA_Print(false); \ ___exit = false; \ continue; \ } |