MetaWear C++ API
0.18.0
C++ implementation of the MetaWear protocol
|
Functions for controlling a MblMwDataSignal. More...
#include "data.h"
#include "datasignal_fwd.h"
#include "logging_fwd.h"
#include "metawear/platform/dllmarker.h"
Go to the source code of this file.
Functions | |
METAWEAR_API MblMwDataSignal * | mbl_mw_datasignal_get_component (const MblMwDataSignal *signal, uint8_t index) |
Retrieves an individual value from a multi-valued datasignal i.e. More... | |
METAWEAR_API void | mbl_mw_datasignal_subscribe (MblMwDataSignal *signal, void *context, MblMwFnData received_data) |
Subscribes to a data stream, processing messages with the given handler. More... | |
METAWEAR_API void | mbl_mw_datasignal_unsubscribe (MblMwDataSignal *signal) |
Unsubscribes from a data stream. More... | |
METAWEAR_API int32_t | mbl_mw_datasignal_is_readable (const MblMwDataSignal *signal) |
Check if the data signal can be explicitly read. More... | |
METAWEAR_API void | mbl_mw_datasignal_read (const MblMwDataSignal *signal) |
Reads data from sensor represented by the data signal. More... | |
METAWEAR_API void | mbl_mw_datasignal_read_with_parameters (const MblMwDataSignal *signal, const void *parameters) |
Reads data from sensor represented by the data signal. More... | |
METAWEAR_API void | mbl_mw_datasignal_log (MblMwDataSignal *signal, void *context, MblMwFnDataLoggerPtr logger_ready) |
Creates an MblMwDataLogger for the signal. More... | |
Functions for controlling a MblMwDataSignal.
METAWEAR_API MblMwDataSignal* mbl_mw_datasignal_get_component | ( | const MblMwDataSignal * | signal, |
uint8_t | index | ||
) |
Retrieves an individual value from a multi-valued datasignal i.e.
MblMwCartesianFloat datasignal is 3 float values.
These individual signals can use the full suite of
signal | Data signal to lookup |
index | Index of the component to return |
METAWEAR_API int32_t mbl_mw_datasignal_is_readable | ( | const MblMwDataSignal * | signal | ) |
Check if the data signal can be explicitly read.
signal | Data signal to check |
METAWEAR_API void mbl_mw_datasignal_log | ( | MblMwDataSignal * | signal, |
void * | context, | ||
MblMwFnDataLoggerPtr | logger_ready | ||
) |
Creates an MblMwDataLogger for the signal.
signal | Data signal to log |
context | Pointer to additional data for the callback function |
logger_ready | Callback function to be executed when the logger is created |
METAWEAR_API void mbl_mw_datasignal_read | ( | const MblMwDataSignal * | signal | ) |
Reads data from sensor represented by the data signal.
Data is forwarded to the callback function assigned by the mbl_mw_datasignal_subscribe function
signal | Data signal to read from |
METAWEAR_API void mbl_mw_datasignal_read_with_parameters | ( | const MblMwDataSignal * | signal, |
const void * | parameters | ||
) |
Reads data from sensor represented by the data signal.
Data is forwarded to the callback function assigned by the mbl_mw_datasignal_subscribe function. This variant is for reads that require additional parameters.
signal | Data signal to read from |
parameters | Additional parameters required for the read operation |
METAWEAR_API void mbl_mw_datasignal_subscribe | ( | MblMwDataSignal * | signal, |
void * | context, | ||
MblMwFnData | received_data | ||
) |
Subscribes to a data stream, processing messages with the given handler.
signal | Data signal to subscribe to |
context | Pointer to additional data for the callback function |
received_data | Callback function to handle data received from the signal |
METAWEAR_API void mbl_mw_datasignal_unsubscribe | ( | MblMwDataSignal * | signal | ) |
Unsubscribes from a data stream.
signal | Data signal to unsubscribe from |