|
Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
GATT Attribute structure. More...
#include <gatt.h>
Data Fields | |
| const struct bt_uuid * | uuid |
| ssize_t(* | read )(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset) |
| Attribute read callback. More... | |
| ssize_t(* | write )(struct bt_conn *conn, const struct bt_gatt_attr *attr, const void *buf, uint16_t len, uint16_t offset, uint8_t flags) |
| Attribute write callback. More... | |
| void * | user_data |
| uint16_t | handle |
| uint8_t | perm |
GATT Attribute structure.
| uint16_t bt_gatt_attr::handle |
Attribute handle
| uint8_t bt_gatt_attr::perm |
Attribute permissions
| ssize_t(* bt_gatt_attr::read) (struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset) |
Attribute read callback.
The callback can also be used locally to read the contents of the attribute in which case no connection will be set.
| conn | The connection that is requesting to read |
| attr | The attribute that's being read |
| buf | Buffer to place the read result in |
| len | Length of data to read |
| offset | Offset to start reading from |
| void* bt_gatt_attr::user_data |
Attribute user data
| const struct bt_uuid* bt_gatt_attr::uuid |
Attribute UUID
| ssize_t(* bt_gatt_attr::write) (struct bt_conn *conn, const struct bt_gatt_attr *attr, const void *buf, uint16_t len, uint16_t offset, uint8_t flags) |
Attribute write callback.
| conn | The connection that is requesting to write |
| attr | The attribute that's being written |
| buf | Buffer with the data to write |
| len | Number of bytes in the buffer |
| offset | Offset to start writing from |
| flags | Flags (BT_GATT_WRITE_*) |