FW Profile - C1 Implementation
|
Implementation of test procedures for FW Procedure Module. More...
Go to the source code of this file.
Functions | |
struct TestPrData * | GetTestPrData (FwPrDesc_t prDesc) |
Get the pointer to the procedure data of a test procedure. More... | |
FwPrDesc_t | FwPrMakeTestPR1 (struct TestPrData *prData) |
Operation to create the test procedure PR1. More... | |
FwPrDesc_t | FwPrMakeTestPR1Static (struct TestPrData *prData) |
Operation to create and configure the procedure PR1 (see FwPrMakeTestPR1 and figure below) statically using the interface defined in FwPrSCreate.h . More... | |
FwPrDesc_t | FwPrMakeTestPR2 (struct TestPrData *prData) |
Operation to create the test procedure PR2. More... | |
FwPrDesc_t | FwPrMakeTestPR2Dir (struct TestPrData *prData) |
Operation to create the test procedure PR2 (see FwPrMakeTestPR2 and figure below) directly by instantiating and configuring its data structures. More... | |
FwPrDesc_t | FwPrMakeTestPR2Static (struct TestPrData *prData) |
Operation to create and configure the procedure PR2 (see FwPrMakeTestPR2 and figure below) statically using the interface defined in FwPrSCreate.h . More... | |
FwPrDesc_t | FwPrMakeTestPR3 (struct TestPrData *prData) |
Operation to create the test procedure PR3. More... | |
FwPrDesc_t | FwPrMakeTestPR4 (struct TestPrData *prData) |
Operation to create the test procedure PR4. More... | |
FwPrDesc_t | FwPrMakeTestPR5 (struct TestPrData *prData) |
Operation to create the test procedure PR5. More... | |
FwPrDesc_t | FwPrMakeTestPR6_1 (struct TestPrData *prData) |
Operation to create the test procedure PR6. More... | |
FwPrDesc_t | FwPrMakeTestPR6_2 (struct TestPrData *prData) |
Operation to create the test procedure PR6. More... | |
FwPrDesc_t | FwPrMakeTestPR6_3 (struct TestPrData *prData) |
Operation to create the test procedure PR6. More... | |
FwPrDesc_t | FwPrMakeTestPRDer1 (FwPrDesc_t prDescBase, struct TestPrData *prData) |
Create a derived procedure and override one of its actions and one of its guards. More... | |
FwPrDesc_t | FwPrMakeTestPRDer1Static (FwPrDesc_t prDescBase, struct TestPrData *prData) |
Create a derived procedure and override one of its actions and one of its guards. More... | |
Variables | |
int | fwPrLogMarker [LOG_ARRAY_SIZE] |
Log array where the actions of the test procedures write their markers. More... | |
int | fwPrLogNode [LOG_ARRAY_SIZE] |
Log array where the actions of the test procedures write the current state of their procedure. More... | |
int | fwPrLogIndex |
Location in the log array where the next entry is written. More... | |
Implementation of test procedures for FW Procedure Module.
This file is part of the FW Profile.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
For information on alternative licensing, please contact P&P Software GmbH.
Definition in file FwPrMakeTest.c.
FwPrDesc_t FwPrMakeTestPR1 | ( | struct TestPrData * | prData | ) |
Operation to create the test procedure PR1.
This procedure has the following characteristics:
prData | the data structure upon which the procedure operates |
Definition at line 177 of file FwPrMakeTest.c.
FwPrDesc_t FwPrMakeTestPR1Static | ( | struct TestPrData * | prData | ) |
Operation to create and configure the procedure PR1 (see FwPrMakeTestPR1
and figure below) statically using the interface defined in FwPrSCreate.h
.
prData | the data structure upon which the procedure operates |
Definition at line 205 of file FwPrMakeTest.c.
FwPrDesc_t FwPrMakeTestPR2 | ( | struct TestPrData * | prData | ) |
Operation to create the test procedure PR2.
This procedure has the following characteristics (see also figure below):
prData | the data structure upon which the procedure operates |
Definition at line 230 of file FwPrMakeTest.c.
FwPrDesc_t FwPrMakeTestPR2Dir | ( | struct TestPrData * | prData | ) |
Operation to create the test procedure PR2 (see FwPrMakeTestPR2
and figure below) directly by instantiating and configuring its data structures.
This function does not use any of the functions provided by the C1 Implementation to create and configure a procedure. Instead, it instantiated and directly configures the data structures which define the procedure PR2. This approach to creating a procedure is useful in applications which are severely memory-constrained because it allowed them to do without the FwPrSCreate.h
, FwPrDCreate.h
, and FwPrConfig.h
.
prData | the data structure upon which the procedure operates |
Definition at line 267 of file FwPrMakeTest.c.
FwPrDesc_t FwPrMakeTestPR2Static | ( | struct TestPrData * | prData | ) |
Operation to create and configure the procedure PR2 (see FwPrMakeTestPR2
and figure below) statically using the interface defined in FwPrSCreate.h
.
prData | the data structure upon which the procedure operates |
Definition at line 347 of file FwPrMakeTest.c.
FwPrDesc_t FwPrMakeTestPR3 | ( | struct TestPrData * | prData | ) |
Operation to create the test procedure PR3.
This procedure has the following characteristics (see also figure below):
prData | the data structure upon which the procedure operates |
Definition at line 380 of file FwPrMakeTest.c.
FwPrDesc_t FwPrMakeTestPR4 | ( | struct TestPrData * | prData | ) |
Operation to create the test procedure PR4.
This procedure has the following characteristics (see also figure below):
prData | the data structure upon which the procedure operates |
Definition at line 404 of file FwPrMakeTest.c.
FwPrDesc_t FwPrMakeTestPR5 | ( | struct TestPrData * | prData | ) |
Operation to create the test procedure PR5.
This procedure has the following characteristics (see also figure below):
prData | the data structure upon which the procedure operates |
Definition at line 432 of file FwPrMakeTest.c.
FwPrDesc_t FwPrMakeTestPR6_1 | ( | struct TestPrData * | prData | ) |
Operation to create the test procedure PR6.
This procedure has the following characteristics (see also figure below):
The control flows are added to the procedure in the order in which they are listed above.
prData | the data structure upon which the procedure operates |
Definition at line 460 of file FwPrMakeTest.c.
FwPrDesc_t FwPrMakeTestPR6_2 | ( | struct TestPrData * | prData | ) |
Operation to create the test procedure PR6.
This procedure has the following characteristics (see also figure below):
The control flows are added to the procedure in the order in which they are listed above.
prData | the data structure upon which the procedure operates |
Definition at line 492 of file FwPrMakeTest.c.
FwPrDesc_t FwPrMakeTestPR6_3 | ( | struct TestPrData * | prData | ) |
Operation to create the test procedure PR6.
This procedure has the following characteristics (see also figure below):
The control flows are added to the procedure in the order in which they are listed above.
prData | the data structure upon which the procedure operates |
Definition at line 524 of file FwPrMakeTest.c.
FwPrDesc_t FwPrMakeTestPRDer1 | ( | FwPrDesc_t | prDescBase, |
struct TestPrData * | prData | ||
) |
Create a derived procedure and override one of its actions and one of its guards.
The base procedure is passed as an argument to the function. The function extends the base procedure and then it performs the following overrides on the derived procedure:
incrCnt1By1
(increment Counter_1 by 1) is overridden with action incrCnt1By8
(increment Counter_1 by 8).retFlag1
(return Flag_1) is overridden with guard retFlag2
(return Flag_2).The derived state machine is created using the dynamic creation interface of FwPrDCreate.h
.
prDescBase | the base state machine |
prData | the data structure for the newly created state machine |
Definition at line 555 of file FwPrMakeTest.c.
FwPrDesc_t FwPrMakeTestPRDer1Static | ( | FwPrDesc_t | prDescBase, |
struct TestPrData * | prData | ||
) |
Create a derived procedure and override one of its actions and one of its guards.
The base procedure is passed as an argument to the function. This function assumes that the base state machine has 1 action, and 8 guards. The function extends the base procedure and then it performs the following overrides on the derived procedure:
incrCnt1By1
(increment Counter_1 by 1) is overridden with action incrCnt1By8
(increment Counter_1 by 8).retFlag1
(return Flag_1) is overridden with guard retFlag2
(return Flag_2).The derived state machine is created using the static creation interface of FwPrSCreate.h
.
prDescBase | the base state machine |
prData | the data structure for the newly created state machine |
Definition at line 568 of file FwPrMakeTest.c.
struct TestPrData * GetTestPrData | ( | FwPrDesc_t | prDesc | ) |
Get the pointer to the procedure data of a test procedure.
This function is a wrapper for the FwPrGetData
function. Function FwPrGetData
is defined at the level of the Procedure Module and returns the pointer to the procedure data as a pointer to void
. This function cast this pointer to pointer to struct TestPrData*
.
prDesc | the state machine descriptor |
Definition at line 172 of file FwPrMakeTest.c.
int fwPrLogIndex |
Location in the log array where the next entry is written.
Index for write operations in log arrays.
Definition at line 35 of file FwPrMakeTest.c.
int fwPrLogMarker[LOG_ARRAY_SIZE] |
Log array where the actions of the test procedures write their markers.
Array where procedure actions write their marker.
Definition at line 26 of file FwPrMakeTest.c.
int fwPrLogNode[LOG_ARRAY_SIZE] |
Log array where the actions of the test procedures write the current state of their procedure.
Array where procedure actions write the state of their SM.
Definition at line 31 of file FwPrMakeTest.c.