#include "INETDefs.h"
Go to the source code of this file.
Defines |
#define | FSMA_Switch(fsm) |
#define | FSMA_Print(exiting) |
#define | FSMA_State(s) if (___condition_seen = false, ___exit = true, ___fsm->getState() == (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) |
Define Documentation
#define FSMA_Enter |
( |
|
action |
) |
|
Value:if (!___is_event) \
{ \
if (___condition_seen) \
error("FSMA_Enter() must precede all FSMA_*_Transition()'s in the code"); \
action; \
}
Definition at line 136 of file FSMA.h.
#define FSMA_Event_Transition |
( |
|
transition, |
|
|
|
condition, |
|
|
|
target, |
|
|
|
action | |
|
) |
| | |
Value:___condition_seen = true; if ((condition) && ___is_event) \
{ \
___is_event = false; \
FSMA_Transition(transition, (condition), target, action)
Definition at line 115 of file FSMA.h.
#define FSMA_No_Event_Transition |
( |
|
transition, |
|
|
|
condition, |
|
|
|
target, |
|
|
|
action | |
|
) |
| | |
Value:___condition_seen = true; if ((condition) && !___is_event) \
{ \
FSMA_Transition(transition, (condition), target, action)
Definition at line 121 of file FSMA.h.
#define FSMA_Print |
( |
|
exiting |
) |
|
Value:(ev << "FSM " << ___fsm->getName() \
<< ((exiting) ? ": leaving state " : ": entering state ") \
<< ___fsm->getStateName() << endl)
Definition at line 108 of file FSMA.h.
#define FSMA_State |
( |
|
s |
) |
if (___condition_seen = false, ___exit = true, ___fsm->getState() == (s)) |
#define FSMA_Switch |
( |
|
fsm |
) |
|
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).getName() << endl; \
while (!___exit && (___c++ < FSM_MAXT || (opp_error(eINFLOOP, (fsm).getStateName()), 0)))
Definition at line 99 of file FSMA.h.
#define FSMA_Transition |
( |
|
transition, |
|
|
|
condition, |
|
|
|
target, |
|
|
|
action | |
|
) |
| | |
Value:FSMA_Print(true); \
EV << "firing " << #transition << " transition for " << ___fsm->getName() << endl; \
action; \
___fsm->setState(target, #target); \
FSMA_Print(false); \
___exit = false; \
continue; \
}
Definition at line 126 of file FSMA.h.