MetaWear C++ API
0.18.0
C++ implementation of the MetaWear protocol
|
Tallies a running sum of the input. More...
#include "processor_common.h"
Go to the source code of this file.
Functions | |
METAWEAR_API int32_t | mbl_mw_dataprocessor_accumulator_create (MblMwDataSignal *source, void *context, MblMwFnDataProcessor processor_created) |
Create an accumulator whose output is the same size as the input. More... | |
METAWEAR_API int32_t | mbl_mw_dataprocessor_accumulator_create_size (MblMwDataSignal *source, uint8_t output_size, void *context, MblMwFnDataProcessor processor_created) |
Create an accumulator with a specific output size. More... | |
METAWEAR_API int32_t | mbl_mw_dataprocessor_set_accumulator_state (MblMwDataProcessor *accumulator, float new_running_sum) |
Overwrites the current running sum with a new value. More... | |
Tallies a running sum of the input.
METAWEAR_API int32_t mbl_mw_dataprocessor_accumulator_create | ( | MblMwDataSignal * | source, |
void * | context, | ||
MblMwFnDataProcessor | processor_created | ||
) |
Create an accumulator whose output is the same size as the input.
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 |
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_accumulator_create_size | ( | MblMwDataSignal * | source, |
uint8_t | output_size, | ||
void * | context, | ||
MblMwFnDataProcessor | processor_created | ||
) |
Create an accumulator with a specific output size.
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 |
output_size | Output size, between [1, 4] bytes |
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_set_accumulator_state | ( | MblMwDataProcessor * | accumulator, |
float | new_running_sum | ||
) |
Overwrites the current running sum with a new value.
accumulator | Accumulator processor to modify |
new_running_sum | New running sum of the accumulator |