SoftFilters  0.1.0
Arduino framework and library of software data filters.
BaseFilter< IN_T, OUT_T > Class Template Reference

The typed filter base class. More...

#include <framework.h>

Inheritance diagram for BaseFilter< IN_T, OUT_T >:
Collaboration diagram for BaseFilter< IN_T, OUT_T >:

Protected Member Functions

virtual void const *const get_output_val_ptr () final
 Push a new data through the filter. More...
 
virtual void copy_to_client (void *const output) final
 Copy the output to client memory.
 
- Protected Member Functions inherited from Filter
virtual bool update (void const *const input)=0
 Internally update the filter output based on the given input. More...
 

Protected Attributes

OUT_T out_val
 Internally managed storage of the output value.
 

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 IN_T, typename OUT_T>
class BaseFilter< IN_T, OUT_T >

The typed filter base class.

Template Parameters
IN_Ttype of input data
OUT_Ttype of output data
See also
Filter

Member Function Documentation

◆ get_output_val_ptr()

template<typename IN_T, typename OUT_T>
virtual void const* const BaseFilter< IN_T, OUT_T >::get_output_val_ptr ( )
inlinefinalprotectedvirtual

Push a new data through the filter.

This function is essentially a proxy call to the Filter::push function that does away the pointer parameter, which is supposed to be beginner-friendly.

Parameters
[in]inputA read-only reference to the input data.
[out]outputThe reference to the output data to be written to.
Returns
True if there is output data; false otherwise.
Note
The output variable is not guaranteed to remain the same even if the return value is false.

Implements Filter.


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