CORDET Framework - C2 Implementation
CrFwCmpData Struct Reference

Type for the Framework Component Data (FCD). More...

Data Fields

CrFwInstanceId_t instanceId
 The instance identifier of the framework component. More...
 
CrFwTypeId_t typeId
 The type identifier of the framework component. More...
 
CrFwOutcome_t outcome
 The outcome of an action or check executed by a state machine or by one of its procedures. More...
 
FwPrDesc_t initProc
 The Component Initialization Procedure (CIP) (see CrFwInitProc.h). More...
 
FwPrDesc_t resetProc
 The Component Reset Procedure (CRP) (see CrFwResetProc.h). More...
 
FwPrDesc_t execProc
 The Component Execution Procedure (CEP) (see CrFwBaseCmp.h). More...
 
void * cmpSpecificData
 Derived data which are specific to each type of framework component. More...
 

Detailed Description

Type for the Framework Component Data (FCD).

The FCD Type is defined as a structure with a number of fixed fields and one open "component-specific" field (a pointer to void). The fixed fields define the base data of the FCD (i.e. the data which are used by the Base Component part of a Framework Component). The component-specific field can be used for additional data which are specific to each type of component derived from the Base Component.

As an example, consider the case of an OutStream framework component (see CrFwOutStream.h). The fixed fields in the FCD type cover the part of the OutStream data which is inherited from the Base Component. The cmpSpecificData field covers the data which are specific to the OutStream type.

The content of the cmpSpecificData must be cast to the appropriate type depending on the type of component which is being manipulated. Thus, for instance, in the case of OutStream component, the cmpSpecificData field must be cast to a pointer of type: CrFwOutStreamData_t. The component-specific data types are defined in CrFwConstants.h.

This type is user-configurable to cover the case where an application developer needs additional data to be attached to the component instances.

Definition at line 79 of file CrFwCmpData.h.

Field Documentation

void* cmpSpecificData

Derived data which are specific to each type of framework component.

Definition at line 101 of file CrFwCmpData.h.

FwPrDesc_t execProc

The Component Execution Procedure (CEP) (see CrFwBaseCmp.h).

Definition at line 99 of file CrFwCmpData.h.

FwPrDesc_t initProc

The Component Initialization Procedure (CIP) (see CrFwInitProc.h).

Definition at line 95 of file CrFwCmpData.h.

CrFwInstanceId_t instanceId

The instance identifier of the framework component.

Definition at line 81 of file CrFwCmpData.h.

CrFwOutcome_t outcome

The outcome of an action or check executed by a state machine or by one of its procedures.

In many cases, an action or a check have an outcome. This is a generic field where that outcome can be stored. Module CrFwUtilityFunctions.h defines convenience functions which check whether the outcome is equal to a certain value. Where the logical outcome is either "success" or "failure", the value of '1' is used to represent "success" and the value of '0' is used to represent "failure".

Definition at line 93 of file CrFwCmpData.h.

FwPrDesc_t resetProc

The Component Reset Procedure (CRP) (see CrFwResetProc.h).

Definition at line 97 of file CrFwCmpData.h.

CrFwTypeId_t typeId

The type identifier of the framework component.

Definition at line 83 of file CrFwCmpData.h.


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