CARMA C++
carma::monitor::MonitorPointAverageT< U > Class Template Reference

Template for collecting data for computing average associated with one monitor point. More...

#include <carma/monitor/MonitorPointAverageT.h>

Inherits carma::monitor::MonitorPointAverageBase.

Public Member Functions

getAccumulator () const
 Get cumulative value of samples. More...
 
getMaxValue () const
 Get maximum of sample values. More...
 
getMinValue () const
 Get minimum value across all accumulated samples. More...
 
void incrementAccumulator (const U &value)
 Increment cumulative value of samples. More...
 
 MonitorPointAverageT (const U &initialValue, const U &max, const U &min)
 Constructor - sets specified initial value, which may be different for various types, and for specific monitor points. More...
 
 MonitorPointAverageT ()
 Default constructor - sets all values to zero using template specialization to do it appropriately. More...
 
void setAccumulator (const U &value)
 Set cumulative value of samples. More...
 
void setMaxValue (const U &value)
 Set maximum sample value. More...
 
void setMinValue (const U &value)
 Set minimum across all accumulated samples. More...
 
 ~MonitorPointAverageT ()
 Destructor - Doesnt do anything by default as the compiler takes care of deleting component members. More...
 
- Public Member Functions inherited from carma::monitor::MonitorPointAverageBase
enum
MonitorPoint::BLANKING_FLAGGING 
getBlanking () const
 Get cumulative blanking flag. More...
 
ushort getDbBlanking () const
 
ushort getDbValidity () const
 
int getNumTotalSamples () const
 Get total number of samples. More...
 
int getNumValidSamples () const
 Get number of valid samples. More...
 
enum MonitorPoint::VALIDITY getValidity () const
 Get cumulative blanking flag. More...
 
void incrementNumTotalSamples (int nTotalSamples=1)
 Increments total number of samples. More...
 
void incrementNumValidSamples (int nValidSamples=1)
 Increments number of valid samples. More...
 
void resetAveProperties ()
 Method used to reset # of valid samples, total # of samples, cumulative validity and blanking flags. More...
 
void setBlanking (enum MonitorPoint::BLANKING_FLAGGING blanking)
 Set cumulative blanking flag. More...
 
void setNumTotalSamples (int nTotalSamples)
 Set total number of samples. More...
 
void setNumValidSamples (int nValidSamples)
 Set number of valid samples. More...
 
void setValidity (enum MonitorPoint::VALIDITY validity)
 Set cumulative validity flag. More...
 
void writeAvePropsToBuf (char *c) const
 
void writeAvePropsToFile (FILE *f) const
 

Detailed Description

template<typename U>
class carma::monitor::MonitorPointAverageT< U >

Template for collecting data for computing average associated with one monitor point.

Encapsulates base level methods for accumulating sample values, keeping track of max/min values across all accumulated sample values, and keeping track of number of valid samples, total # of samples and total validity and blanking status.

See Also
MonitorPoint::MonitorPointAccumulatorT

Definition at line 190 of file MonitorPointAverageT.h.

Constructor & Destructor Documentation

template<typename U>
carma::monitor::MonitorPointAverageT< U >::MonitorPointAverageT ( const U &  initialValue,
const U &  max,
const U &  min 
)

Constructor - sets specified initial value, which may be different for various types, and for specific monitor points.

Initializes max/min values. # of valid ssamples, total # of samples, and cumulative validity and blanking flags.

Definition at line 474 of file MonitorPointAverageT.h.

Default constructor - sets all values to zero using template specialization to do it appropriately.

Used only by MonitorPointAccumulatorT template.

See Also
carma::monitor::MonitorPointAccumulatorT

Destructor - Doesnt do anything by default as the compiler takes care of deleting component members.

Definition at line 487 of file MonitorPointAverageT.h.

Member Function Documentation

template<typename U >
U carma::monitor::MonitorPointAverageT< U >::getAccumulator ( ) const

Get cumulative value of samples.

Returns
U accumulated value

Definition at line 494 of file MonitorPointAverageT.h.

template<typename U >
U carma::monitor::MonitorPointAverageT< U >::getMaxValue ( ) const

Get maximum of sample values.

Returns
U maximum accumulated sample value.

Definition at line 517 of file MonitorPointAverageT.h.

template<typename U >
U carma::monitor::MonitorPointAverageT< U >::getMinValue ( ) const

Get minimum value across all accumulated samples.

Returns
U minimum sample value.

Definition at line 533 of file MonitorPointAverageT.h.

template<typename U>
void carma::monitor::MonitorPointAverageT< U >::incrementAccumulator ( const U &  value)

Increment cumulative value of samples.

Parameters
valueU value of sample to be added.

Definition at line 509 of file MonitorPointAverageT.h.

template<typename U>
void carma::monitor::MonitorPointAverageT< U >::setAccumulator ( const U &  value)

Set cumulative value of samples.

Parameters
valueU accumulated value of samples.

Definition at line 502 of file MonitorPointAverageT.h.

template<typename U>
void carma::monitor::MonitorPointAverageT< U >::setMaxValue ( const U &  value)

Set maximum sample value.

Parameters
valueconst U maximum value of accumulated samples.

Definition at line 525 of file MonitorPointAverageT.h.

template<typename U>
void carma::monitor::MonitorPointAverageT< U >::setMinValue ( const U &  value)

Set minimum across all accumulated samples.

Parameters
valueconst U minimum sample value.

Definition at line 541 of file MonitorPointAverageT.h.


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