Functions

uint16_t ble_gattc_cache_enable (uint8_t conn_idx)
 GATTC cache feature enable. More...
 
uint16_t ble_gattc_cache_disable (uint8_t conn_idx)
 GATTC cache feature disable. More...
 
bool ble_gattc_cache_feat_get (uint8_t conn_idx)
 GATTC Get cache feature state. More...
 
uint16_t ble_gattc_cache_get (uint8_t conn_idx, attr_cache_info_t *p_cache_data, uint16_t *p_cache_count)
 GATTC cache data get. More...
 
uint16_t ble_gattc_cache_list_get (gatt_cache_list_t *p_cache_list)
 Get the content of the whole GATT caching list. More...
 
uint16_t ble_gattc_cache_delete (ble_gap_bdaddr_t *p_peer_bd_addr)
 GATTC cache date delete on disconnection state. More...
 

Detailed Description

Function Documentation

◆ ble_gattc_cache_delete()

uint16_t ble_gattc_cache_delete ( ble_gap_bdaddr_t p_peer_bd_addr)

GATTC cache date delete on disconnection state.

Parameters
[in]p_peer_bd_addrIdentity address of peer device.
Return values
SDK_SUCCESSSuccessfully delete cache in nvds.
BLE_SDK_ERR_BAD_PARAMInvalid parameter(s) supplied.
BLE_SDK_ERR_LIST_ITEM_NOT_FOUNDItem not found in list.

◆ ble_gattc_cache_disable()

uint16_t ble_gattc_cache_disable ( uint8_t  conn_idx)

GATTC cache feature disable.

Note
This function will delete caching data saved in nvds and disable cache feature.
Parameters
[in]conn_idxCurrent connection index.
Return values
SDK_SUCCESSSuccessfully enable cache feature.
BLE_SDK_ERR_BAD_PARAMInvalid parameter(s) supplied.

◆ ble_gattc_cache_enable()

uint16_t ble_gattc_cache_enable ( uint8_t  conn_idx)

GATTC cache feature enable.

Note
Once enabling peer cache feature and caching data finished, the event BLE_GATTC_EVT_CACHE_UPDATE will be called.
Parameters
[in]conn_idxCurrent connection index.
Return values
SDK_SUCCESSSuccessfully enable cache feature.
BLE_SDK_ERR_BAD_PARAMInvalid parameter(s) supplied.

◆ ble_gattc_cache_feat_get()

bool ble_gattc_cache_feat_get ( uint8_t  conn_idx)

GATTC Get cache feature state.

Note
This function returns cache feature state.
Parameters
[in]conn_idxCurrent connection index.
Returns
true if cache feature enable, false otherwise.

◆ ble_gattc_cache_get()

uint16_t ble_gattc_cache_get ( uint8_t  conn_idx,
attr_cache_info_t p_cache_data,
uint16_t *  p_cache_count 
)

GATTC cache data get.

Note
User should get cache data after gattc_cb_fun_t::app_gattc_cache_update_cb called. Real cache data length will be returned whether user provide enough buf or not. If cache data is NULL, p_cache_count will return cache data length.
Parameters
[in]conn_idxCurrent connection index.
[in]p_cache_dataThe attribute cache buf.
[out]p_cache_countThe count of attribute cache buf.
Return values
SDK_SUCCESSSuccessfully get cache attributes info.
BLE_SDK_ERR_BAD_PARAMInvalid parameter(s) supplied.
BLE_SDK_ERR_CACHE_NOT_ENABLECache feature is not enabled.
BLE_SDK_ERR_BUSYCaching data operation is not finished.
BLE_SDK_ERR_BUF_LEN_NOT_ENOUGHThe cache buf lenth is not enough.

◆ ble_gattc_cache_list_get()

uint16_t ble_gattc_cache_list_get ( gatt_cache_list_t p_cache_list)

Get the content of the whole GATT caching list.

Parameters
[in]p_cache_listPointer to the output caching list.
Return values
SDK_SUCCESSOperation is successful.
SDK_ERR_POINTER_NULLInvalid pointer supplied.