|
MetaWear C++ API
0.20.0
C++ implementation of the MetaWear protocol
|
Computes a running average of the input. More...
#include "processor_common.h"Go to the source code of this file.
Functions | |
| METAWEAR_API int32_t | mbl_mw_dataprocessor_average_create (MblMwDataSignal *source, uint8_t size, void *context, MblMwFnDataProcessor processor_created) |
| METAWEAR_API int32_t | mbl_mw_dataprocessor_highpass_create (MblMwDataSignal *source, uint8_t size, void *context, MblMwFnDataProcessor processor_created) |
| Create a high-pass filter Uses the averager to compute the difference of the current value from a running average of the previous (amount of) "size" samples. More... | |
| METAWEAR_API int32_t | mbl_mw_dataprocessor_lowpass_create (MblMwDataSignal *source, uint8_t size, void *context, MblMwFnDataProcessor processor_created) |
| Create a low-pass filter Uses the averager to create a moving average. More... | |
| METAWEAR_API int32_t | mbl_mw_dataprocessor_average_reset (MblMwDataProcessor *average) |
| Resets the running average (averager current value) More... | |
| METAWEAR_API int32_t | mbl_mw_dataprocessor_average_modify_size (MblMwDataProcessor *average, uint8_t size) |
| Modifies the sample size of the average processor The sample size is the number of previous data samples to compare against Recommended to be a power of 2 for faster computation. More... | |
Computes a running average of the input.
| METAWEAR_API int32_t mbl_mw_dataprocessor_average_create | ( | MblMwDataSignal * | source, |
| uint8_t | size, | ||
| void * | context, | ||
| MblMwFnDataProcessor | processor_created | ||
| ) |
| METAWEAR_API int32_t mbl_mw_dataprocessor_average_modify_size | ( | MblMwDataProcessor * | average, |
| uint8_t | size | ||
| ) |
Modifies the sample size of the average processor The sample size is the number of previous data samples to compare against Recommended to be a power of 2 for faster computation.
| average | Average processor to modify |
| size | New sample size to use |
| METAWEAR_API int32_t mbl_mw_dataprocessor_average_reset | ( | MblMwDataProcessor * | average | ) |
Resets the running average (averager current value)
| average | Average processor to reset |
| METAWEAR_API int32_t mbl_mw_dataprocessor_highpass_create | ( | MblMwDataSignal * | source, |
| uint8_t | size, | ||
| void * | context, | ||
| MblMwFnDataProcessor | processor_created | ||
| ) |
Create a high-pass filter Uses the averager to compute the difference of the current value from a running average of the previous (amount of) "size" samples.
A pointer representing the processor will be passed back to the user via a callback function.
| source | Data signal providing the input for the processor |
| size | Number of previous data samples to compare against, Recommended to be a power of 2 for faster computation. |
| context | Pointer to additional data for the callback function |
| processor_created | Callback function to be executed when the processor is created |
| METAWEAR_API int32_t mbl_mw_dataprocessor_lowpass_create | ( | MblMwDataSignal * | source, |
| uint8_t | size, | ||
| void * | context, | ||
| MblMwFnDataProcessor | processor_created | ||
| ) |
Create a low-pass filter Uses the averager to create a moving average.
A pointer representing the processor will be passed back to the user via a callback function.
| source | Data signal providing the input for the processor |
| size | Number of previous data samples to compare against, Recommended to be a power of 2 for faster computation. |
| context | Pointer to additional data for the callback function |
| processor_created | Callback function to be executed when the processor is created |