Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
Generic Attribute Service Client

This is the client for the Generic Attribute Service. More...

Detailed Description

This is the client for the Generic Attribute Service.

Data Structures

struct  st_ble_gatc_serv_changed_t
 Service Changed value structure. More...
 
struct  st_ble_gatc_serv_changed_attr_hdl_t
 Service Changed attribute handle value. More...
 
struct  st_ble_gatc_evt_data_t
 Generic Attribute client event data. More...
 

Macros

#define BLE_GATC_SERV_CHANGED_UUID   (0x2A05)
 
#define BLE_GATC_SERV_CHANGED_LEN   (4)
 
#define BLE_GATC_SERV_CHANGED_CLI_CNFG_UUID   (0x2902)
 
#define BLE_GATC_SERV_CHANGED_CLI_CNFG_LEN   (2)
 

Enumerations

enum  st_ble_gatc_char_idx_t {
  BLE_GATC_SERV_CHANGED_IDX,
  BLE_GATC_SERV_CHANGED_CLI_CNFG_IDX
}
 Generic Attribute characteristic ID. More...
 
enum  e_ble_gatc_event_t {
  BLE_GATC_EVENT_SERV_CHANGED_HDL_VAL_IND = BLE_SERVC_ATTR_EVENT(BLE_GATC_SERV_CHANGED_IDX, BLE_SERVC_HDL_VAL_IND),
  BLE_GATC_EVENT_SERV_CHANGED_CLI_CNFG_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_GATC_SERV_CHANGED_CLI_CNFG_IDX, BLE_SERVC_READ_RSP),
  BLE_GATC_EVENT_SERV_CHANGED_CLI_CNFG_WRITE_RSP = BLE_SERVC_ATTR_EVENT(BLE_GATC_SERV_CHANGED_CLI_CNFG_IDX, BLE_SERVC_WRITE_RSP)
}
 Generic Attribute client event type. More...
 

Functions

ble_status_t R_BLE_GATC_ReadServChangedCliCnfg (uint16_t conn_hdl)
 Read Service Changed characteristic Client Characteristic Configuration descriptor value from the remote GATT database. More...
 
ble_status_t R_BLE_GATC_WriteServChangedCliCnfg (uint16_t conn_hdl, const uint16_t *p_value)
 Write Service Changed characteristic Client Characteristic Configuration descriptor value to remote GATT database. More...
 
void R_BLE_GATC_GetServChangedAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_gatc_serv_changed_attr_hdl_t *p_hdl)
 Get Service Changed attribute handles. More...
 
ble_status_t R_BLE_GATC_Init (ble_servc_app_cb_t cb)
 Initialize Generic Attribute client. More...
 
void R_BLE_GATC_ServDiscCb (uint16_t conn_hdl, uint8_t serv_idx, uint16_t type, void *p_param)
 Generic Attribute client discovery callback. More...
 
void R_BLE_GATC_GetServAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_gatt_hdl_range_t *p_hdl)
 Get Generic Attribute client attribute handle. More...
 

Enumeration Type Documentation

◆ st_ble_gatc_char_idx_t

Generic Attribute characteristic ID.

◆ e_ble_gatc_event_t

Generic Attribute client event type.

Function Documentation

◆ R_BLE_GATC_ReadServChangedCliCnfg()

ble_status_t R_BLE_GATC_ReadServChangedCliCnfg ( uint16_t  conn_hdl)

Read Service Changed characteristic Client Characteristic Configuration descriptor value from the remote GATT database.

Parameters
[in]conn_hdlConnection handle.
Returns
ble_status_t

◆ R_BLE_GATC_WriteServChangedCliCnfg()

ble_status_t R_BLE_GATC_WriteServChangedCliCnfg ( uint16_t  conn_hdl,
const uint16_t *  p_value 
)

Write Service Changed characteristic Client Characteristic Configuration descriptor value to remote GATT database.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueService Changed characteristic Client Characteristic Configuration descriptor value to write.
Returns
ble_status_t

◆ R_BLE_GATC_GetServChangedAttrHdl()

void R_BLE_GATC_GetServChangedAttrHdl ( const st_ble_dev_addr_t p_addr,
st_ble_gatc_serv_changed_attr_hdl_t p_hdl 
)

Get Service Changed attribute handles.

Parameters
[in]p_addrBluetooth device address for the attribute handles.
[out]p_hdlThe pointer to store the retrieved attribute handles.
Returns
ble_status_t

◆ R_BLE_GATC_Init()

ble_status_t R_BLE_GATC_Init ( ble_servc_app_cb_t  cb)

Initialize Generic Attribute client.

Parameters
[in]cbClient callback.
Returns
ble_status_t

◆ R_BLE_GATC_ServDiscCb()

void R_BLE_GATC_ServDiscCb ( uint16_t  conn_hdl,
uint8_t  serv_idx,
uint16_t  type,
void *  p_param 
)

Generic Attribute client discovery callback.

Parameters
[in]conn_hdlConnection handle
[in]serv_idxService instance index.
[in]typeService discovery event type.
[in]p_paramService discovery event parameter.
Returns
ble_status_t

◆ R_BLE_GATC_GetServAttrHdl()

void R_BLE_GATC_GetServAttrHdl ( const st_ble_dev_addr_t p_addr,
st_ble_gatt_hdl_range_t p_hdl 
)

Get Generic Attribute client attribute handle.

Parameters
[in]p_addrBluetooth device address for the attribute handles.
[out]p_hdlThe pointer to store the retrieved attribute handles.