MetaWear C++ API  0.20.0
C++ implementation of the MetaWear protocol
datasignal.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include "data.h"
9 #include "datasignal_fwd.h"
10 #include "logging_fwd.h"
11 
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
33 METAWEAR_API void mbl_mw_datasignal_subscribe(MblMwDataSignal *signal, void *context, MblMwFnData received_data);
58 METAWEAR_API void mbl_mw_datasignal_read_with_parameters(const MblMwDataSignal* signal, const void* parameters);
65 METAWEAR_API void mbl_mw_datasignal_log(MblMwDataSignal *signal, void *context, MblMwFnDataLoggerPtr logger_ready);
66 
67 #ifdef __cplusplus
68 }
69 #endif
Functions and types for data received from an MblMwDataSignal.
void(* MblMwFnData)(void *context, const MblMwData *data)
Definition for callback functions that handle data from an MblMwDataSignal.
Definition: data.h:52
METAWEAR_API void mbl_mw_datasignal_read(const MblMwDataSignal *signal)
Reads data from sensor represented by the data signal.
METAWEAR_API void mbl_mw_datasignal_unsubscribe(MblMwDataSignal *signal)
Unsubscribes from a data stream.
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.
METAWEAR_API void mbl_mw_datasignal_log(MblMwDataSignal *signal, void *context, MblMwFnDataLoggerPtr logger_ready)
Creates an MblMwDataLogger for the signal.
METAWEAR_API void mbl_mw_datasignal_read_with_parameters(const MblMwDataSignal *signal, const void *parameters)
Reads data from sensor represented by the data signal.
METAWEAR_API int32_t mbl_mw_datasignal_is_readable(const MblMwDataSignal *signal)
Check if the data signal can be explicitly read.
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.
Forward declaration for the MblMwDataSignal type.
struct MblMwDataSignal MblMwDataSignal
A event fired from the MetaWear board that also contains data.
Definition: datasignal_fwd.h:15
Macros for identifying exported functions.
#define METAWEAR_API
Indicates the function should be exported to the symbol table
Definition: dllmarker.h:27
Forward declaration of the MblMwDataLogger type.
void(* MblMwFnDataLoggerPtr)(void *context, MblMwDataLogger *logger)
Definition for callback functions that accept an MblMwDataLogger pointer.
Definition: logging_fwd.h:22