Bluetooth Host Stack Library

General Description

GATT Database Access Functions.

Functions

wiced_bt_gatt_status_t wiced_bt_gatt_db_init (const uint8_t *p_gatt_db, uint16_t gatt_db_size, wiced_bt_db_hash_t hash)
 Initialize the GATT database (Please refer Service and Characteristic macros for MACRO's to create or add entries to GATT database) More...
 
wiced_bt_gatt_status_t wiced_bt_gatt_add_services_to_db (const uint8_t *p_gatt_db, uint16_t gatt_db_size, wiced_bt_db_hash_t hash)
 Add a service module to the database. More...
 
wiced_bt_gatt_status_t wiced_bt_gatt_db_remove_services_from_db (const uint8_t *p_gatt_db, wiced_bt_db_hash_t hash)
 Remove the service module from the database. More...
 

Function Documentation

◆ wiced_bt_gatt_db_init()

wiced_bt_gatt_status_t wiced_bt_gatt_db_init ( const uint8_t *  p_gatt_db,
uint16_t  gatt_db_size,
wiced_bt_db_hash_t  hash 
)

Initialize the GATT database (Please refer Service and Characteristic macros for MACRO's to create or add entries to GATT database)

Parameters
[in]p_gatt_db: First element in new GATT database array
[in]gatt_db_size: Size (in bytes) of GATT database
[out]hash: The calculated database hash value. The hash pointer passed to this function shall be NULL incase the application does not support dynamic databases and does not support database caching
Note
GATT server apps which support Robust Caching need to invoke
See also
wiced_bt_gatt_server_enable_caching prior to invoking wiced_bt_gatt_db_init
Note
In case
See also
wiced_bt_gatt_server_enable_caching is not invoked, hash has to be set to NULL
Returns
wiced_bt_gatt_status_t

◆ wiced_bt_gatt_add_services_to_db()

wiced_bt_gatt_status_t wiced_bt_gatt_add_services_to_db ( const uint8_t *  p_gatt_db,
uint16_t  gatt_db_size,
wiced_bt_db_hash_t  hash 
)

Add a service module to the database.

Service modules define the complete service handles (i.e Service, characteristics, descriptor, included service declaration handles) The handle range in the service modules have to be distinct, i.e, cannot overlap with any of the existing service modules in the database

Note
Set the wiced_bt_cfg_gatt_t::max_db_service_modules to the number of additional services to be added
Parameters
[in]p_gatt_db: First element in GATT database array
[in]gatt_db_size: Size (in bytes) of GATT database
[out]hash: The calculated database hash value. The hash pointer passed to this function can be NULL incase the application does not support dynamic databases and does not support database caching
Returns
wiced_bt_gatt_status_t

◆ wiced_bt_gatt_db_remove_services_from_db()

wiced_bt_gatt_status_t wiced_bt_gatt_db_remove_services_from_db ( const uint8_t *  p_gatt_db,
wiced_bt_db_hash_t  hash 
)

Remove the service module from the database.

Parameters
[in]p_gatt_db: First element in GATT database array
[out]hash: The calculated database hash value. The hash pointer passed to this function can be NULL incase the application does not support dynamic databases and does not support database caching
Returns
wiced_bt_gatt_status_t