Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
 4.1.99
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
bt_gatt_ccc_managed_user_data Struct Reference

Internal representation of CCC value. More...

#include <gatt.h>

Data Fields

struct bt_gatt_ccc_cfg cfg [0]
 Configuration for each connection.
 
uint16_t value
 Highest value of all connected peer's subscriptions.
 
void(* cfg_changed )(const struct bt_gatt_attr *attr, uint16_t value)
 CCC attribute changed callback.
 
ssize_t(* cfg_write )(struct bt_conn *conn, const struct bt_gatt_attr *attr, uint16_t value)
 CCC attribute write validation callback.
 
bool(* cfg_match )(struct bt_conn *conn, const struct bt_gatt_attr *attr)
 CCC attribute match handler.
 

Detailed Description

Internal representation of CCC value.

Note
Only use this as an argument for BT_GATT_CCC_MANAGED

Field Documentation

◆ cfg

struct bt_gatt_ccc_cfg bt_gatt_ccc_managed_user_data::cfg[0]

Configuration for each connection.

◆ cfg_changed

void(* bt_gatt_ccc_managed_user_data::cfg_changed) (const struct bt_gatt_attr *attr, uint16_t value)

CCC attribute changed callback.

Parameters
attrThe attribute that's changed value
valueNew value

◆ cfg_match

bool(* bt_gatt_ccc_managed_user_data::cfg_match) (struct bt_conn *conn, const struct bt_gatt_attr *attr)

CCC attribute match handler.

Indicate if it is OK to send a notification or indication to the subscriber.

Parameters
connThe connection that is being checked
attrThe attribute that's being checked
Returns
true if application has approved notification/indication, false if application does not approve.

◆ cfg_write

ssize_t(* bt_gatt_ccc_managed_user_data::cfg_write) (struct bt_conn *conn, const struct bt_gatt_attr *attr, uint16_t value)

CCC attribute write validation callback.

Parameters
connThe connection that is requesting to write
attrThe attribute that's being written
valueCCC value to write
Returns
Number of bytes to write, or in case of an error BT_GATT_ERR() with a specific error code.

◆ value

uint16_t bt_gatt_ccc_managed_user_data::value

Highest value of all connected peer's subscriptions.


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