38 if (nOfChoicePseudoStates < 0) {
65 for (i = 0; i < nOfStates; i++) {
72 for (i = 0; i < nOfStates; i++) {
81 if (nOfChoicePseudoStates > 0) {
86 for (i = 0; i < nOfChoicePseudoStates; i++) {
95 if (smBase->
trans == NULL) {
98 for (i = 0; i < nOfTrans; i++) {
144 if (extSmDesc == NULL) {
151 if (extSmDesc->
esmDesc == NULL) {
173 for (i = 0; i < smDesc->
nOfGuards; i++) {
179 if (smDesc->
esmDesc[i] != NULL) {
244 if (smDesc->
esmDesc[i] != NULL) {
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
Declaration of the dynamical creation interface for a FW State Machine.
void FwSmRelease(FwSmDesc_t smDesc)
Release the memory which was allocated when the state machine descriptor.
FwSmCounterS1_t nOfActions
the number of actions (state actions + transition actions) in the state machine
FwSmAction_t * smActions
the state machine actions (state and transition actions)
void FwSmReleaseDer(FwSmDesc_t smDesc)
Release the memory allocated to a derived state machine descriptor.
FwSmDesc_t FwSmCreate(FwSmCounterS1_t nOfStates, FwSmCounterS1_t nOfChoicePseudoStates, FwSmCounterS1_t nOfTrans, FwSmCounterS1_t nOfActions, FwSmCounterS1_t nOfGuards)
Create a new state machine descriptor.
FwSmCounterS1_t nOfPStates
the number of states in the state machine
SmCState_t * cStates
array holding the choice pseudo-states in the state machine
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
FwSmCounterS1_t transCnt
the counter for the number of transitions added to the state machine
struct FwSmDesc ** esmDesc
the state machines embedded in the state machine
FwSmBool_t(* FwSmGuard_t)(FwSmDesc_t)
Type for a pointer to a state machine guard.
FwSmDesc_t FwSmCreateDer(FwSmDesc_t smDesc)
Create the descriptor of a derived state machine.
FwSmCounterS1_t nOfCStates
the number of choice pseudo-states in the state machine
FwSmCounterU3_t smExecCnt
the state machine execution counter
void * smData
the pointer to the data manipulated by the state machine actions and guards
void(* FwSmAction_t)(FwSmDesc_t)
Type for a pointer to a state machine action.
FwSmCounterS1_t nOfTrans
the number of transitions in SM
Structure representing a transition.
Structure representing a state machine descriptor.
struct FwSmDesc * FwSmDesc_t
Forward declaration for the pointer to a state machine descriptor.
FwSmCounterU3_t stateExecCnt
the state execution counter
FwSmCounterS1_t iTrAction
the index of the action associated to the transition
Structure representing the base descriptor of a state machine.
FwSmCounterS1_t nOfGuards
the number of guards in the 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.
long unsigned int FwSmCounterU4_t
Type used for unsigned counters with a "long int" range.
Return codes of a function which has completed execution without errors.
signed char FwSmCounterS1_t
Type used for signed counters with a "short" range.
void FwSmReleaseRec(FwSmDesc_t smDesc)
Recursively release the memory which was allocated when the state machine descriptor was created...
Declaration of the internal data structures of the FW State Machine Module.
SmTrans_t * trans
array holding the transitions in the state machine