RTFilterBase Class Referenceabstract

The RTFilterBase class is the base class for all real time capable filters. More...

#include <ArmarXCore/observers/filters/rtfilters/RTFilterBase.h>

+ Inheritance diagram for RTFilterBase:

Public Member Functions

virtual double calculate ()=0
 
virtual RTFilterBasePtr clone () const =0
 
double getCurrentValue () const
 
virtual void reset ()
 
 RTFilterBase (const RTFilterBase &other)=default
 
 RTFilterBase (size_t historySize)
 
double update (double deltaSec, double newValue)
 
virtual double update (IceUtil::Time const &timestamp, double newValue)
 
virtual ~RTFilterBase ()
 

Protected Attributes

double currentValue = 0.0
 
boost::circular_buffer< std::pair< IceUtil::Time, double > > dataHistory
 

Detailed Description

The RTFilterBase class is the base class for all real time capable filters.

Real Time capable means here that no heap memory allocation is done and no mutexes are locked during the update() function. Also the runtime must be the same during each call (e.g. no random searches).

Definition at line 40 of file RTFilterBase.h.

Constructor & Destructor Documentation

◆ RTFilterBase() [1/2]

RTFilterBase ( size_t  historySize)

Definition at line 29 of file RTFilterBase.cpp.

◆ RTFilterBase() [2/2]

RTFilterBase ( const RTFilterBase other)
default

◆ ~RTFilterBase()

virtual ~RTFilterBase ( )
inlinevirtual

Definition at line 45 of file RTFilterBase.h.

Member Function Documentation

◆ calculate()

virtual double calculate ( )
pure virtual

Implemented in MedianFilter, TimeWindowAverageFilter, ButterworthFilter, GaussianFilter, and AverageFilter.

+ Here is the caller graph for this function:

◆ clone()

virtual RTFilterBasePtr clone ( ) const
pure virtual

◆ getCurrentValue()

double getCurrentValue ( ) const

Definition at line 47 of file RTFilterBase.cpp.

◆ reset()

void reset ( )
virtual

Definition at line 34 of file RTFilterBase.cpp.

◆ update() [1/2]

double update ( double  deltaSec,
double  newValue 
)

Definition at line 52 of file RTFilterBase.cpp.

+ Here is the call graph for this function:

◆ update() [2/2]

double update ( IceUtil::Time const &  timestamp,
double  newValue 
)
virtual

Reimplemented in ButterworthFilter.

Definition at line 40 of file RTFilterBase.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ currentValue

double currentValue = 0.0
protected

Definition at line 55 of file RTFilterBase.h.

◆ dataHistory

boost::circular_buffer<std::pair<IceUtil::Time, double> > dataHistory
protected

Definition at line 54 of file RTFilterBase.h.


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