Data Fields
gatts_prf_cbs_t Struct Reference
BLE » Profile » Profile Server » Structures

GATT server callback function in relation to a profile. More...

`#include <ble_prf.h>`

## Data Fields
void(* | app_gatts_read_cb )(uint8_t conidx, const gatts_read_req_cb_t *p_read_req)
void(* | app_gatts_write_cb )(uint8_t conidx, const gatts_write_req_cb_t *p_write_req)
void(* | app_gatts_prep_write_cb )(uint8_t conidx, const gatts_prep_write_req_cb_t *p_prep_req)
void(* | app_gatts_ntf_ind_cb )(uint8_t conidx, uint8_t status, const ble_gatts_ntf_ind_t *p_ntf_ind)
void(* | app_gatts_cccd_set_cb )(uint8_t conidx, uint16_t handle, uint16_t cccd_val)

## Detailed Description

GATT server callback function in relation to a profile.

## Field Documentation

## ◆ app_gatts_cccd_set_cb

void(* gatts_prf_cbs_t::app_gatts_cccd_set_cb) (uint8_t conidx, uint16_t handle, uint16_t cccd_val)

Set CCCD value callback is called when connected with peer device. If bonded, recovery CCCD; otherwise, set default value(0x0000) for CCCD.

## ◆ app_gatts_ntf_ind_cb

void(* gatts_prf_cbs_t::app_gatts_ntf_ind_cb) (uint8_t conidx, uint8_t status, const ble_gatts_ntf_ind_t *p_ntf_ind)

Notification or indication callback function.

## ◆ app_gatts_prep_write_cb

void(* gatts_prf_cbs_t::app_gatts_prep_write_cb) (uint8_t conidx, const gatts_prep_write_req_cb_t *p_prep_req)

Prepare write value callback function. Function ble_gatts_prepare_write_cfm should be called to send prepare write attribute value status to stack no matter the value is in user's zone or BLE stack.

## ◆ app_gatts_read_cb

void(* gatts_prf_cbs_t::app_gatts_read_cb) (uint8_t conidx, const gatts_read_req_cb_t *p_read_req)

Read attribute value callback which is used when value is present in user space. Function ble_gatts_read_cfm should be called to send attribute value to stack.

## ◆ app_gatts_write_cb

void(* gatts_prf_cbs_t::app_gatts_write_cb) (uint8_t conidx, const gatts_write_req_cb_t *p_write_req)

Write attribute value callback. Function ble_gatts_write_cfm should be called to send write attribute value status to stack no matter the value is in user's zone or BLE stack.

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

- ble_prf.h