CARMA C++
carma::monitor::SystemThresholdFrame Class Reference

Class that manages the thresholds for all the monitor points within a monitor system (represented by a carma::monitor::MonitorSystem object). More...

#include <carma/monitor/SystemThresholdFrame.h>

Inheritance diagram for carma::monitor::SystemThresholdFrame:
carma::monitor::SystemThresholdFrameBuffer carma::monitor::MonitorSystemWithThreshold

Public Member Functions

virtual void calibrateMonitorSystem ()
 Sets threshold related validity flags for all monitor points in the MonitorSystem. More...
 
long getMaxNumThresholds () const
 Returns maximum number of allocatable thresholds. More...
 
long getNumThresholds () const
 Returns number of allocated thresholds. More...
 
MonitorPointThreshold & getThreshold (tagIDType tagID) const
 Returns the MonitorPointThreshold object associated with the monitor point mp such that mp.getTagID() == tagID. More...
 
 SystemThresholdFrame (MonitorSystem &monitorSystem)
 Constructor - creates a struct using the MonitorSystem, initializes struct with the maxThresholds, sizes it correctly, so the pointers point to meaningful spaces. More...
 
virtual ~SystemThresholdFrame ()
 Destructor - deletes frame structure. More...
 

Protected Member Functions

int findThreshold (tagIDType tagID) const
 Searches for index to threshold with tagID. More...
 
ThresholdFrameStructgetThresholdFrame () const
 Returns reference to internal ThresholdFrameStruct. More...
 
ThresholdStruct & getThresholdStruct (int index) const
 Returns reference to internal ThresholdStruct. More...
 

Static Protected Member Functions

static ThresholdFrameStructfixupFramePointers (ThresholdFrameStruct &frame)
 Initializes the pointers within the ThresholdFrameStruct to point to meaningful spaces based on the maxNumThresholds member of the structure. More...
 
static ThresholdFrameStructsetThresholdFrameSize (ThresholdFrameStruct &frame, long maxThresholds)
 Initializes size related portions of ThresholdFrameStruct. More...
 
static size_t sizeThresholdFrame (long maxThresholds)
 Computes size of threshold frame required to hold. More...
 

Detailed Description

Class that manages the thresholds for all the monitor points within a monitor system (represented by a carma::monitor::MonitorSystem object).

See Also
MonitorSystem
MonitorPoint

Definition at line 142 of file SystemThresholdFrame.h.

Constructor & Destructor Documentation

carma::monitor::SystemThresholdFrame::SystemThresholdFrame ( MonitorSystem monitorSystem)
explicit

Constructor - creates a struct using the MonitorSystem, initializes struct with the maxThresholds, sizes it correctly, so the pointers point to meaningful spaces.

virtual carma::monitor::SystemThresholdFrame::~SystemThresholdFrame ( )
virtual

Destructor - deletes frame structure.

See Also
SystemThresholdFrame::SystemThresholdFrame

Member Function Documentation

virtual void carma::monitor::SystemThresholdFrame::calibrateMonitorSystem ( )
virtual

Sets threshold related validity flags for all monitor points in the MonitorSystem.

Returns
none

Reimplemented in carma::monitor::SystemThresholdFrameBuffer.

int carma::monitor::SystemThresholdFrame::findThreshold ( tagIDType  tagID) const
protected

Searches for index to threshold with tagID.

Returns index in threshold array.

Parameters
tagIDTag ID of threshold to find.
Returns
int index in threshold array, of threshold we want.
static ThresholdFrameStruct& carma::monitor::SystemThresholdFrame::fixupFramePointers ( ThresholdFrameStruct frame)
staticprotected

Initializes the pointers within the ThresholdFrameStruct to point to meaningful spaces based on the maxNumThresholds member of the structure.

Assumes that frame.maxNumThresholds has been set correctly.

Parameters
frameThresholdFrameStruct& to be initialized.
Returns
ThresholdFrameStruct& reference to initialized structure.
long carma::monitor::SystemThresholdFrame::getMaxNumThresholds ( ) const

Returns maximum number of allocatable thresholds.

Returns
long maximum number of allocatable thresholds - always >= 0.
long carma::monitor::SystemThresholdFrame::getNumThresholds ( ) const

Returns number of allocated thresholds.

Returns
long number of allocated thresholds - always >= 0.
MonitorPointThreshold& carma::monitor::SystemThresholdFrame::getThreshold ( tagIDType  tagID) const

Returns the MonitorPointThreshold object associated with the monitor point mp such that mp.getTagID() == tagID.

Returned reference points to an allocated object. Caller must delete object.

Parameters
tagIDTag ID associated with the associated monitor point.
Returns
MonitorPointThreshold& associated threshold object.
ThresholdFrameStruct& carma::monitor::SystemThresholdFrame::getThresholdFrame ( ) const
protected

Returns reference to internal ThresholdFrameStruct.

Useful when constructing some derived classes.

Returns
ThresholdFrameStruct reference to internal frame structure.
ThresholdStruct& carma::monitor::SystemThresholdFrame::getThresholdStruct ( int  index) const
protected

Returns reference to internal ThresholdStruct.

Useful when constructing a MonitorPointThreshold object.

Parameters
indexIndex of threshold in threshold array contained in the ThresholdFrameStruct.
Returns
ThresholdStruct reference to internal threshold structure.
See Also
MonitorPointThreshold
ThresholdFrameStruct
ThresholdStruct
static ThresholdFrameStruct& carma::monitor::SystemThresholdFrame::setThresholdFrameSize ( ThresholdFrameStruct frame,
long  maxThresholds 
)
staticprotected

Initializes size related portions of ThresholdFrameStruct.

Sets maximum # of thresholds that can be accomodated in the structure, and sets the pointers to point to the correct locations based on the maximum # of thresholds.

Parameters
frameThresholdFrameStruct& to be initialized.
maxThresholdsmaximum # of thresholds the structure can accomodate.
Returns
ThresholdFrameStruct& reference to initialized structure.
static size_t carma::monitor::SystemThresholdFrame::sizeThresholdFrame ( long  maxThresholds)
staticprotected

Computes size of threshold frame required to hold.

maxThresholds

number of thresholds.

Parameters
maxThresholdslong maximum number of thresholds the ThresholdFrameStruct is expected to hold.
Returns
size_t size of ThresholdFrameStruct required to hold
maxThresholds
thresholds.

The documentation for this class was generated from the following file: