FW Profile - C1 Implementation
FwPrDesc Struct Reference

Structure representing a procedure descriptor. More...

Data Fields

PrBaseDesc_tprBase
 pointer to the base descriptor
 
FwPrAction_tprActions
 the procedure actions
 
FwPrGuard_tprGuards
 the control flow guards in the procedure
 
FwPrCounterS1_t nOfActions
 the number of actions in the procedure
 
FwPrCounterS1_t nOfGuards
 the number of guards in the procedure
 
FwPrCounterS1_t flowCnt
 the counter for the number of control flows added to the procedure
 
FwPrCounterS1_t curNode
 the current node of the procedure
 
FwPrErrCode_t errCode
 either 'success' or the code of the last error encountered by the procedure
 
FwPrCounterU3_t prExecCnt
 the procedure execution counter
 
FwPrCounterU3_t nodeExecCnt
 the node execution counter
 
void * prData
 the pointer to the data manipulated by the procedure actions and guards
 

Detailed Description

Structure representing a procedure descriptor.

Field prBase points to the base descriptor for the procedure which holds the information about the action nodes, decision nodes and the control flows connecting them.

Array prActions holds the list of all actions in the procedure. Each distinct action only appears once in the action array. If the same action is used several times in a procedure, only one instance is registered in the action array.

Array prGuards holds the list of all control flow guards in the procedure. If the same guard is used several times in a procedure, only one instance is registered in the guard array. The first location in the guard array (location 0) holds the "dummy guard" PrDummyGuard which always returns 1.

When a new action node is added to the procedure, field flowCnt holds the position in the control flow array where its out-going control flow will be stored.

The identifier of the current node is stored in curNode. The following convention is used:

  • A value of 0 indicates that the procedure is in the STOPPED state;
  • A value of -1 indicates that the procedure is in the STARTED state but the guard on the flow out of the initial node was false and hence the procedure is waiting in the initial node;
  • A value of i (a positive integer) indicates that the procedure is in the STARTED state and i is the identifier of its current node.

If during the creation, configuration or execution of the procedure, an error is encountered, the corresponding error code is stored in field errCode. This field is initialized to prSuccess and should nominally remain unchanged throughout the life of the procedure. If the error code has a value other than prSuccess, the behaviour of the procedure is undefined.

There are two types of procedures: base procedures (i.e. procedures which are created from scratch using FwPrCreate or FW_SM_INST) and derived procedures (i.e. procedures which are created by extending a base procedure through calls to FwPrCreateDer or FW_PR_INST_DER). By convention, a derived procedure is characterized by field flowCnt being equal to zero.

Two counters are associated to a procedure: the Procedure Execution Counter and the Node Execution Counter. The Procedure Execution Counter holds the number of execution cycles since the procedure was started and the Node Execution Counter holds the number of cycle since the current node was entered.

Definition at line 254 of file FwPrPrivate.h.


The documentation for this struct was generated from the following file:
P&P Software GmbH, Copyright 2011, All Rights Reserved