nRF51 SDK v10.0.0
Data Structures | Typedefs | Enumerations | Functions
GATT Client Cache Manager

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]eventThe event that has happened.
[in]peerThe id of the peer the event pertains to.
[in]flagsThe 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_handlerCallback for events from the GATT Client Cache Manager module.
Return values
NRF_SUCCESSInitialization was successful.
NRF_ERROR_NULLevt_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_idPeer to retrieve data for.
[in,out]p_remote_dbCopied database values. If NULL, nothing is copied.
Return values
NRF_SUCCESSData retrieved successfully.
NRF_ERROR_NOT_FOUNDThe peer ID is invalid or unallocated.
NRF_ERROR_INVALID_STATEModule 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_idPeer to store the database for.
[in]p_remote_dbDatabase values to store. If NULL, values are cleared instead.
Return values
NRF_SUCCESSStore procedure successfully started.
NRF_ERROR_NOT_FOUNDThe peer id is invalid or unallocated.
NRF_ERROR_INVALID_STATEModule is not initialized.

This document was last updated on Mon Nov 9 2015.
Please send us your feedback about the documentation! For technical questions, visit the Nordic Developer Zone.