MetaWear C++ API
0.18.0
C++ implementation of the MetaWear protocol
|
Counts the number of times an event was fired. More...
#include <stdint.h>
#include "dataprocessor_fwd.h"
#include "metawear/core/event_fwd.h"
#include "metawear/platform/dllmarker.h"
Go to the source code of this file.
Functions | |
METAWEAR_API int32_t | mbl_mw_dataprocessor_counter_create (MblMwEvent *source, void *context, MblMwFnDataProcessor processor_created) |
Create a counter with an output size of 1 byte. More... | |
METAWEAR_API int32_t | mbl_mw_dataprocessor_counter_create_size (MblMwEvent *source, uint8_t size, void *context, MblMwFnDataProcessor processor_created) |
Create a counter with a specific output size. More... | |
METAWEAR_API int32_t | mbl_mw_dataprocessor_counter_set_state (MblMwDataProcessor *counter, uint32_t new_count) |
Overwrites the current count with a new value. More... | |
Counts the number of times an event was fired.
METAWEAR_API int32_t mbl_mw_dataprocessor_counter_create | ( | MblMwEvent * | source, |
void * | context, | ||
MblMwFnDataProcessor | processor_created | ||
) |
Create a counter with an output size of 1 byte.
A pointer representing the processor will be passed back to the user via a callback function.
source | Event the processor is counting |
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_counter_create_size | ( | MblMwEvent * | source, |
uint8_t | size, | ||
void * | context, | ||
MblMwFnDataProcessor | processor_created | ||
) |
Create a counter with a specific output size.
A pointer representing the processor will be passed back to the user via a callback function.
source | Event the processor is counting |
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_counter_set_state | ( | MblMwDataProcessor * | counter, |
uint32_t | new_count | ||
) |
Overwrites the current count with a new value.
counter | Counter processor to modify |
new_count | New count value |