CORDET Framework - C2 Implementation
cordetfw-examples/src/CrConfigDemoMaster/CrFwCmpData.h File Reference

Definition of the Framework Component Data (FCD) Type. More...

Go to the source code of this file.

Data Structures

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

Typedefs

typedef struct CrFwCmpData CrFwCmpData_t
 Type for the Framework Component Data (FCD). More...
 

Detailed Description

Definition of the Framework Component Data (FCD) Type.

Each Framework Component has one instance of a FCD. This data structure is used to exchange input and output data with the actions and guards of the framework components. An instance of this data structure is attached to each state machine descriptor (using function FwSmSetData) and to each procedure descriptor (using function FwPrsetData) used in the framework. The state machines and procedures which belong to the same Framework Component share the same FCD instance.

All the framework components are derived from the Base Component of CrFwBaseCmp.h. Hence, a framework component needs two sets of data: the base data which are the data needed by the functions defined on the Base Component and the derived data which are the data needed by the functions defined on the derived component. The FCD Type is accordingly split into two parts: one part defining the base data and another part defining the derived data.

Framework users may have to modify the definition of the FCD Type if they wish to introduce new components which are derived from the Base Component (see detailed description of CrFwCmpData_t type).

Author
Vaclav Cechticky vacla.nosp@m.v.ce.nosp@m.chtic.nosp@m.ky@p.nosp@m.np-so.nosp@m.ftwa.nosp@m.re.co.nosp@m.m
Alessandro Pasetti paset.nosp@m.ti@p.nosp@m.np-so.nosp@m.ftwa.nosp@m.re.co.nosp@m.m

This file is part of the CORDET Framework.

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 cordetfw-examples/src/CrConfigDemoMaster/CrFwCmpData.h.

Typedef Documentation

typedef struct CrFwCmpData CrFwCmpData_t

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.

P&P Software GmbH, Copyright 2012-2013, All Rights Reserved