65 ExecTrans(smDesc, trans);
79 pState = &(smBase->
pStates[iCurState - 1]);
81 if (smDesc->
esmDesc[iCurState - 1] != NULL) {
116 if (esmDesc != NULL) {
124 if (trans->
id == transId) {
128 if (esmDesc != NULL) {
133 ExecTrans(smDesc, trans);
158 if (trans->
dest > 0) {
165 if (esmDesc != NULL) {
171 if (trans->
dest < 0) {
178 if (cTrans->
dest > 0) {
185 if (esmDesc != NULL) {
191 if (cTrans->
dest == 0) {
FwSmBool_t SmDummyGuard(FwSmDesc_t smDesc)
Dummy guard which always returns true.
FwSmCounterS1_t curState
the current state of the state machine
FwSmCounterS1_t outTransIndex
index of first out-going transition in transition array of SmBaseDesc_t
FwSmDesc_t FwSmGetEmbSmCur(FwSmDesc_t smDesc)
Return the state machine embedded in the current state.
#define FW_TR_EXECUTE
Identifier of "Execute" transition in a state machine.
FwSmCounterS1_t dest
the index of the destination of the transition
FwSmCounterS1_t nOfOutTrans
number of outgoing transitions from the choice pseudo-state
FwSmCounterS1_t iTrGuard
the index of the guard associated to the transition
FwSmErrCode_t
Error codes and function return codes for the state machine functions.
FwSmBool_t FwSmIsStarted(FwSmDesc_t smDesc)
Check whether the state machine is started.
Declaration of the execution interface for a FW State Machine.
FwSmErrCode_t FwSmGetErrCode(FwSmDesc_t smDesc)
Return the error code of the argument state machine.
FwSmAction_t * smActions
the state machine actions (state and transition actions)
FwSmCounterS1_t iDoAction
the do action for the state
An error was encountered while executing a transition in a state machine (see FwSmMakeTrans).
FwSmCounterU3_t FwSmGetExecCnt(FwSmDesc_t smDesc)
Return the State Machine Execution Counter.
void FwSmStop(FwSmDesc_t smDesc)
Stop a state machine.
FwSmCounterU3_t FwSmGetStateExecCnt(FwSmDesc_t smDesc)
Return the State Execution Counter.
void FwSmExecute(FwSmDesc_t smDesc)
Convenience method to execute a state machine.
SmCState_t * cStates
array holding the choice pseudo-states in the state machine
FwSmCounterU2_t id
the identifier (the "name") of the transition
FwSmErrCode_t errCode
either 'success' or the code of the last error encountered by the state machine
FwSmCounterS1_t outTransIndex
index of first out-going transition in the transition array of SmBaseDesc_t
struct FwSmDesc ** esmDesc
the state machines embedded in the state machine
int FwSmBool_t
Type used for booleans (0 is "false" and 1 is "true").
FwSmCounterU3_t smExecCnt
the state machine execution counter
FwSmCounterS1_t nOfOutTrans
number of outgoing transitions
unsigned short int FwSmCounterU2_t
Type used for unsigned counters with a "medium" range.
unsigned int FwSmCounterU3_t
Type used for unsigned counters with a "long" range.
FwSmDesc_t FwSmGetEmbSm(FwSmDesc_t smDesc, FwSmCounterS1_t i)
Return the state machine embedded in the i-th state of the argument state machine.
void FwSmStart(FwSmDesc_t smDesc)
Start a state machine.
Structure representing a transition.
void FwSmMakeTrans(FwSmDesc_t smDesc, FwSmCounterU2_t transId)
Trigger a transition in a state machine.
Structure representing a state machine descriptor.
FwSmCounterS1_t FwSmGetCurState(FwSmDesc_t smDesc)
Return the identifier of the current state in a state machine (or zero if the state machine is stoppe...
FwSmCounterU3_t stateExecCnt
the state execution counter
FwSmCounterS1_t iExitAction
the exit action for the state
FwSmCounterS1_t iTrAction
the index of the action associated to the transition
Structure representing the base descriptor of a state machine.
FwSmGuard_t * smGuards
the transition guards in the state machine
void SmDummyAction(FwSmDesc_t smDesc)
Dummy action which returns without doing anything.
SmPState_t * pStates
array holding the proper states in the state machine
SmBaseDesc_t * smBase
pointer to the base descriptor
Structure representing a choice pseudo state in a state machine.
Structure representing a proper state in state machine.
signed char FwSmCounterS1_t
Type used for signed counters with a "short" range.
FwSmCounterS1_t iEntryAction
the entry action for the state
Declaration of the internal data structures of the FW State Machine Module.
SmTrans_t * trans
array holding the transitions in the state machine
FwSmCounterS1_t FwSmGetCurStateEmb(FwSmDesc_t smDesc)
Return the identifier of the current state of the state machine embedded in the current state (the su...