Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

DataItemControlBlock Class Reference
[Data Processing]

#include <DataItemControlBlock.h>

Inheritance diagram for DataItemControlBlock:

ControlBlock CC_RootObject DC_DummyDataItemControlBlock DC_MatlabDataItemPID List of all members.

Detailed Description

Base class for data item control blocks.

A data item control block is a control block that takes its inputs from and writes its outputs to data items (instances of class DC_DataItem). The data items are loaded as part of the control block configuration. This class therefore adds the following attributes to its ControlBlock base class:<ul> The input data items: the data items from which the input values are read. The output data items: the data items to which the output values are written. This class adds services to set up the link between the block inputs and outputs and the data items from which the inputs are read and to which the outputs are written.

See also:
DC_DataItem
Author:
Alessandro Pasetti, Roberto Totaro
Version:
1.0

Definition at line 33 of file DataItemControlBlock.h.

Public Member Functions

 DataItemControlBlock ()
 Instantiate a data item control block.

void setInputLink (unsigned int i, DC_DataItem *pDataItem)
 Load the data item for the i-th input.

void setOutputLink (unsigned int i, DC_DataItem *pDataItem)
 Load the data item for the i-th output.

virtual bool isObjectConfigured (void)
 Perform a class-specific configuration check on a pointer control block.


Protected Member Functions

virtual void setNumberOfInputs (unsigned int n)
 Set the number of inputs.

virtual void setNumberOfOutputs (unsigned int n)
 Set the number of outputs.


Protected Attributes

DC_DataItem ** pDIU
 Array of input data items.

DC_DataItem ** pDIY
 Array of output data items.


Constructor & Destructor Documentation

DataItemControlBlock::DataItemControlBlock  ) 
 

Instantiate a data item control block.

The input data items and output data items are initialized to illegal values to signify that the component is not yet configured.

Definition at line 18 of file DataItemControlBlock.cpp.


Member Function Documentation

bool DataItemControlBlock::isObjectConfigured void   )  [virtual]
 

Perform a class-specific configuration check on a pointer control block.

It is checked that the input and output data items have been loaded.

Reimplemented from ControlBlock.

Definition at line 59 of file DataItemControlBlock.cpp.

void DataItemControlBlock::setInputLink unsigned int  i,
DC_DataItem pDataItem
 

Load the data item for the i-th input.

The argument i must lie in the interval [0,N-1] where N is the number of inputs. An illegal value for argument i triggers the generation of an event report EVT_ILLEGAL_CB.

Parameters:
i the index of the input
pDataItem the data item

Definition at line 41 of file DataItemControlBlock.cpp.

void DataItemControlBlock::setNumberOfInputs unsigned int  n  )  [protected, virtual]
 

Set the number of inputs.

This method causes the memory for the array holding the input data items to be allocated.

Parameters:
n the number of inputs

Implements ControlBlock.

Definition at line 23 of file DataItemControlBlock.cpp.

void DataItemControlBlock::setNumberOfOutputs unsigned int  n  )  [protected, virtual]
 

Set the number of outputs.

This method causes the memory for the array holding the output data items to be allocated.

Parameters:
n the number of outputs

Implements ControlBlock.

Definition at line 32 of file DataItemControlBlock.cpp.

void DataItemControlBlock::setOutputLink unsigned int  i,
DC_DataItem pDataItem
 

Load the data item for the i-th output.

The argument i must lie in the interval [0,N-1] where N is the number of outputs. An illegal value for argument i triggers the generation of an event report EVT_ILLEGAL_CB.

Parameters:
i the index of the output
pDataItem the data item

Definition at line 50 of file DataItemControlBlock.cpp.


Member Data Documentation

DC_DataItem** DataItemControlBlock::pDIU [protected]
 

Array of input data items.

Element pDIU[i] holds the pointer to the data item that provides the i-th input variable. The integer i must lie in the interval [0,N-1] where N is the number of inputs.

See also:
setInputLink

Definition at line 42 of file DataItemControlBlock.h.

DC_DataItem** DataItemControlBlock::pDIY [protected]
 

Array of output data items.

Element pDIY[i] holds the pointer to the data item to which the i-th output variable is written. The integer i must lie in the interval [0,N-1] where N is the number of outputs.

See also:
setOutputLink

Definition at line 51 of file DataItemControlBlock.h.


The documentation for this class was generated from the following files:
Copyright 2003 P&P Software GmbH - All Rights Reserved