#include <DataPool.h>
Inheritance diagram for DataPool:
A data pool is a component that acts as a shared data area for data that must be exchanged among other components. The data pool physically contains the data to be exchanged. The producers of the data deposit them into the data pool and the consumers of the data retrieve them from the data pool. This class implements a data pool as a collection of items with the following attributes:
typedef
declarations (TD_Float
and TD_Integer
). This class defines the following service:
Definition at line 101 of file DataPool.h.
Public Member Functions | |
DataPool (void) | |
Instantiate a data pool object. | |
virtual void | setValue (TD_DataPoolId id, TD_Float newValue)=0 |
Setter method for the value of a real-typed data pool item. | |
virtual void | setValue (TD_DataPoolId id, TD_Integer newValue)=0 |
Setter method for the value of an integer-typed data pool item. | |
virtual TD_Float | getFloatValue (TD_DataPoolId id)=0 |
Getter method for the value of a real-typed data pool item. | |
virtual TD_Integer | getIntegerValue (TD_DataPoolId id)=0 |
Getter method for the value of an integer-typed data pool item. | |
virtual TD_Float * | getPointerFloatValue (TD_DataPoolId id)=0 |
Getter method for the pointer to a real-typed data pool item. | |
virtual TD_Integer * | getPointerIntegerValue (TD_DataPoolId id)=0 |
Getter method for the pointer to an integer-typed data pool item. | |
virtual DC_DataItem * | getDataItem (TD_DataPoolId id) |
Getter method for a data item that encapsulates a data pool item. | |
virtual TD_ObsTime | getTimeStamp (TD_DataPoolId id) |
Return the time stamp of a data pool item. | |
virtual bool | isValid (TD_DataPoolId id) |
Return the validity status of a data pool item. | |
virtual void | setValidityStatus (TD_DataPoolId id, bool newValidityStatus) |
Set the validity status of a data pool item. | |
virtual MonitoringProfile * | getMonitoringProfile (TD_DataPoolId id) |
Get the monitoring profile for a data pool item. | |
virtual RecoveryAction * | getRecoveryAction (TD_DataPoolId id) |
Get the recovery action for a data pool item. | |
virtual TD_DataPoolId | firstIdentifier (void) |
Iteration method that resets the iteration and returns the lowest indentifier of the items in the data pool. | |
virtual TD_DataPoolId | nextIdentifier (void) |
Iteration method that returns the next identifier in an iteration. | |
virtual bool | isLastIdentifier (void) |
Iteration method that checks whether an iteration is finished. | |
virtual bool | isFloat (TD_DataPoolId id) |
Method implementing the type checking service to check whether a data pool item is real-valued. | |
virtual bool | isInteger (TD_DataPoolId id) |
Method implementing the type checking service to check whether a data pool item is integer-typed. | |
virtual void | reset (void) |
Implement the data pool reset service. |
|
Iteration method that resets the iteration and returns the lowest indentifier of the items in the data pool.
This method is used in conjunction with the other two iteration methods for (unsigned int i=firstIdentifier(); !isLastIdentifier(); i=nextIdentifier()) ... // process i-th item in the data poolThe conceptual model behind the iteration methods is as follows. The data pool maintains an internal iteration pointer. During an iteration, this pointer scans all the items in the data pool in sequence. When method firstIdentifier is called, the pointer is reset to point to the lowest valued identifier in the data pool. Each call to method nextIdentifier causes this pointer to switch to the next higher valid identifier in the data pool. Users can check the progress of the iteration by calling method isLastIdentifier which returns false if (and only if) the pointer is positioned on the highest valued identifier in the data pool. This class provides a default implementation that always returns zero. Note that the value of zero is not a legal identifier. This default implementation is useful for the case where a data pool is unable or unwilling to provide a meaningful implementation for the iteration services.
Reimplemented in DC_SampleFullDataPool, and DC_SampleMonitoredDataPool. Definition at line 51 of file DataPool.cpp. |
|
Getter method for a data item that encapsulates a data pool item. This method implements the data item link mechanism. This class provides a default implementation that returns a data item that encapsulates an internal variable of type "unsigned integer" and with a constant value of zero. This default implementation is useful for subclasses that do not wish to implement a data item link mechanism.
Reimplemented in DC_SampleFullDataPool, and DC_SampleMonitoredDataPool. Definition at line 27 of file DataPool.cpp. |
|
Getter method for the value of a real-typed data pool item. This method implements the copy link mechanism for real-valued data.
Implemented in DC_BasicDataPool, DC_SampleFullDataPool, and DC_SampleMonitoredDataPool. |
|
Getter method for the value of an integer-typed data pool item. This method implements the copy link mechanism for integer-valued data.
Implemented in DC_BasicDataPool, DC_SampleFullDataPool, and DC_SampleMonitoredDataPool. |
|
Get the monitoring profile for a data pool item.
This class provides a default implementation that returns the same dummy monitoring profile (an instance of
Reimplemented in DC_SampleFullDataPool, and DC_SampleMonitoredDataPool. Definition at line 43 of file DataPool.cpp. |
|
Getter method for the pointer to a real-typed data pool item. This method implements the pointer link mechanism for real-typed data.
Implemented in DC_BasicDataPool, DC_SampleFullDataPool, and DC_SampleMonitoredDataPool. |
|
Getter method for the pointer to an integer-typed data pool item. This method implements the pointer link mechanism for integer-typed data.
Implemented in DC_BasicDataPool, DC_SampleFullDataPool, and DC_SampleMonitoredDataPool. |
|
Get the recovery action for a data pool item.
This class provides a default implementation that returns the same dummy recovery action (an instance of
Reimplemented in DC_SampleFullDataPool. Definition at line 47 of file DataPool.cpp. |
|
Return the time stamp of a data pool item. The time stamp of a data pool item is normally set by the setter method when the item value is updated. This class provides a default implementation that always returns zero.
Reimplemented in DC_SampleFullDataPool. Definition at line 31 of file DataPool.cpp. |
|
Method implementing the type checking service to check whether a data pool item is real-valued.
A real-value item is an item with a value whose syntactical type is
This method is often used during an iteration to verify whether the data item being iterated upon is real-valued. This is important because it allows the client to decide which getter method to use to retrieve its value. Note that this class also offers a method to check whether a data pool item is integer-valued (method This class provides a default implementation that always returns true. This default implementation is useful for the case where a data pool is unable or unwilling to distinguish between real-valued and integer-valued items.
Reimplemented in DC_SampleFullDataPool. Definition at line 63 of file DataPool.cpp. |
|
Method implementing the type checking service to check whether a data pool item is integer-typed.
This method is the counterpart of method
Reimplemented in DC_SampleFullDataPool. Definition at line 67 of file DataPool.cpp. |
|
Iteration method that checks whether an iteration is finished.
This method is used in conjunction with the other two iteration methods This class provides a default implementation that always returns true. This default implementation is useful for the case where a data pool is unable or unwilling to provide a meaningful implementation for the iteration services.
Reimplemented in DC_SampleFullDataPool, and DC_SampleMonitoredDataPool. Definition at line 59 of file DataPool.cpp. |
|
Return the validity status of a data pool item. This class provides a default implementation that always returns "data valid".
Reimplemented in DC_SampleFullDataPool, and DC_SampleMonitoredDataPool. Definition at line 35 of file DataPool.cpp. |
|
Iteration method that returns the next identifier in an iteration.
This method is used in conjunction with the other two iteration methods This class provides a default implementation that always returns zero. Note that the value of zero is not a legal identifier. This default implementation is useful for the case where a data pool is unable or unwilling to provide a meaningful implementation for the iteration services.
Reimplemented in DC_SampleFullDataPool, and DC_SampleMonitoredDataPool. Definition at line 55 of file DataPool.cpp. |
|
Implement the data pool reset service. The validity status of all data pool item is reset to the value it had at the time the data pool component was created. This class provides a default implementation that returns without doing anything.
Reimplemented in DC_SampleFullDataPool, and DC_SampleMonitoredDataPool. Definition at line 71 of file DataPool.cpp. |
|
Set the validity status of a data pool item. This class provides a default implementation that returns without taking any action.
Reimplemented in DC_SampleFullDataPool, and DC_SampleMonitoredDataPool. Definition at line 39 of file DataPool.cpp. |
|
Setter method for the value of an integer-typed data pool item.
Implemented in DC_BasicDataPool, DC_SampleFullDataPool, and DC_SampleMonitoredDataPool. |
|
Setter method for the value of a real-typed data pool item.
Implemented in DC_BasicDataPool, DC_SampleFullDataPool, and DC_SampleMonitoredDataPool. |