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

Holds data until a certain amount has been collected. More...

#include "processor_common.h"

Go to the source code of this file.

Functions

METAWEAR_API int32_t mbl_mw_dataprocessor_sample_create (MblMwDataSignal *source, uint8_t bin_size, void *context, MblMwFnDataProcessor processor_created)
 Create a sample delay processor. More...
 
METAWEAR_API int32_t mbl_mw_dataprocessor_sample_modify_bin_size (MblMwDataProcessor *sample_delay, uint8_t bin_size)
 Modify the bin size of a sample delay processor. More...
 

Detailed Description

Holds data until a certain amount has been collected.

Function Documentation

◆ mbl_mw_dataprocessor_sample_create()

METAWEAR_API int32_t mbl_mw_dataprocessor_sample_create ( MblMwDataSignal source,
uint8_t  bin_size,
void *  context,
MblMwFnDataProcessor  processor_created 
)

Create a sample delay processor.


Holds data until a certain amount (bin_size) has been collected. Can be used to delay the input into another processor. 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
bin_sizeNumber of samples to hold before letting data through
contextPointer to additional data for the callback function
processor_createdCallback function to be executed when the processor is created

◆ mbl_mw_dataprocessor_sample_modify_bin_size()

METAWEAR_API int32_t mbl_mw_dataprocessor_sample_modify_bin_size ( MblMwDataProcessor sample_delay,
uint8_t  bin_size 
)

Modify the bin size of a sample delay processor.

Parameters
sample_delaySample processor to modify
bin_sizeNumber of samples to hold before letting data through
Returns
MBL_MW_STATUS_OK if processor configuration was updated, MBL_MW_STATUS_WARNING_INVALID_PROCESSOR_TYPE if a non sample delay processor was passed in