SoftFilters  0.1.0
Arduino framework and library of software data filters.
TimestampFilter< VAL_T, TS_T, time_fn > Class Template Reference

A filter that adds timestamps to the input values. More...

#include <SoftFilters.h>

Inheritance diagram for TimestampFilter< VAL_T, TS_T, time_fn >:
Collaboration diagram for TimestampFilter< VAL_T, TS_T, time_fn >:

Public Member Functions

virtual bool update (void const *const input) override
 Internally update the filter output based on the given input. More...
 
- Public Member Functions inherited from Filter
bool push (void const *const input, void *const output)
 Push a new data through the filter. More...
 

Additional Inherited Members

- Protected Member Functions inherited from BaseFilter< VAL_T, Reading< VAL_T, TS_T > >
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 Attributes inherited from BaseFilter< VAL_T, Reading< VAL_T, TS_T > >
Reading< VAL_T, TS_T > out_val
 Internally managed storage of the output value.
 

Detailed Description

template<typename VAL_T, typename TS_T = unsigned long, TS_T(*)() time_fn>
class TimestampFilter< VAL_T, TS_T, time_fn >

A filter that adds timestamps to the input values.

Template Parameters
VAL_Ttype of the input values.
TS_Ttype of the timestamp, defaults to unsigned long as per Arduino documentation of millis and micros.
time_fnA function taking no parameter and returns a timestamp. On Arduino platforms, this defaults to the micros function. Otherwise (e.g., when used in other C++ environments), there is no default.

Member Function Documentation

◆ update()

template<typename VAL_T , typename TS_T = unsigned long, TS_T(*)() time_fn>
virtual bool TimestampFilter< VAL_T, TS_T, time_fn >::update ( void const *const  input)
inlineoverridevirtual

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.


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