95 static void DummyActionBis(
FwPrDesc_t prDesc) {
799 procDesc =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
834 prDesc =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
841 prDesc =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
848 prDesc =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
855 prDesc =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
860 prDesc =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
867 prDesc =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
872 prDesc =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
889 prDesc =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
1140 prDesc =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
1254 prDesc =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
1293 prDesc =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
1323 prDesc =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
1353 prDesc =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
1383 prDesc =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
1417 prDesc =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
1449 prDesc =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
1532 if (prDescBase==NULL)
1614 if (prDescBase==NULL)
1630 if (!IsClone(prDescBase,prDescDer)) {
1635 if (!IsClone(prDescBase,&prDescDerStatic)) {
1671 prDescBase =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
1740 struct TestPrData* prDataBase = &sPrDataBase;
1767 if (prDescBase==NULL)
1841 struct TestPrData* prDataBase = &sPrDataBase;
1868 if (prDescBase==NULL)
2199 if ((procDesc1==NULL) || (procDesc2==NULL) || (procDesc3==NULL))
2257 prDesc =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
2289 prDesc =
FwPrCreate(nOfANodes,nOfDNodes,nOfFlows,nOfActions,nOfGuards);
FwPrTestOutcome_t FwPrTestCaseDerCheck1()
Verify that a derived procedure is, at the time it is created, a structural clone of its base procedu...
FwPrTestOutcome_t FwPrTestCaseCheck5()
Test the ability of the functions which add a control flow to a procedure to detect and report a conf...
FwPrDesc_t FwPrMakeTestPR1Static(struct TestPrData *prData)
Operation to create and configure the procedure PR1 (see FwPrMakeTestPR1 and figure below) statically...
The number of actions added to the procedure is smaller than the number of actions declared when the ...
FwPrCounterS1_t nOfGuards
the number of guards in the procedure
An action node is added to a procedure with an illegal (out-of-range) identifier. ...
The number of guards in the base procedure is not the same as in the derived procedure.
FwPrTestOutcome_t FwPrTestCaseCheck2()
Test the ability of the FwPrCreate function to catch configuration errors.
The number of guards added to the procedure is smaller than the number of guards declared when the pr...
FwPrCounterU3_t FwPrGetNodeExecCnt(FwPrDesc_t prDesc)
Return the Node Execution Counter.
A decision node is added to a procedure with an illegal (out-of-range) identifier.
void FwPrInitDer(FwPrDesc_t prDesc, FwPrDesc_t prDescBase)
Initialize a procedure descriptor to extend another procedure (the base procedure).
#define LOG_ARRAY_SIZE
Size of the log arrays.
The overridden guard in a derived procedure does not exist.
FwPrTestOutcome_t FwPrTestCaseCheck13()
Verify the ability of the FwPrCheck function to detect and report a situation where there is an unrea...
FwPrTestOutcome_t FwPrTestCaseDer2()
Create a derived procedure by extending state machine PR2 (see FwPrMakeTestPR2) and by overriding one...
The number of guards added to the procedure exceeds the number of guards declared when the procedure ...
FwPrTestOutcome_t FwPrTestCaseRun1()
Verify the Run command on a procedure.
The overridden action in a derived procedure does not exist.
void FwPrOverrideGuard(FwPrDesc_t prDesc, FwPrGuard_t oldGuard, FwPrGuard_t newGuard)
Override a guard in a derived procedure.
int flag_6
Flag used in the procedure control flows.
FwPrTestOutcome_t FwPrTestCaseExecute6()
Test a procedure which has one single action node and no guards.
An action node is defined with a null action.
An error was encountered while executing a transition in a procedure (see FwPrExecute).
void FwPrAddFlowIniToDec(FwPrDesc_t prDesc, FwPrCounterS1_t destId, FwPrGuard_t cfGuard)
Create a control flow from the initial node to a decision node and add it to a procedure.
FwPrTestOutcome_t FwPrTestCaseCheck6()
Verify the ability of the FwPrCheck function to detect and report a situation where there is an uncon...
FwPrCounterS1_t nOfActions
the number of actions in the procedure
The number of actions in the base procedure is not the same as in the derived procedure.
A configuration error has been detected during the procedure configuration process.
An action node is added twice to the same procedure.
FwPrTestOutcome_t FwPrTestCaseExecute1()
Test the Execute command on a procedure which is stopped.
FwPrTestOutcome_t FwPrTestCaseCheck9()
Verify the ability of the FwPrCheck function to detect and report a situation where there is a contro...
FwPrTestOutcome_t FwPrTestCaseDerCheck3()
Verify the correctness of the initial state of a derived procedure.
A choice pseudo-state is added to a procedure with less than 2 out-going control flows.
FwPrDesc_t FwPrMakeTestPR4(struct TestPrData *prData)
Operation to create the test procedure PR4.
FwPrTestOutcome_t FwPrTestCaseExecute2()
Test the Execute command on control flows from the initial nodes and between action nodes...
PrBaseDesc_t * prBase
pointer to the base descriptor
int flag_2
Flag used in the procedure control flows.
FwPrDesc_t FwPrMakeTestPR2Dir(struct TestPrData *prData)
Operation to create the test procedure PR2 (see FwPrMakeTestPR2 and figure below) directly by instant...
The procedure has an action node which is not a destination of any control flow.
FwPrDesc_t FwPrMakeTestPR2Static(struct TestPrData *prData)
Operation to create and configure the procedure PR2 (see FwPrMakeTestPR2 and figure below) statically...
FwPrDesc_t FwPrMakeTestPR3(struct TestPrData *prData)
Operation to create the test procedure PR3.
Header file to define all constants and types for the procedure module of the FW Profile.
A control flow is added to a procedure with an illegal (out-of-range) decision node destination...
#define N1
An action node identifier.
#define N2
An action node identifier.
void FwPrAddFlowDecToFin(FwPrDesc_t prDesc, FwPrCounterS1_t srcId, FwPrGuard_t cfGuard)
Create a control flow from a decision node to the final node and add it to a procedure.
void FwPrStop(FwPrDesc_t prDesc)
Stop a procedure.
A node is added to a procedure which has more out-going transitions than fit into the control flow ar...
int FwPrBool_t
Type used for booleans (0 is "false" and 1 is "true").
FwPrTestOutcome_t FwPrTestCaseCheck1()
Test the ability of the FwPrCheck function to detect configuration errors.
void FwPrOverrideAction(FwPrDesc_t prDesc, FwPrAction_t oldAction, FwPrAction_t newAction)
Override an action in a derived procedure.
int flag_1
Flag used in the procedure control flows.
int flag_4
Flag used in the procedure control flows.
int flag_5
Flag used in the procedure control flows.
A control flow is added to a SM with a source which has an illegal value.
FwPrDesc_t FwPrMakeTestPR6_2(struct TestPrData *prData)
Operation to create the test procedure PR6.
void FwPrRelease(FwPrDesc_t prDesc)
Release the memory which was allocated when the procedure descriptor was created. ...
FwPrTestOutcome_t FwPrTestCaseDerCheck2()
Verify the ability of the functions which override an action or a guard in a derived procedure to det...
There is an undefined control flow in a procedure.
int fwPrLogMarker[LOG_ARRAY_SIZE]
Array where procedure actions write their marker.
FwPrTestOutcome_t FwPrTestCaseExecute5Static()
Test the behaviour of a procedure created statically.
FwPrDesc_t FwPrMakeTestPR6_1(struct TestPrData *prData)
Operation to create the test procedure PR6.
void FwPrAddFlowActToFin(FwPrDesc_t prDesc, FwPrCounterS1_t srcId, FwPrGuard_t cfGuard)
Create a control flow from an action node to the final node and add it to a procedure.
The procedure has a decision node which is not a destination of any control flow. ...
void FwPrAddFlowActToAct(FwPrDesc_t prDesc, FwPrCounterS1_t srcId, FwPrCounterS1_t destId, FwPrGuard_t cfGuard)
Create a control flow from an action node to another action node and add it to a procedure.
FwPrTestOutcome_t FwPrTestCaseCheck8()
Verify the ability of the FwPrCheck function to detect and report a situation where there is an uncon...
FwPrTestOutcome_t FwPrTestCaseStart1()
Test the Start command for the test procedure PR2.
FwPrDesc_t FwPrCreate(FwPrCounterS1_t nOfANodes, FwPrCounterS1_t nOfDNodes, FwPrCounterS1_t nOfFlows, FwPrCounterS1_t nOfActions, FwPrCounterS1_t nOfGuards)
Create a new procedure descriptor.
#define FW_PR_INST_DER(PR_DESC, NA, NG)
Instantiate a descriptor for a derived procedure.
FwPrDesc_t FwPrCreateDer(FwPrDesc_t prDesc)
Create the descriptor of a derived procedure.
There is an undefined decision node in a procedure.
FwPrCounterU3_t FwPrGetExecCnt(FwPrDesc_t prDesc)
Return the Procedure Execution Counter.
FwPrTestOutcome_t FwPrTestCaseDer3()
Create a derived procedure by extending state machine PR2 (see FwPrMakeTestPR2) and by overriding one...
FwPrTestOutcome_t FwPrTestCaseExecute5()
Test a sequence of Execute command which triggers the execution of a linear sequence of actions nodes...
void FwPrSetData(FwPrDesc_t prDesc, void *prData)
Set the pointer to the procedure data in the procedure descriptor.
int fwPrLogNode[LOG_ARRAY_SIZE]
Array where procedure actions write the state of their SM.
FwPrTestOutcome_t FwPrTestCaseExecute4()
Test an Execute command which triggers the execution of a loop in the procedure.
FwPrTestOutcome_t FwPrTestCaseExecute8()
Verify the functionalities associated to the Procedure Execution Counter and to the Node Execution Co...
FwPrDesc_t FwPrMakeTestPRDer1Static(FwPrDesc_t prDescBase, struct TestPrData *prData)
Create a derived procedure and override one of its actions and one of its guards. ...
void FwPrReleaseDer(FwPrDesc_t prDesc)
Release the memory allocated to a derived procedure descriptor.
FwPrErrCode_t errCode
either 'success' or the code of the last error encountered by the procedure
FwPrDesc_t FwPrMakeTestPR2(struct TestPrData *prData)
Operation to create the test procedure PR2.
FwRtOutcome_t DummyAction(FwRtDesc_t rtDesc)
Dummy function which always returns 1.
FwPrTestOutcome_t FwPrTestCaseCheck10()
Verify the ability of the FwPrCheck function to detect and report a situation where there is a contro...
The number of actions added to the procedure exceeds the number of actions declared when the procedur...
The procedure where an action or a guard is overridden or a procedure is embedded is not a derived pr...
Declaration of the static creation interface for a FW Procedure.
FwPrDesc_t FwPrMakeTestPR5(struct TestPrData *prData)
Operation to create the test procedure PR5.
FwPrTestOutcome_t FwPrTestCaseExecute7()
Test a procedure which has one decision node directly connected to the initial node.
FwPrTestOutcome_t FwPrTestCaseStop1()
Test the Stop command for the test procedure PR2.
Return codes of a function which has completed execution without errors.
FwPrTestOutcome_t FwPrTestCaseCheck14()
Verify the ability of the FwPrCheck function to detect and report a situation where there is an unrea...
void FwPrExecute(FwPrDesc_t prDesc)
Execute a procedure.
void FwPrAddDecisionNode(FwPrDesc_t prDesc, FwPrCounterS1_t nodeId, FwPrCounterS1_t nOfOutFlows)
Create a decision node with the given characteristics and add it to a procedure.
Declaration of functions to create and configure test procedures.
A control flow is added to a procedure with a source (either a state or a source choice pseudo-state)...
signed char FwPrCounterS1_t
Type used for signed counters with a "short" range.
Structure representing a procedure descriptor.
FwPrTestOutcome_t FwPrTestCaseExecute9()
Verify the order of evaluation of the control flow guards.
FwPrAction_t * prActions
the procedure actions
#define N3
An action node identifier.
FwPrTestOutcome_t FwPrTestCaseCheck4()
Test the response to a situation where all flows out of a decision node have a false guard...
FwPrDesc_t FwPrMakeTestPR1(struct TestPrData *prData)
Operation to create the test procedure PR1.
A control flow from a certain source is added to a procedure but there isn't space for it in the cont...
FwPrTestOutcome_t FwPrTestCaseCheck3()
Test the ability of the FwPrAddActionNode and FwPrAddDecisionNode to catch configuration errors...
FwPrTestOutcome_t FwPrTestCaseDerCheck4()
Verify the ability of function FwPrInitDer to detect and report errors.
A decision node is added twice to the same procedure.
FwPrBool_t FwPrIsStarted(FwPrDesc_t prDesc)
Check whether the procedure is started.
FwPrDesc_t FwPrMakeTestPR6_3(struct TestPrData *prData)
Operation to create the test procedure PR6.
FwPrCounterS1_t FwPrGetCurNode(FwPrDesc_t prDesc)
Return the identifier of the current action node in a procedure.
int counter_1
Counter incremented by the procedure actions.
FwPrTestOutcome_t FwPrTestCaseExecute3()
Test an Execute command which triggers the traversal of several nodes.
int marker
Procedure's marker.
FwPrDesc_t FwPrMakeTestPRDer1(FwPrDesc_t prDescBase, struct TestPrData *prData)
Create a derived procedure and override one of its actions and one of its guards. ...
There is an undefined action node in a procedure.
void FwPrAddFlowIniToAct(FwPrDesc_t prDesc, FwPrCounterS1_t destId, FwPrGuard_t cfGuard)
Create a control flow from the initial node to an action node and add it to a procedure.
FwPrTestOutcome_t FwPrTestCaseCheck12()
Verify the ability of the FwPrCheck function to detect and report a situation where there is an undef...
Declaration of the dynamical creation interface for a FW Procedure.
void FwPrAddActionNode(FwPrDesc_t prDesc, FwPrCounterS1_t nodeId, FwPrAction_t action)
Create an action node with the given characteristics and add it to a procedure.
int fwPrLogIndex
Index for write operations in log arrays.
#define D1
A decision node identifier.
FwPrErrCode_t FwPrCheck(FwPrDesc_t prDesc)
Check the correctness and completeness of the configuration of a procedure descriptor.
Declaration of the test cases for the FW Procedure Module.
FwPrTestOutcome_t FwPrTestCaseDer1()
Create a derived procedure by extending state machine PR2 (see FwPrMakeTestPR2) and then verify that ...
FwPrTestOutcome_t
Outcome of a procedure test case.
FwPrTestOutcome_t FwPrTestCaseCheck7()
Verify the ability of the FwPrCheck function to detect and report a situation where there is an uncon...
FwPrGuard_t * prGuards
the control flow guards in the procedure
FwPrTestOutcome_t FwPrTestCaseCheck11()
Verify the ability of the FwPrCheck function to detect and report a situation where there is an undef...
Type for the data structure passed to all procedures made by the functions declared by this header fi...
A control flow is added to a procedure with an illegal (out-of-range) action node destination...
FwPrTestOutcome_t FwPrTestCaseExecute4Dir()
Test the behaviour of a procedure created by directly instantiating and configuring its data structur...
int flag_3
Flag used in the procedure control flows.
FwPrTestOutcome_t FwPrTestCaseDerCheck5()
Verify the correctness of the initial state of a derived procedure.
void FwPrAddFlowDecToAct(FwPrDesc_t prDesc, FwPrCounterS1_t srcId, FwPrCounterS1_t destId, FwPrGuard_t cfGuard)
Create a control flow from a decision node to an action node and add it to a procedure.
FwPrTestOutcome_t FwPrTestCaseExecute4Static()
Test the behaviour of a procedure created statically.
void FwPrStart(FwPrDesc_t prDesc)
Start a procedure.
FwPrErrCode_t FwPrGetErrCode(FwPrDesc_t prDesc)
Return the error code of the argument procedure.
void FwPrRun(FwPrDesc_t prDesc)
Run a procedure.