Wrapper class containing functions for communicating with the MetaWear through a Bluetooth Low Energy connection.
More...
#include <btle_connection.h>
|
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...
|
|
Wrapper class containing functions for communicating with the MetaWear through a Bluetooth Low Energy connection.
◆ enable_notifications
Enables notifications for characeristic changes.
- Parameters
-
context | Pointer to the context field |
caller | Object using this function pointer |
characteristic | Characteristic to enable notifications for |
handler | Callback function for handling characteristic notifications |
ready | Callback function to handle when the enable notify task is completed |
◆ on_disconnect
Register a handler for disconnect events.
- Parameters
-
context | Pointer to the context field |
caller | Object using this function pointer |
handler | Handler to respond to the disconnect event |
◆ read_gatt_char
Reads the value of the characteristic from the device.
- Parameters
-
context | Pointer to the context field |
caller | Object using this function pointer |
characteristic | Gatt characteristic to read |
handler | Callback function to handle the received value |
◆ write_gatt_char
Writes the characteristic and value to the device.
- Parameters
-
context | Pointer to the context field |
caller | Object using this function pointer |
characteristic | Gatt characteristic to write |
value | Value to write as a byte array |
length | Length of the byte array |
The documentation for this struct was generated from the following file: