MetaWear C++ API  0.20.0
C++ implementation of the MetaWear protocol
data.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <stdint.h>
9 
13 typedef enum {
21  MBL_MW_DT_ID_EULER_ANGLE,
22  MBL_MW_DT_ID_QUATERNION,
23  MBL_MW_DT_ID_CORRECTED_CARTESIAN_FLOAT,
24  MBL_MW_DT_ID_OVERFLOW_STATE,
25  MBL_MW_DT_ID_SENSOR_ORIENTATION,
26  MBL_MW_DT_ID_STRING,
27  MBL_MW_DT_ID_LOGGING_TIME,
28  MBL_MW_DT_ID_BTLE_ADDRESS,
29  MBL_MW_DT_ID_BOSCH_ANY_MOTION,
30  MBL_MW_DT_ID_CALIBRATION_STATE,
31  MBL_MW_DT_ID_DATA_ARRAY,
32  MBL_MW_DT_ID_BOSCH_TAP,
33  MBL_MW_DT_ID_BOSCH_GESTURE
35 
39 typedef struct {
40  int64_t epoch;
41  void* extra;
42  void* value;
44  uint8_t length;
45 } MblMwData;
46 
52 typedef void (*MblMwFnData)(void *context, const MblMwData* data);
MblMwDataTypeId
Enumeration of sensor data types.
Definition: data.h:13
@ MBL_MW_DT_ID_TCS34725_ADC
Data is a Tcs34725ColorAdc.
Definition: data.h:20
@ MBL_MW_DT_ID_FLOAT
Data is a float.
Definition: data.h:15
@ MBL_MW_DT_ID_BATTERY_STATE
Data is a BatteryState.
Definition: data.h:19
@ MBL_MW_DT_ID_BYTE_ARRAY
Data is a byte array.
Definition: data.h:18
@ MBL_MW_DT_ID_UINT32
Data is an unsigned integer.
Definition: data.h:14
@ MBL_MW_DT_ID_INT32
Data is a signed integer.
Definition: data.h:17
@ MBL_MW_DT_ID_CARTESIAN_FLOAT
Data is a CartesianFloat.
Definition: data.h:16
void(* MblMwFnData)(void *context, const MblMwData *data)
Definition for callback functions that handle data from an MblMwDataSignal.
Definition: data.h:52
Wrapper class encapsulating one sample of sensor data.
Definition: data.h:39
void * value
Pointer to the data value.
Definition: data.h:42
int64_t epoch
Number of milliseconds since epoch.
Definition: data.h:40
void * extra
Extra information attached to this data sample.
Definition: data.h:41
MblMwDataTypeId type_id
ID represnting the data type the value pointer points to.
Definition: data.h:43
uint8_t length
Size of the value.
Definition: data.h:44