Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

GATT callback structure. More...

#include <zephyr/bluetooth/gatt.h>

Data Fields

void(* att_mtu_updated )(struct bt_conn *conn, uint16_t tx, uint16_t rx)
 The maximum ATT MTU on a connection has changed.
void(* execute_write_ended )(struct bt_conn *conn, enum bt_gatt_execute_write_outcome outcome, uint8_t att_err)
 An Execute Write Request of the client ended.

Detailed Description

GATT callback structure.

Field Documentation

◆ att_mtu_updated

void(* bt_gatt_cb::att_mtu_updated) (struct bt_conn *conn, uint16_t tx, uint16_t rx)

The maximum ATT MTU on a connection has changed.

This callback notifies the application that the maximum TX or RX ATT MTU has increased.

Parameters
connConnection object.
txUpdated TX ATT MTU.
rxUpdated RX ATT MTU.

◆ execute_write_ended

void(* bt_gatt_cb::execute_write_ended) (struct bt_conn *conn, enum bt_gatt_execute_write_outcome outcome, uint8_t att_err)

An Execute Write Request of the client ended.

Called once for each Execute Write Request of a client that had prepared values with Prepare Write Requests, which needs CONFIG_BT_ATT_PREPARE_COUNT, after the host has written or discarded the values and before it responds. An application that keeps a copy of the prepared values learns here what became of them.

It only reports the outcome: the response is already decided. To fail the request, the write method returns an error when it is called with BT_GATT_WRITE_FLAG_EXECUTE.

It is not called for an Execute Write Request with no prepared values, or when the connection is lost, see bt_conn_cb::disconnected.

Parameters
connConnection object.
outcomeWhat became of the prepared values.
att_errATT error code of the Error Response for BT_GATT_EXECUTE_WRITE_FAILED, 0 otherwise.

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