APM:Libraries
Public Member Functions | Protected Attributes | List of all members
FilterWithBuffer< T, FILTER_SIZE > Class Template Reference

#include <FilterWithBuffer.h>

Inheritance diagram for FilterWithBuffer< T, FILTER_SIZE >:
[legend]
Collaboration diagram for FilterWithBuffer< T, FILTER_SIZE >:
[legend]

Public Member Functions

 FilterWithBuffer ()
 
virtual T apply (T sample)
 
virtual void reset ()
 
uint8_t get_filter_size () const
 
get_sample (uint8_t i) const
 

Protected Attributes

samples [FILTER_SIZE]
 
uint8_t sample_index
 

Detailed Description

template<class T, uint8_t FILTER_SIZE>
class FilterWithBuffer< T, FILTER_SIZE >

Definition at line 27 of file FilterWithBuffer.h.

Constructor & Destructor Documentation

◆ FilterWithBuffer()

template<class T , uint8_t FILTER_SIZE>
FilterWithBuffer< T, FILTER_SIZE >::FilterWithBuffer ( )

Definition at line 82 of file FilterWithBuffer.h.

Member Function Documentation

◆ apply()

template<class T, uint8_t FILTER_SIZE>
T FilterWithBuffer< T, FILTER_SIZE >::apply ( sample)
virtual

◆ get_filter_size()

template<class T, uint8_t FILTER_SIZE>
uint8_t FilterWithBuffer< T, FILTER_SIZE >::get_filter_size ( ) const
inline

Definition at line 40 of file FilterWithBuffer.h.

◆ get_sample()

template<class T, uint8_t FILTER_SIZE>
T FilterWithBuffer< T, FILTER_SIZE >::get_sample ( uint8_t  i) const
inline

Definition at line 44 of file FilterWithBuffer.h.

◆ reset()

template<class T , uint8_t FILTER_SIZE>
void FilterWithBuffer< T, FILTER_SIZE >::reset ( void  )
virtual

Implements Filter< T >.

Reimplemented in DerivativeFilter< T, FILTER_SIZE >, DerivativeFilter< float, 7 >, AverageFilter< T, U, FILTER_SIZE >, AverageFilter< float, float, 5 >, and AverageFilter< int32_t, int32_t, FILTER_SIZE >.

Definition at line 91 of file FilterWithBuffer.h.

Referenced by FilterWithBuffer< float, FILTER_SIZE >::FilterWithBuffer(), AverageFilter< int32_t, int32_t, FILTER_SIZE >::reset(), and DerivativeFilter< float, 7 >::reset().

Here is the caller graph for this function:

Member Data Documentation

◆ sample_index

template<class T, uint8_t FILTER_SIZE>
uint8_t FilterWithBuffer< T, FILTER_SIZE >::sample_index
protected

◆ samples

template<class T, uint8_t FILTER_SIZE>
T FilterWithBuffer< T, FILTER_SIZE >::samples[FILTER_SIZE]
protected

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