91 if (smDesc1->
esmDesc[i] != NULL)
95 if (smDesc2->
esmDesc[i] != NULL)
1333 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
1421 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
1454 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
1486 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
1519 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
1552 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
1584 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
1619 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
1650 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
1687 esmDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
1736 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
1996 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
2034 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
2144 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
2338 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
2369 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
2407 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
2445 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
2486 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
2527 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
2555 smDesc =
FwSmCreate(nOfPStates, nOfCStates, nOfTrans, nOfActions, nOfGuards);
2643 outfile = fopen(
"FwSmPrint.out",
"w");
2645 fprintf(outfile,
"\n===== TEST STATE MACHINE SM1 =====\n");
2650 fprintf(outfile,
"\n===== TEST STATE MACHINE SM1 (Static Initialization) =====\n");
2654 fprintf(outfile,
"\n===== TEST STATE MACHINE SM2 =====\n");
2659 fprintf(outfile,
"\n===== TEST STATE MACHINE SM3 =====\n");
2664 fprintf(outfile,
"\n===== TEST STATE MACHINE SM4 =====\n");
2669 fprintf(outfile,
"\n===== TEST STATE MACHINE SM5 =====\n");
2674 fprintf(outfile,
"\n===== TEST STATE MACHINE SM5 (Static Initialization) =====\n");
2678 fprintf(outfile,
"\n===== TEST STATE MACHINE SM5 (Direct Initialization) =====\n");
2682 fprintf(outfile,
"\n===== TEST STATE MACHINE SM6 =====\n");
2687 fprintf(outfile,
"\n===== TEST STATE MACHINE SM7 =====\n");
2692 fprintf(outfile,
"\n===== TEST STATE MACHINE SM8 =====\n");
2697 fprintf(outfile,
"\n===== TEST STATE MACHINE SM9 =====\n");
2702 fprintf(outfile,
"\n===== TEST STATE MACHINE SM9 (Static Initialization) =====\n");
2706 fprintf(outfile,
"\n===== TEST STATE MACHINE SM10 =====\n");
2710 fprintf(outfile,
"\n===== TEST STATE MACHINE SM10 (After it has been started) =====\n");
2715 fprintf(outfile,
"\n===== TEST STATE MACHINE SM11 (Static Initialization) =====\n");
2719 fprintf(outfile,
"\n===== TEST STATE MACHINE SM13 =====\n");
2734 outfile = fopen(
"FwSmPrint.out",
"a");
2736 fprintf(outfile,
"\n===== FwSmPrint is called with a NULL State Machine Descriptor =====\n");
2739 fprintf(outfile,
"\n===== TEST STATE MACHINE SM12 (this SM has an illegal configuration) =====\n");
2744 fprintf(outfile,
"\n===== FwSmPrint is called with an unconfigured State Machine Descriptor =====\n");
2749 fprintf(outfile,
"\n===== FwSmPrint is called on a State Machine Descriptor with Undefined State =====\n");
2755 fprintf(outfile,
"\n===== FwSmPrint is called on a State Machine Descriptor with Undefined Choice Pseudo-State =====\n");
2761 fprintf(outfile,
"\n===== FwSmPrint is called on a State Machine Descriptor with no states =====\n");
2847 if (smDescBase==NULL)
2932 if (smDescBase==NULL)
2999 struct TestSmData* smDataBase = &sSmDataBase;
3001 struct TestSmData* esmDataBase = &sEsmDataBase;
3005 struct TestSmData* esmDataDer = &sEsmDataDer;
3006 FwSmDesc_t smDescBase, smDescDer, esmDescDer;
3013 if (smDescBase==NULL)
3152 if (smDescBase==NULL)
3223 if (smDescBase==NULL)
3350 smDescDer = &sSmDescDer;
3364 if (smDescBase==NULL)
3452 if (smDescBase==NULL)
3501 if (smDescBase==NULL)
3634 struct TestSmData* smDataBase = &sSmDataBase;
3636 struct TestSmData* esmDataBase = &sEsmDataBase;
3637 FwSmDesc_t smDescBase, smDescDer, esmDescDer;
3644 if (smDescBase==NULL)
3666 if (!IsClone(smDescBase, smDescDer)) {
3703 smDescDer = &sSmDescDer;
3717 if (smDescBase==NULL)
3733 if (!IsClone(smDescBase, smDescDer)) {
3912 if (smDescBase==NULL)
A choice pseudo-state is added to a state machine with an illegal (out-of-range) identifier.
FwSmBool_t SmDummyGuard(FwSmDesc_t smDesc)
Dummy guard which always returns true.
Declaration of test cases for the FW State Machine Module.
void FwSmAddTransStaToSta(FwSmDesc_t smDesc, FwSmCounterU2_t transId, FwSmCounterS1_t srcId, FwSmCounterS1_t destId, FwSmAction_t trAction, FwSmGuard_t trGuard)
Create a transition from a proper state to a proper state and add it to a state machine.
FwSmDesc_t FwSmGetEmbSmCur(FwSmDesc_t smDesc)
Return the state machine embedded in the current state.
FwSmDesc_t FwSmMakeTestSM16_1(struct TestSmData *smData)
Operation to create and configure a state machine to verify the order of evaluation of guards...
#define FW_TR_EXECUTE
Identifier of "Execute" transition in a state machine.
FwSmTestOutcome_t FwSmTestCaseDummySM3()
Verify the behaviour of a degenerate state machine which consists of a single direct transition from ...
FwSmTestOutcome_t FwSmTestCaseDer4()
Create a derived state machine by extending state machine SM5 (see FwSmMakeTestSM5) and then verify t...
FwSmTestOutcome_t FwSmTestCaseCheck21()
Configure a state machine to have a state which is not reachable and check that FwSmCheck detects and...
#define LOG_ARRAY_SIZE
Size of the log arrays.
FwSmTestOutcome_t FwSmTestCaseTrans1()
Test a direct transition between two simple states (states S1 and S2 of SM5).
A transition from a certain source (either a state or a choice pseudo-state) is added to a state mach...
FwSmDesc_t FwSmMakeTestSM5(struct TestSmData *smData)
Operation to create and configure the state machine SM5.
FwSmTestOutcome_t FwSmTestCasePrint1()
Verify the ability of the FwSmPrintConfig function to write to a file the configuration of a state ma...
FwSmTestOutcome_t FwSmTestCaseCheck15()
Verify the ability of the state machine creation function FwSmCreate to detect illegal values of its ...
#define TR1
A transition identifier.
Declaration of the dynamical creation interface for a FW State Machine.
FwSmTestOutcome_t FwSmTestCaseCheck17()
Configure a state to exceed the maximum number of actions and check that an error is reported...
void FwSmRelease(FwSmDesc_t smDesc)
Release the memory which was allocated when the state machine descriptor.
FwSmBool_t FwSmIsStarted(FwSmDesc_t smDesc)
Check whether the state machine is started.
There is an undefined transition in a state machine.
There is an undefined state in a state machine.
There is an undefined choice pseudo-state in a state machine.
FwSmTestOutcome_t FwSmTestCaseDescStatic3()
Create state machine SM1 statically and then check that it behaves correctly.
FwSmCounterS1_t nOfActions
the number of actions (state actions + transition actions) in the state machine
FwSmTestOutcome_t FwSmTestCaseJunction1()
Verify the use of a choice pseudo-state acting as a "junction" to join two branches from two differen...
#define CPS2
A choice pseudo-state identifier.
FwSmErrCode_t FwSmGetErrCode(FwSmDesc_t smDesc)
Return the error code of the argument state machine.
int flag_1
Flag checked by the transition guards.
FwSmDesc_t FwSmMakeTestSMDer1Static(FwSmDesc_t smDescBase, struct TestSmData *smData)
Create a derived state machine and override one of its actions and one of its guards.
A configuration error has been detected during the state machine configuration process.
Type for the state machine data for the test state machines.
FwSmAction_t * smActions
the state machine actions (state and transition actions)
An error was encountered while executing a transition in a state machine (see FwSmMakeTrans).
void FwSmReleaseDer(FwSmDesc_t smDesc)
Release the memory allocated to a derived state machine descriptor.
FwSmDesc_t FwSmMakeTestSM12(struct TestSmData *smData)
Operation to create and configure a state machine where a transition has a choice pseudo-state as bot...
The number of actions added to the state machine is smaller than the number of actions declared when ...
FwSmTestOutcome_t FwSmTestCaseDer5()
Create a derived state machine by extending state machine SM1 (see FwSmMakeTestSM1), override one of its actions and one of its guards, and then verify the correct behaviour of the derived state machine.
FwSmCounterU3_t FwSmGetExecCnt(FwSmDesc_t smDesc)
Return the State Machine Execution Counter.
void FwSmStop(FwSmDesc_t smDesc)
Stop a state machine.
FwSmTestOutcome_t FwSmTestCaseExecute2()
Test the Execute command in a configuration where the command only causes the do-action of a state wi...
#define FW_SM_INST_DER(SM_DESC, NS, NA, NG)
Instantiate a descriptor for a derived state machine.
FwSmTestOutcome_t FwSmTestCaseCheck12()
Verify the ability of FwSmCheck to detect and report the configuration error due a transition having ...
FwSmCounterU3_t FwSmGetStateExecCnt(FwSmDesc_t smDesc)
Return the State Execution Counter.
int logBase
Offset for markers written to log array.
FwSmTestOutcome_t FwSmTestCaseDummySM9Static()
Verify the behaviour of a degenerate state machine which has no transitions other than the transition...
#define TR2
A transition identifier.
FwSmTestOutcome_t FwSmTestCaseCheck20()
Configure a state machine to have too few actions and check that FwSmCheck detects and reports this s...
Declaration of the configuration interface for a FW State Machine.
int flag_2
Flag checked by the transition guards.
FwSmDesc_t FwSmCreate(FwSmCounterS1_t nOfStates, FwSmCounterS1_t nOfChoicePseudoStates, FwSmCounterS1_t nOfTrans, FwSmCounterS1_t nOfActions, FwSmCounterS1_t nOfGuards)
Create a new state machine descriptor.
FwSmTestOutcome_t FwSmTestCaseDummySM9()
Verify the behaviour of a degenerate state machine which has no transitions other than the transition...
FwSmCounterS1_t nOfPStates
the number of states in the state machine
FwSmTestOutcome_t FwSmTestCaseConfigErr1()
Test an application which attempts to perform illegal configuration operations on a State Machine Des...
FwSmTestOutcome_t FwSmTestCaseCheck9()
Verify the ability of the configuration check to detect and report a configuration error in an embedd...
void FwSmAddTransStaToCps(FwSmDesc_t smDesc, FwSmCounterU2_t transId, FwSmCounterS1_t srcId, FwSmCounterS1_t destId, FwSmAction_t trAction, FwSmGuard_t trGuard)
Create a transition from a proper state to a choice pseudo-state and add it to a state machine...
FwSmTestOutcome_t FwSmTestCaseTrans8()
Verify the order of evaluation of guards on transitions out of a choice pseudo-state.
Declaration of functions to create and configure test state machines.
FwSmTestOutcome_t FwSmTestCaseCheck5()
Verify the ability of FwSmCheck to detect and report the configuration error due an out-going transit...
FwSmDesc_t FwSmMakeTestSM7(struct TestSmData *smData)
Operation to create and configure the state machine SM7.
void FwSmExecute(FwSmDesc_t smDesc)
Convenience method to execute a state machine.
FwSmTestOutcome_t FwSmTestCaseCheck4()
Verify the ability of FwSmCheck to detect and report the configuration error due to initial pseudo-st...
A choice pseudo-state is added to a state machine with less than 1 out-going transitions.
FwSmTestOutcome_t FwSmTestCaseExecute4()
Test propagation of execution command to an ESM.
A transition is added to a state machine with a source (either a state or a choice pseudo-state) whic...
#define STATE_S4
A state identifier.
The number of guards added to the state machine exceeds the number of guards declared when the state ...
FwSmTestOutcome_t FwSmTestCaseConfigErr2()
Configure a state machine and then try to re-configure it and check that the reconfiguration attempt ...
The number of guards in the base state machine is not the same as in the derived state machine...
FwSmTestOutcome_t FwSmTestCaseExecCnt1()
Verify the functioning of the execution counters.
int flag_3
Flag checked by the transition guards.
FwSmTestOutcome_t FwSmTestCaseDer1()
Create a derived state machine by extending state machine SM5 (see FwSmMakeTestSM5) and then verify t...
The number of actions added to the state machine exceeds the number of actions declared when the stat...
FwSmTestOutcome_t FwSmTestCaseStart2()
Test the Start command on a state machine where the initial pseudo-state is connected to a choice pse...
FwSmTestOutcome_t FwSmTestCaseTrans5()
Test a transition from a state to the final pseudo-state passing through a choice pseudo-state...
void FwSmOverrideGuard(FwSmDesc_t smDesc, FwSmGuard_t oldGuard, FwSmGuard_t newGuard)
Override a guard in a derived state machine.
FwSmErrCode_t errCode
either 'success' or the code of the last error encountered by the state machine
FwSmTestOutcome_t FwSmTestCaseDerErr1()
Instantiate a derived state machine and try to initialize it with a base state machine with the wrong...
The state machine where an action or a guard is overridden or a state machine is embedded is not a de...
FwSmTestOutcome_t FwSmTestCaseStart3()
Test the Start command on a simple state machine where the initial pseudo-state is directly connected...
FwSmDesc_t FwSmMakeTestSM6(struct TestSmData *smData, struct TestSmData *esmData)
Operation to create and configure the state machine SM6.
void FwSmInitDer(FwSmDesc_t smDesc, FwSmDesc_t smDescBase)
Initialize a state machine descriptor to extend another state machine (the base state machine)...
The state machine has a choice pseudo-state which is not a destination of any transition.
int fwSm_logState[LOG_ARRAY_SIZE]
Log array where SM operations write the state of their SM.
#define TR4
A transition identifier.
FwSmTestOutcome_t FwSmTestCaseExecute3()
Test the Execute command in a configuration where the command triggers a transition between two prope...
FwSmErrCode_t FwSmCheckRec(FwSmDesc_t smDesc)
Recursively check the configuration of a state machine and all its embedded state machines...
FwSmTestOutcome_t FwSmTestCaseCheck10()
Verify the ability of the configuration functions of a state machine to detect and report the followi...
FwSmTestOutcome_t FwSmTestCaseTrans3()
Test propagation of a transition command from an SM to its ESM in a situation where the command has n...
void FwSmAddChoicePseudoState(FwSmDesc_t smDesc, FwSmCounterS1_t choiceId, FwSmCounterS1_t nOfOutTrans)
Create a choice pseudo-state with the given characteristics and add it to a state machine...
FwSmTestOutcome_t FwSmTestCaseStop2()
Test the Stop command for a state machine with an embedded state machine.
void FwSmOverrideAction(FwSmDesc_t smDesc, FwSmAction_t oldAction, FwSmAction_t newAction)
Override an action (either a state action or a transition action) in a derived state machine...
FwSmTestOutcome_t FwSmTestCaseDerConfigErr1()
Verify the ability of the configuration operation on a derived state machine to detect and report err...
struct FwSmDesc ** esmDesc
the state machines embedded in the state machine
FwSmTestOutcome_t FwSmTestCaseTrans2()
Test a transition through a choice pseudo-state between two simple states (states S1 and S2 of SM5)...
FwSmTestOutcome_t FwSmTestCaseTransErr1()
Test a transition which goes through a choice pseudo-state without any out-going transition with a tr...
FwSmTestOutcome_t FwSmTestCaseDer6()
Create a derived state machine by extending state machine SM11 (see FwSmMakeTestSM11), and then verify the correct behaviour of the derived state machine.
FwSmDesc_t FwSmMakeTestSM1(struct TestSmData *smData)
Operation to create and configure the state machine SM1.
A transition is added to a state machine with an illegal (out-of-range) choice pseudo-state destinati...
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.
FwSmTestOutcome_t FwSmTestCaseCheck7()
Verify the ability of the configuration functions of a state machine to detect and report the followi...
FwSmTestOutcome_t FwSmTestCaseCheck2()
Verify the ability of FwSmCheck to detect and report the configuration error due to a choice pseudo-s...
FwSmDesc_t FwSmMakeTestSM11(struct TestSmData *smData)
Operation to create and configure a degenerate state machine with neither states nor choice pseudo-st...
FwSmDesc_t FwSmMakeTestSM5Dir(struct TestSmData *smData)
Operation to create and configure the state machine SM5 (see FwSmMakeTestSM5 and figure below) by dir...
FwSmDesc_t FwSmMakeTestSMDer1(FwSmDesc_t smDescBase, struct TestSmData *smData)
Create a derived state machine and override one of its actions and one of its guards.
FwSmDesc_t FwSmMakeTestSM15(struct TestSmData *smData)
Operation to create and configure a state machine which uses the execution counters.
FwSmTestOutcome_t FwSmTestCaseCheck1()
Verify the ability of FwSmCheck to detect and report the configuration error due to a state in a stat...
A state is added with a negative number of outgoing transitions.
FwSmDesc_t FwSmMakeTestSM1Static(struct TestSmData *smData)
Operation to create and configure the state machine SM1 (see FwSmMakeTestSM1 and figure below) static...
FwSmTestOutcome_t
Outcome of a state machine test case.
#define CPS1
A choice pseudo-state identifier.
void(* FwSmAction_t)(FwSmDesc_t)
Type for a pointer to a state machine action.
The state machine has a state which is not a destination of any transition.
FwSmDesc_t FwSmGetEmbSm(FwSmDesc_t smDesc, FwSmCounterS1_t i)
Return the state machine embedded in the i-th state of the argument state machine.
The overridden guard in a derived state machine does not exist.
void FwSmStart(FwSmDesc_t smDesc)
Start a state machine.
FwSmTestOutcome_t FwSmTestCaseCheck22()
Configure a state machine to have a choice pseudo-state which is not reachable and check that FwSmChe...
int fwSm_logIndex
Index for write operations in log arrays.
#define STATE_S2
A state identifier.
#define STATE_S1
A state identifier.
FwSmTestOutcome_t FwSmTestCaseDerEmbed1()
Verify the ability of the configuration functions of a derived state machines to detect and report er...
void FwSmMakeTrans(FwSmDesc_t smDesc, FwSmCounterU2_t transId)
Trigger a transition in a state machine.
FwSmDesc_t FwSmMakeTestSM5Static(struct TestSmData *smData)
Operation to create and configure the state machine SM5 (see FwSmMakeTestSM5 and figure below) static...
Structure representing a state machine descriptor.
FwSmTestOutcome_t FwSmTestCaseDerConfig1()
Create a derived state machine dynamically and then check the configuration of the newly created stat...
FwSmTestOutcome_t FwSmTestCaseStop1()
Test the Stop command on a state machine without embedded state machines.
A choice pseudo-state is added twice to the same state machine.
FwSmDesc_t FwSmMakeTestSM8(struct TestSmData *smData)
Operation to create and configure a degenerate state machine with no states.
FwSmDesc_t FwSmMakeTestSM10(struct TestSmData *smData, struct TestSmData *esmData)
Operation to create and configure the state machine SM10.
FwSmTestOutcome_t FwSmTestCaseTrans6()
Test a transition from one state to another state with an embedded state machine. ...
FwSmDesc_t FwSmMakeTestSM3(struct TestSmData *smData, struct TestSmData *esmData)
Operation to create and configure the state machine SM3.
void FwSmAddTransIpsToCps(FwSmDesc_t smDesc, FwSmCounterS1_t destId, FwSmAction_t trAction)
Create a transition from the initial pseudo-state to a choice pseudo-state and add it to a state mach...
void FwSmAddTransCpsToFps(FwSmDesc_t smDesc, FwSmCounterS1_t srcId, FwSmAction_t trAction, FwSmGuard_t trGuard)
Create a transition from a choice pseudo-state to the final pseudo-state and add it to a state machin...
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...
A transition is added to a state machine with an illegal (out-of-range) state destination.
FwSmTestOutcome_t FwSmTestCaseTrans7()
Verify the order of evaluation of guards on transitions out of a proper state.
FwSmDesc_t FwSmMakeTestSM4(struct TestSmData *smData)
Operation to create and configure the state machine SM4.
FwSmDesc_t FwSmMakeTestSM14(struct TestSmData *smData)
Operation to create and configure a state machine where the choice pseudo-state is used both to split...
FwSmDesc_t FwSmMakeTestSM16_2(struct TestSmData *smData)
Operation to create and configure a state machine to verify the order of evaluation of guards...
FwSmTestOutcome_t FwSmTestCaseSelfTrans1()
Test a self-transition on a simple state (state S2 of SM4).
void FwSmSetData(FwSmDesc_t smDesc, void *smData)
Set the pointer to the state machine data in the state machine descriptor.
FwSmErrCode_t FwSmCheck(FwSmDesc_t smDesc)
Check the correctness and completeness of the configuration of a state machine descriptor.
FwSmTestOutcome_t FwSmTestCaseCheck6()
Verify the ability of FwSmCheck to detect and report the configuration error due an out-going transit...
void FwSmAddTransStaToFps(FwSmDesc_t smDesc, FwSmCounterU2_t transId, FwSmCounterS1_t srcId, FwSmAction_t trAction, FwSmGuard_t trGuard)
Create a transition from a proper state to the final pseudo-state and add it to a state machine...
#define TR_S1_FPS
A transition identifier.
FwSmTestOutcome_t FwSmTestCaseTrans4()
Test a transition command which triggers a transition in both the embedding and in the embedded state...
FwSmTestOutcome_t FwSmTestCaseDer2()
Create a derived state machine by extending state machine SM1 (see FwSmMakeTestSM1), override one of its actions and one of its guards, and then verify the correct behaviour of the derived state machine.
FwSmTestOutcome_t FwSmTestCaseCheck19()
Configure a state machine to have too few actions and check that FwSmCheck detects and reports this s...
FwSmDesc_t FwSmMakeTestSM16_3(struct TestSmData *smData)
Operation to create and configure a state machine to verify the order of evaluation of guards...
FwSmTestOutcome_t FwSmTestCaseDerConfig2()
Create a derived state machine statically and then check the configuration of the newly created state...
void FwSmPrintConfig(FwSmDesc_t smDesc, FILE *stream)
Print the configuration of the state machine to an output stream.
FwSmTestOutcome_t FwSmTestCaseCheck16()
Verify the ability of the configuration functions of a state machine to detect and report the followi...
FwSmTestOutcome_t FwSmTestCaseCheck14()
Verify the ability of the configuration functions of a state machine to detect and report the followi...
#define TR6
A transition identifier.
FwSmTestOutcome_t FwSmTestCaseExecute1()
Test the Execute command in a configuration where the command only causes the do-action of a simple s...
#define TR5
A transition identifier.
int counter_2
Counter incremented by the transition actions.
FwSmCounterS1_t nOfGuards
the number of guards in the state machine
#define STATE_S3
A state identifier.
FwSmTestOutcome_t FwSmTestCaseCheck3()
Verify the ability of FwSmCheck to detect and report the configuration error due to a transition in a...
FwSmDesc_t FwSmMakeTestSM9Static(struct TestSmData *smData)
Operation to create and configure the state machine SM5 (see FwSmMakeTestSM9 and figure below) static...
FwSmGuard_t * smGuards
the transition guards in the state machine
void SmDummyAction(FwSmDesc_t smDesc)
Dummy action which returns without doing anything.
A state is added twice to the same state machine.
FwSmTestOutcome_t FwSmTestCasePrint2()
Verify the ability of the FwSmPrintConfig function to write to a file the configuration of a state ma...
FwSmTestOutcome_t FwSmTestCaseStart1()
Test the Start command on a simple state machine where the initial pseudo-state is directly connected...
SmBaseDesc_t * smBase
pointer to the base descriptor
FwSmTestOutcome_t FwSmTestCaseTransErr2()
Test a transition which has a choice pseudo-state as both source and destination. ...
FwSmTestOutcome_t FwSmTestCaseStop3()
Test the Stop command for a state machine with an embedded state machine.
FwSmDesc_t FwSmMakeTestSM9(struct TestSmData *smData)
Operation to create and configure a degenerate state machine with no transitions other than the initi...
int counter_1
Counter incremented by the state actions.
void FwSmAddState(FwSmDesc_t smDesc, FwSmCounterS1_t stateId, FwSmCounterS1_t nOfOutTrans, FwSmAction_t entryAction, FwSmAction_t exitAction, FwSmAction_t doAction, FwSmDesc_t esmDesc)
Create a state with the given characteristics and add it to a state machine.
FwSmTestOutcome_t FwSmTestCaseDescStatic2()
Verify the correct behaviour of a state machine descriptor which was created statically using the ser...
FwSmTestOutcome_t FwSmTestCaseDer3()
Create a derived state machine by extending state machine SM6 (see FwSmMakeTestSM6) and then verify t...
A transition is added to a state machine with a source which has an illegal identifier.
Declaration of the static creation interface for a FW State Machine.
FwSmTestOutcome_t FwSmTestCaseDescDir1()
Verify the correct behaviour of a state machine descriptor which was created by directly instantiatin...
void FwSmAddTransIpsToSta(FwSmDesc_t smDesc, FwSmCounterS1_t destId, FwSmAction_t trAction)
Create a transition from the initial pseudo-state to a proper state and add it to a state machine...
The number of guards added to the state machine is smaller than the number of guards declared when th...
FwSmTestOutcome_t FwSmTestCaseCheck8()
Verify the ability of the configuration functions of a state machine to detect and report the followi...
void FwSmAddTransCpsToSta(FwSmDesc_t smDesc, FwSmCounterS1_t srcId, FwSmCounterS1_t destId, FwSmAction_t trAction, FwSmGuard_t trGuard)
Create a transition from a choice pseudo-state to a proper state and add it to a state machine...
The overridden action in a derived state machine does not exist.
Return codes of a function which has completed execution without errors.
FwSmTestOutcome_t FwSmTestCaseCheck11()
Verify the ability of the state machine configuration functions to detect and report illegal configur...
Declaration of the auxiliary interface for a FW State Machine.
The state in a derived state machine to which an embedded state machine is added already holds an emb...
signed char FwSmCounterS1_t
Type used for signed counters with a "short" range.
FwSmTestOutcome_t FwSmTestCaseCheck18()
Configure a transitions to exceed the maximum number of actions and the maximum number of guards and ...
A state or choice pseudo-state is added to a state machine which has more out-going transitions than ...
void FwSmEmbed(FwSmDesc_t smDesc, FwSmCounterS1_t stateId, FwSmDesc_t esmDesc)
Embed a state machine in a state of a derived state machine.
FwSmTestOutcome_t FwSmTestCaseDummySM1()
Verify the behaviour of a degenerate state machine which has no states.
The number of actions in the base state machine is not the same as in the derived state machine...
FwSmDesc_t FwSmMakeTestSM13(struct TestSmData *smData)
Operation to create and configure a state machine where the 'execute' transition has a choice pseudo-...
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.
FwSmDesc_t FwSmMakeTestSM2(struct TestSmData *smData)
Operation to create and configure the state machine SM2.
A state is added to a state machine with an illegal (out-of-range) identifier.
int fwSm_logMarker[LOG_ARRAY_SIZE]
Log array where state machine operations write their marker.
FwSmCounterS1_t FwSmGetCurStateEmb(FwSmDesc_t smDesc)
Return the identifier of the current state of the state machine embedded in the current state (the su...
FwSmTestOutcome_t FwSmTestCaseExecute5()
Verify the 'Execute' command when it triggers a transition from a state to a choice pseudo-state and ...