MetaWear C++ API  0.20.0
C++ implementation of the MetaWear protocol
Functions
accounter.h File Reference

Adds additional information to the payload to facilitate packet reconstruction. More...

#include "processor_common.h"

Go to the source code of this file.

Functions

METAWEAR_API int32_t mbl_mw_dataprocessor_accounter_create (MblMwDataSignal *source, void *context, MblMwFnDataProcessor processor_created)
 Adds a system timer (timestamp) to the input signal. More...
 
METAWEAR_API int32_t mbl_mw_dataprocessor_accounter_create_count (MblMwDataSignal *source, void *context, MblMwFnDataProcessor processor_created)
 Adds a simple counter (1,2,3...) to the input signal. More...
 

Detailed Description

Adds additional information to the payload to facilitate packet reconstruction.

Function Documentation

◆ mbl_mw_dataprocessor_accounter_create()

METAWEAR_API int32_t mbl_mw_dataprocessor_accounter_create ( MblMwDataSignal source,
void *  context,
MblMwFnDataProcessor  processor_created 
)

Adds a system timer (timestamp) to the input signal.

Not typically used. Adds additional information to the BTLE packet in the form of a counter A pointer representing the processor will be passed back to the user via a callback function.

Parameters
sourceData signal providing the input for the processor
contextPointer to additional data for the callback function
processor_createdCallback function to be executed when the processor is created

◆ mbl_mw_dataprocessor_accounter_create_count()

METAWEAR_API int32_t mbl_mw_dataprocessor_accounter_create_count ( MblMwDataSignal source,
void *  context,
MblMwFnDataProcessor  processor_created 
)

Adds a simple counter (1,2,3...) to the input signal.


Great to make sure the packets are coming in order. The count value is accessed through the MblMwData struct's extra field. A pointer representing the processor will be passed back to the user via a callback function.

Parameters
sourceData signal providing the input for the processor
contextPointer to additional data for the callback function
processor_createdCallback function to be executed when the processor is created