MetaWear C++ API
0.20.0
C++ implementation of the MetaWear protocol
|
Gate that only allows data though based on a user configured internal state. More...
#include "processor_common.h"
Go to the source code of this file.
Enumerations | |
enum | MblMwPassthroughMode { MBL_MW_PASSTHROUGH_MODE_ALL = 0 , MBL_MW_PASSTHROUGH_MODE_CONDITIONAL , MBL_MW_PASSTHROUGH_MODE_COUNT } |
Operation modes for the processor. More... | |
Functions | |
METAWEAR_API int32_t | mbl_mw_dataprocessor_passthrough_create (MblMwDataSignal *source, MblMwPassthroughMode mode, uint16_t count, void *context, MblMwFnDataProcessor processor_created) |
Create a passthrough processor. More... | |
METAWEAR_API int32_t | mbl_mw_dataprocessor_passthrough_set_count (MblMwDataProcessor *passthrough, uint16_t new_count) |
Modify the internal count of the passthrough processor. More... | |
METAWEAR_API int32_t | mbl_mw_dataprocessor_passthrough_modify (MblMwDataProcessor *passthrough, MblMwPassthroughMode mode, uint16_t count) |
Modify the passthrough configuration. More... | |
Gate that only allows data though based on a user configured internal state.
enum MblMwPassthroughMode |
METAWEAR_API int32_t mbl_mw_dataprocessor_passthrough_create | ( | MblMwDataSignal * | source, |
MblMwPassthroughMode | mode, | ||
uint16_t | count, | ||
void * | context, | ||
MblMwFnDataProcessor | processor_created | ||
) |
Create a passthrough processor.
On a pass-count, only the count # of samples will go through and then the processor will shut off. On a pass-conditional, if the count=0, all data is blocked. if the count>0, all data is passed. Gate that only allows data though based on a user configured internal state. 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's operation mode |
count | Internal count to initial the processor with |
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_passthrough_modify | ( | MblMwDataProcessor * | passthrough, |
MblMwPassthroughMode | mode, | ||
uint16_t | count | ||
) |
Modify the passthrough configuration.
passthrough | Passthrough processor to update |
mode | New operation mode to use |
count | New initial count |
METAWEAR_API int32_t mbl_mw_dataprocessor_passthrough_set_count | ( | MblMwDataProcessor * | passthrough, |
uint16_t | new_count | ||
) |
Modify the internal count of the passthrough processor.
passthrough | Passthrough processor to modify |
new_count | New internal count |