DatafieldFilter Class Reference

The DatafieldFilter class is the base class for all filters and filter implementation should derive from this class. More...

#include <ArmarXCore/observers/filters/DatafieldFilter.h>

+ Inheritance diagram for DatafieldFilter:

Public Member Functions

bool checkTypeSupport (VariantTypeId variantType, const Ice::Current &c=Ice::emptyCurrent) const override
 Checks whether the given type is supported.
 
 DatafieldFilter ()
 
 DatafieldFilter (DatafieldFilter const &filter)
 
const TimeVariantBaseMap & getDataHistory () const
 
armarx::StringFloatDictionary getProperties (const Ice::Current &c=Ice::emptyCurrent) const override
 
VariantBasePtr getValue (const Ice::Current &c=Ice::emptyCurrent) const override
 Retrieves the current, filtered value.
 
void setProperties (const armarx::StringFloatDictionary &newValues, const Ice::Current &c=Ice::emptyCurrent) override
 
void update (Ice::Long timestamp, const VariantBasePtr &value, const Ice::Current &c=Ice::emptyCurrent) override
 Adds the given value to the data map, erases old values if maximum size was reached, and calculates the new filtered value.
 

Protected Attributes

TimeVariantBaseMap dataHistory
 
std::mutex historyMutex
 

Detailed Description

The DatafieldFilter class is the base class for all filters and filter implementation should derive from this class.

For usage explanation see Filtering the data.

Constructor & Destructor Documentation

◆ DatafieldFilter() [1/2]

◆ DatafieldFilter() [2/2]

DatafieldFilter ( DatafieldFilter const & filter)

Member Function Documentation

◆ checkTypeSupport()

bool checkTypeSupport ( VariantTypeId variantType,
const Ice::Current & c = Ice::emptyCurrent ) const
override

Checks whether the given type is supported.

Parameters
variantType
Returns

◆ getDataHistory()

const TimeVariantBaseMap & getDataHistory ( ) const

◆ getProperties()

armarx::StringFloatDictionary getProperties ( const Ice::Current & c = Ice::emptyCurrent) const
override

◆ getValue()

VariantBasePtr getValue ( const Ice::Current & c = Ice::emptyCurrent) const
override

Retrieves the current, filtered value.

Triggers calculates if if filtered value pointer is empty.

◆ setProperties()

void setProperties ( const armarx::StringFloatDictionary & newValues,
const Ice::Current & c = Ice::emptyCurrent )
override

◆ update()

void update ( Ice::Long timestamp,
const VariantBasePtr & value,
const Ice::Current & c = Ice::emptyCurrent )
override

Adds the given value to the data map, erases old values if maximum size was reached, and calculates the new filtered value.

Parameters
timestampTimestamp at which the data value was taken.
valueThe new data value.

Member Data Documentation

◆ dataHistory

TimeVariantBaseMap dataHistory
protected

◆ historyMutex

std::mutex historyMutex
mutableprotected

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