FW Profile - C1 Implementation
|
Declaration of the execution interface for a FW Procedure. More...
Go to the source code of this file.
Functions | |
void | FwPrStart (FwPrDesc_t prDesc) |
Start a procedure. More... | |
void | FwPrStop (FwPrDesc_t prDesc) |
Stop a procedure. More... | |
void | FwPrExecute (FwPrDesc_t prDesc) |
Execute a procedure. More... | |
void | FwPrRun (FwPrDesc_t prDesc) |
Run a procedure. More... | |
FwPrCounterS1_t | FwPrGetCurNode (FwPrDesc_t prDesc) |
Return the identifier of the current action node in a procedure. More... | |
FwPrBool_t | FwPrIsStarted (FwPrDesc_t prDesc) |
Check whether the procedure is started. More... | |
FwPrErrCode_t | FwPrGetErrCode (FwPrDesc_t prDesc) |
Return the error code of the argument procedure. More... | |
FwPrCounterU3_t | FwPrGetExecCnt (FwPrDesc_t prDesc) |
Return the Procedure Execution Counter. More... | |
FwPrCounterU3_t | FwPrGetNodeExecCnt (FwPrDesc_t prDesc) |
Return the Node Execution Counter. More... | |
Declaration of the execution interface for a FW Procedure.
The execution interface offers the functions to start and stop a procedure and to execute a procedure. The functions declared in this header file, take a procedure descriptor as their first argument. This represents the procedure upon which the functions operate.
The functions declared in this header file can only be used after a procedure has been fully configured. This is normally done using the configuration functions declared in FwPrConfig.h
. The basic mode of use of the functions declared in this file is as follows:
FwPrStart
.FwPrExecute
.FwPrStop
.The functions declared in this header file assume that they are passed a valid procedure descriptor representing a correctly configured procedure. Failure to comply with this assumption will result in undefined behaviour.
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 FwPrCore.h.
void FwPrExecute | ( | FwPrDesc_t | prDesc | ) |
Execute a procedure.
The semantics of this function is defined by the following activity diagram (this is taken from figure 3.3-2 in the "FW Profile Definition Document"):
If the execution of the procedure passes through a decision node and there are two or more control flows out of that node which have guards which evaluate to true, the control flow to be taken is the one which was added first to the procedure.
The FW Profile stipulates that at least one of the control flows out of a decision node must have a guard evaluating to true. This constraint is not enforced by this function. However, if the constraint is violated, the error code is set to prFlowErr
. The procedure, however, remains in a consistent state.
prDesc | the descriptor of the procedure where the transition is triggered. |
Definition at line 43 of file FwPrCore.c.
FwPrCounterS1_t FwPrGetCurNode | ( | FwPrDesc_t | prDesc | ) |
Return the identifier of the current action node in a procedure.
The following convention is used:
prDesc | the descriptor of the procedure. |
Definition at line 117 of file FwPrCore.c.
FwPrErrCode_t FwPrGetErrCode | ( | FwPrDesc_t | prDesc | ) |
Return the error code of the argument procedure.
The error code of a procedure holds either prSuccess
if the procedure never encountered an error or else it holds the code of the last error encountered by the procedure. If the error code is different from prSuccess
, the behaviour of the procedure is undefined.
prDesc | the descriptor of the procedure. |
prSuccess
or the code of the last error encountered by the procedure. Definition at line 131 of file FwPrCore.c.
FwPrCounterU3_t FwPrGetExecCnt | ( | FwPrDesc_t | prDesc | ) |
Return the Procedure Execution Counter.
The Procedure Execution Counter holds the number of execution cycles since the procedure was started. Note that the Procedure Execution Counter is not reset when the procedure is stopped (it is only reset when the procedure is started).
prDesc | the descriptor of the procedure. |
Definition at line 136 of file FwPrCore.c.
FwPrCounterU3_t FwPrGetNodeExecCnt | ( | FwPrDesc_t | prDesc | ) |
Return the Node Execution Counter.
The Node Execution Counter holds the number of execution cycles since the current node was entered. Note that the Node Execution Counter is not reset when the procedure is stopped (it is only reset when the procedure is started).
prDesc | the descriptor of the procedure. |
Definition at line 141 of file FwPrCore.c.
FwPrBool_t FwPrIsStarted | ( | FwPrDesc_t | prDesc | ) |
Check whether the procedure is started.
prDesc | the descriptor of the procedure. |
Definition at line 122 of file FwPrCore.c.
void FwPrRun | ( | FwPrDesc_t | prDesc | ) |
Run a procedure.
When a procedure is run, the procedure is first started, then it is executed once, and then it is stopped.
prDesc | the descriptor of the procedure where the transition is triggered. |
Definition at line 109 of file FwPrCore.c.
void FwPrStart | ( | FwPrDesc_t | prDesc | ) |
Start a procedure.
The semantics of this operation is defined by the activity diagram of the following figure (this is figure 3.3-1 in the "FW Profile Definition Document"):
prDesc | the descriptor of the procedure to be started. |
Definition at line 29 of file FwPrCore.c.
void FwPrStop | ( | FwPrDesc_t | prDesc | ) |
Stop a procedure.
The semantics of this operation is defined by the activity diagram of the following figure (this is figure 3.3-1 in the "FW Profile Definition Document"):
prDesc | the descriptor of the procedure to be started. |
Definition at line 38 of file FwPrCore.c.