Zephyr Project API 4.0.0
A Scalable Open Source RTOS
|
GATT Attribute. More...
#include <gatt.h>
Data Fields | |
const struct bt_uuid * | uuid |
Attribute Type, aka. | |
bt_gatt_attr_read_func_t | read |
Attribute Value read method. | |
bt_gatt_attr_write_func_t | write |
Attribute Value write method. | |
void * | user_data |
Private data for read() and write() implementation. | |
uint16_t | handle |
Attribute Handle or zero, maybe? | |
uint16_t | perm |
Attribute Permissions. | |
GATT Attribute.
This type primarily represents an ATT Attribute that may be an entry in the local ATT database. The objects of this type must be part of an array that forms a GATT service.
While the formed GATT service is registered with the local GATT server, pointers to this type can typically be given to GATT server APIs, like bt_gatt_notify().
uint16_t bt_gatt_attr::handle |
Attribute Handle or zero, maybe?
The meaning of this field varies and is not specified here. Some APIs use this field as input/output. It does not always contain the Attribute Handle.
uint16_t bt_gatt_attr::perm |
Attribute Permissions.
Bit field of bt_gatt_perm.
The permissions are security requirements that must be satisfied before calling read() or write().
bt_gatt_attr_read_func_t bt_gatt_attr::read |
Attribute Value read method.
Readable Attributes must implement this method.
Must be NULL if the attribute is not readable.
The behavior of this method is determined by the Attribute Type.
void* bt_gatt_attr::user_data |
Private data for read() and write() implementation.
The meaning of this field varies and is not specified here.
const struct bt_uuid* bt_gatt_attr::uuid |
Attribute Type, aka.
"UUID"
The Attribute Type determines the interface that can be expected from the read() and write() methods and the possible permission configurations.
E.g. Attribute of type BT_UUID_GATT_CPF will act as a GATT Characteristic Presentation Format descriptor as specified in Core Specification 3.G.3.3.3.5.
You can define a new Attribute Type.
bt_gatt_attr_write_func_t bt_gatt_attr::write |
Attribute Value write method.
Writeable Attributes must implement this method.
Must be NULL if the attribute is not writable.
The behavior of this method is determined by the Attribute Type.