sensorfw: DownsampleFilter Class Reference

sensorfw

Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | List of all members
DownsampleFilter Class Reference

Downsample filter. More...

`#include <downsamplefilter.h>`

Inheritance diagram for DownsampleFilter:

## Public Member Functions
unsigned int | bufferSize () const
| Buffer size for downsampling.
void | setBufferSize (unsigned int size)
| Set buffer size for downsampling.
int | timeout () const
| Timeout in milliseconds for discarding too old samples from buffer.
void | setTimeout (int ms)
| Set timeout in milliseconds for discarding too old samples from buffer.

## Static Public Member Functions
static FilterBase * | factoryMethod ()
| Factory method.

## Protected Member Functions
| DownsampleFilter ()
| Constructor.

## Properties
unsigned int | bufferSize
int | timeout

## Detailed Description

Downsample filter.

Downsamples incoming XYZ data by having defined buffer sizes from where average will be calculated when the buffer is full. Timeout can be used to control how old samples get discarded.

Definition at line 41 of file downsamplefilter.h.

## Constructor & Destructor Documentation

## ◆ DownsampleFilter()

DownsampleFilter::DownsampleFilter | ( |  | ) |
| protected

Constructor.

## Member Function Documentation

## ◆ bufferSize()

unsigned int DownsampleFilter::bufferSize | ( |  | ) | const

Buffer size for downsampling.

Returns
  buffer size.

## ◆ factoryMethod()

static FilterBase * DownsampleFilter::factoryMethod | ( |  | ) |
| inlinestatic

Factory method.

Returns
  New DownsampleFilter instance.

Definition at line 55 of file downsamplefilter.h.

## ◆ setBufferSize()

void DownsampleFilter::setBufferSize | ( | unsigned int | size | ) |

Set buffer size for downsampling.

Parameters

  size | buffer size.

## ◆ setTimeout()

void DownsampleFilter::setTimeout | ( | int | ms | ) |

Set timeout in milliseconds for discarding too old samples from buffer.

Parameters

  ms | timeout in milliseconds.

## ◆ timeout()

int DownsampleFilter::timeout | ( |  | ) | const

Timeout in milliseconds for discarding too old samples from buffer.

Returns
  timeout in milliseconds.

## Property Documentation

## ◆ bufferSize

unsigned int DownsampleFilter::bufferSize
| readwrite

Definition at line 45 of file downsamplefilter.h.

## ◆ timeout

int DownsampleFilter::timeout
| readwrite

Definition at line 46 of file downsamplefilter.h.

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

- filters/downsamplefilter/downsamplefilter.h