MetaWear C++ API
0.18.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. 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. More... | |
METAWEAR_API int32_t | mbl_mw_dataprocessor_average_reset (MblMwDataProcessor *average) |
Resets the running average. More... | |
METAWEAR_API int32_t | mbl_mw_dataprocessor_average_modify_size (MblMwDataProcessor *average, uint8_t size) |
Modifies the sample size of the average processor. 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.
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.
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.
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.
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 |