GATT Client Cache Manager

nRF5 SDK v10.0.0

nRF51 SDK v10.0.0

An internal module of Peer Manager . A module for managing persistent storing of GATT attributes pertaining to the GATT client role of the local device. More...

Data Structures

struct gccm_evt_t

Typedefs

typedef void(* gccm_evt_handler_t )( gccm_evt_t const *p_event)
Event handler for events from the GATT Client Cache Manager module. More...

Enumerations

enum gccm_evt_id_t {
GCCM_EVT_REMOTE_DB_UPDATED ,
GCCM_EVT_REMOTE_DB_STORED
}
Events that can come from the GATT Cache Manager module. More...

Functions

ret_code_t gccm_init ( gccm_evt_handler_t evt_handler)
Function for initializing the GATT Client Cache Manager module. More...
ret_code_t gccm_remote_db_store ( pm_peer_id_t peer_id, pm_peer_data_remote_gatt_db_t *p_remote_db)
Function for storing a discovered remote database persistently. More...
ret_code_t gccm_remote_db_retrieve ( pm_peer_id_t peer_id, pm_peer_data_remote_gatt_db_t *p_remote_db)
Function for retrieving a persistently stored remote database. More...

Detailed Description

An internal module of Peer Manager . A module for managing persistent storing of GATT attributes pertaining to the GATT client role of the local device.

Typedef Documentation

typedef void(* gccm_evt_handler_t)( gccm_evt_t const *p_event)

Event handler for events from the GATT Client Cache Manager module.

Parameters
[in] event The event that has happened.
[in] peer The id of the peer the event pertains to.
[in] flags The data the event pertains to.

Enumeration Type Documentation

Events that can come from the GATT Cache Manager module.

Enumerator
GCCM_EVT_REMOTE_DB_UPDATED

Values for the specified data has been updated in persistent storage.

GCCM_EVT_REMOTE_DB_STORED

New values for the specified data has been written in persistent storage.

Function Documentation

ret_code_t gccm_init ( gccm_evt_handler_t evt_handler )

Function for initializing the GATT Client Cache Manager module.

Parameters
[in] evt_handler Callback for events from the GATT Client Cache Manager module.
Return values
NRF_SUCCESS Initialization was successful.
NRF_ERROR_NULL evt_handler was NULL.
ret_code_t gccm_remote_db_retrieve ( pm_peer_id_t peer_id ,
pm_peer_data_remote_gatt_db_t * p_remote_db
)

Function for retrieving a persistently stored remote database.

Parameters
[in] peer_id Peer to retrieve data for.
[in,out] p_remote_db Copied database values. If NULL, nothing is copied.
Return values
NRF_SUCCESS Data retrieved successfully.
NRF_ERROR_NOT_FOUND The peer ID is invalid or unallocated.
NRF_ERROR_INVALID_STATE Module is not initialized.
ret_code_t gccm_remote_db_store ( pm_peer_id_t peer_id ,
pm_peer_data_remote_gatt_db_t * p_remote_db
)

Function for storing a discovered remote database persistently.

Parameters
[in] peer_id Peer to store the database for.
[in] p_remote_db Database values to store. If NULL, values are cleared instead.
Return values
NRF_SUCCESS Store procedure successfully started.
NRF_ERROR_NOT_FOUND The peer id is invalid or unallocated.
NRF_ERROR_INVALID_STATE Module is not initialized.

Please send us your feedback about the documentation! For technical questions, visit the Nordic Developer Zone .