SoftFilters  0.1.0
Arduino framework and library of software data filters.
PassThroughFilter< T > Class Template Reference

A pass-through filter does nothing and is useful for derived classes to perform monitoring functionalities, such as the FlowRateFilter. More...

#include <framework.h>

Inheritance diagram for PassThroughFilter< T >:
Collaboration diagram for PassThroughFilter< T >:

Protected Member Functions

virtual void const *const get_output_val_ptr () override
 Read-only access to the internal output memory. More...
 
virtual bool update (void const *const input) override
 Internally update the filter output based on the given input. More...
 
virtual void copy_to_client (void *const output) override
 Copy the output to client memory.
 

Protected Attributes

T const * ptr
 Pointer to the latest data that passed through.
 

Additional Inherited Members

- Public Member Functions inherited from Filter
bool push (void const *const input, void *const output)
 Push a new data through the filter. More...
 

Detailed Description

template<typename T>
class PassThroughFilter< T >

A pass-through filter does nothing and is useful for derived classes to perform monitoring functionalities, such as the FlowRateFilter.

Template Parameters
TThe type of the data that is passing through.

Member Function Documentation

◆ get_output_val_ptr()

template<typename T >
virtual void const* const PassThroughFilter< T >::get_output_val_ptr ( )
inlineoverrideprotectedvirtual

Read-only access to the internal output memory.

This member function is mainly used by derived composite filters, which needs to point the output of the previous filter stage to the input of the next fitler stage. See for example the implementation of FilterChain.

Returns
A read-only pointer to the memory where the output value is stored internally by the filter.

Implements Filter.

◆ update()

template<typename T >
virtual bool PassThroughFilter< T >::update ( void const *const  input)
inlineoverrideprotectedvirtual

Internally update the filter output based on the given input.

This method behaves similarly to the public Filter::push method, but without copying the output to the client memory. This method is for internal workings of the filter framework.

Implements Filter.

Reimplemented in FlowRateFilter< T, TS_T, time_fun, TICKS_PER_SEC >.


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