MetaWear C++ API  0.20.0
C++ implementation of the MetaWear protocol
Public Attributes | List of all members
MblMwBtleConnection Struct Reference

Wrapper class containing functions for communicating with the MetaWear through a Bluetooth Low Energy connection. More...

#include <btle_connection.h>

Public Attributes

void * context
 Provides the calling function the ability to pass any context specific data required.
 
void(* write_gatt_char )(void *context, const void *caller, MblMwGattCharWriteType writeType, const MblMwGattChar *characteristic, const uint8_t *value, uint8_t length)
 Writes the characteristic and value to the device. More...
 
void(* read_gatt_char )(void *context, const void *caller, const MblMwGattChar *characteristic, MblMwFnIntVoidPtrArray handler)
 Reads the value of the characteristic from the device. More...
 
void(* enable_notifications )(void *context, const void *caller, const MblMwGattChar *characteristic, MblMwFnIntVoidPtrArray handler, MblMwFnVoidVoidPtrInt ready)
 Enables notifications for characeristic changes. More...
 
void(* on_disconnect )(void *context, const void *caller, MblMwFnVoidVoidPtrInt handler)
 Register a handler for disconnect events. More...
 

Detailed Description

Wrapper class containing functions for communicating with the MetaWear through a Bluetooth Low Energy connection.

Member Data Documentation

◆ enable_notifications

void(* MblMwBtleConnection::enable_notifications) (void *context, const void *caller, const MblMwGattChar *characteristic, MblMwFnIntVoidPtrArray handler, MblMwFnVoidVoidPtrInt ready)

Enables notifications for characeristic changes.

Parameters
contextPointer to the context field
callerObject using this function pointer
characteristicCharacteristic to enable notifications for
handlerCallback function for handling characteristic notifications
readyCallback function to handle when the enable notify task is completed

◆ on_disconnect

void(* MblMwBtleConnection::on_disconnect) (void *context, const void *caller, MblMwFnVoidVoidPtrInt handler)

Register a handler for disconnect events.

Parameters
contextPointer to the context field
callerObject using this function pointer
handlerHandler to respond to the disconnect event

◆ read_gatt_char

void(* MblMwBtleConnection::read_gatt_char) (void *context, const void *caller, const MblMwGattChar *characteristic, MblMwFnIntVoidPtrArray handler)

Reads the value of the characteristic from the device.

Parameters
contextPointer to the context field
callerObject using this function pointer
characteristicGatt characteristic to read
handlerCallback function to handle the received value

◆ write_gatt_char

void(* MblMwBtleConnection::write_gatt_char) (void *context, const void *caller, MblMwGattCharWriteType writeType, const MblMwGattChar *characteristic, const uint8_t *value, uint8_t length)

Writes the characteristic and value to the device.

Parameters
contextPointer to the context field
callerObject using this function pointer
characteristicGatt characteristic to write
valueValue to write as a byte array
lengthLength of the byte array

The documentation for this struct was generated from the following file: