|
MetaWear C++ API
0.20.0
C++ implementation of the MetaWear protocol
|
Allows data through that crosses a boundary. More...
#include "processor_common.h"Go to the source code of this file.
Enumerations | |
| enum | MblMwThresholdMode { MBL_MW_THRESHOLD_MODE_ABSOLUTE = 0 , MBL_MW_THRESHOLD_MODE_BINARY } |
| Output modes of the processor. More... | |
Functions | |
| METAWEAR_API int32_t | mbl_mw_dataprocessor_threshold_create (MblMwDataSignal *source, MblMwThresholdMode mode, float boundary, float hysteresis, void *context, MblMwFnDataProcessor processor_created) |
| Create a threshold processor. More... | |
| METAWEAR_API int32_t | mbl_mw_dataprocessor_threshold_modify_boundary (MblMwDataProcessor *threshold, float boundary, float hysteresis) |
| Modifies the threshold processor configuration. More... | |
Allows data through that crosses a boundary.
| enum MblMwThresholdMode |
| METAWEAR_API int32_t mbl_mw_dataprocessor_threshold_create | ( | MblMwDataSignal * | source, |
| MblMwThresholdMode | mode, | ||
| float | boundary, | ||
| float | hysteresis, | ||
| void * | context, | ||
| MblMwFnDataProcessor | processor_created | ||
| ) |
Create a threshold processor.
Allows data through that crosses a boundary (threshold) according to MblMwThresholdMode 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 |
| mode | Processor output mode (absolute mode, output is value | binary mode output is 1 rising edge, -1 if falling) |
| boundary | Limit (threshold) that triggers an event when data crosses it |
| hysteresis | Min distance (error/diff) between the limit and value to signal a successful crossing |
| 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_threshold_modify_boundary | ( | MblMwDataProcessor * | threshold, |
| float | boundary, | ||
| float | hysteresis | ||
| ) |
Modifies the threshold processor configuration.
| threshold | Threshold processor to modify |
| boundary | Limit (threshold) that triggers an event when data crosses it |
| hysteresis | Min distance (error/diff) between the limit and value to signal a successful crossing |