MetaWear C++ API  0.18.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 
26 
33 METAWEAR_API void mbl_mw_datasignal_subscribe(MblMwDataSignal *signal, void *context, MblMwFnData received_data);
45 
52 
59 METAWEAR_API void mbl_mw_datasignal_read_with_parameters(const MblMwDataSignal* signal, const void* parameters);
60 
67 METAWEAR_API void mbl_mw_datasignal_log(MblMwDataSignal *signal, void *context, MblMwFnDataLoggerPtr logger_ready);
68 
69 #ifdef __cplusplus
70 }
71 #endif
void(* MblMwFnDataLoggerPtr)(void *context, MblMwDataLogger *logger)
Definition for callback functions that accept an MblMwDataLogger pointer.
Definition: logging_fwd.h:22
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 void mbl_mw_datasignal_unsubscribe(MblMwDataSignal *signal)
Unsubscribes from a data stream.
Functions and types for data received from an MblMwDataSignal.
Macros for identifying exported functions.
void(* MblMwFnData)(void *context, const MblMwData *data)
Definition for callback functions that handle data from an MblMwDataSignal.
Definition: data.h:51
Forward declaration for the MblMwDataSignal type.
METAWEAR_API void mbl_mw_datasignal_read(const MblMwDataSignal *signal)
Reads data from sensor represented by the data signal.
Forward declaration of the MblMwDataLogger type.
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.
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 int32_t mbl_mw_datasignal_is_readable(const MblMwDataSignal *signal)
Check if the data signal can be explicitly read.
#define METAWEAR_API
Indicates the function should be exported to the symbol table.
Definition: dllmarker.h:27
METAWEAR_API void mbl_mw_datasignal_log(MblMwDataSignal *signal, void *context, MblMwFnDataLoggerPtr logger_ready)
Creates an MblMwDataLogger for the signal.
struct MblMwDataSignal MblMwDataSignal
A event fired from the MetaWear board that also contains data.
Definition: datasignal_fwd.h:15