COMMON IO-BLE v1.0.0
Hardware abstraction layer for Bluetooth
 
Loading...
Searching...
No Matches
BT-GATT Client Callbacks

Callbacks for BT-GATT Client Interface. More...

Typedefs

typedef void(* BTRegisterClientCallback_t) (BTGattStatus_t xStatus, uint8_t ucClientIf, BTUuid_t *pxAppUuid)
 Callback invoked in response pxRegisterClient when the GATT client registration has been completed.
 
typedef void(* BTSearchCompleteCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus)
 Callback invoked in response to pxSearchService when the GATT service search has been completed.
 
typedef void(* BTRegisterForNotificationCallback_t) (uint16_t usConnId, bool bRegistered, BTGattStatus_t xStatus, uint16_t usHandle)
 Callback invoked in response to pxRegisterForNotification and pxUnregisterForNotification.
 
typedef void(* BTNotifyCallback_t) (uint16_t usConnId, BTGattNotifyParams_t *pxData)
 Remote device notification callback, invoked when a remote device sends a notification or indication that a client has registered for.
 
typedef void(* BTReadCharacteristicCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus, BTGattReadParams_t *pxData)
 Reports result of a GATT read operation. Triggered by pxReadCharacteristic.
 
typedef void(* BTWriteCharacteristicCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus, uint16_t usHandle)
 GATT write characteristic operation callback. Triggered by pxWriteCharacteristic.
 
typedef void(* BTExecuteWriteCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus)
 GATT execute prepared write callback. Triggered by pxExecuteWrite.
 
typedef void(* BTReadDescriptorCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus, BTGattReadParams_t *pxData)
 Callback invoked in response to pxReadDescriptor.
 
typedef void(* BTWriteDescriptorCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus, uint16_t usHandle)
 Callback invoked in response to pxWriteDescriptor.
 
typedef void(* BTListenCallback_t) (BTGattStatus_t xStatus, uint32_t ulServerIf)
 Callback indicating the status of a listen() operation.
 
typedef void(* BTConfigureMtuCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus, uint32_t ulMtu)
 Callback invoked when the MTU for a given connection changes. Triggered by pxConfigureMtu.
 
typedef void(* BTGetGattDbCallback_t) (uint16_t usConnId, BTGattDbElement_t *pxDb, uint32_t ulCount)
 GATT get database callback. Triggered by pxGetGattDb.
 
typedef void(* BTServicesRemovedCallback_t) (uint16_t usConnId, uint16_t usStartHandle, uint16_t usEndHandle)
 GATT services between startHandle and endHandle were removed.
 
typedef void(* BTServicesAddedCallback_t) (uint16_t usConnId, BTGattDbElement_t *pxAdded, uint32_t ulAddedCount)
 GATT services were added.
 

Detailed Description

Callbacks for BT-GATT Client Interface.

Typedef Documentation

◆ BTRegisterClientCallback_t

typedef void(* BTRegisterClientCallback_t) (BTGattStatus_t xStatus, uint8_t ucClientIf, BTUuid_t *pxAppUuid)

Callback invoked in response pxRegisterClient when the GATT client registration has been completed.

BT-GATT Client callback structure.

Parameters
[in]xStatusreturns eBTStatusSuccess if operation succeeded.
[in]ucClientIfClient interface.
[in]pxAppUuidGATT client UUID.

◆ BTSearchCompleteCallback_t

typedef void(* BTSearchCompleteCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus)

Callback invoked in response to pxSearchService when the GATT service search has been completed.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
[in]xStatusreturns eBTGattStatusSuccess if operation succeeded.

◆ BTRegisterForNotificationCallback_t

typedef void(* BTRegisterForNotificationCallback_t) (uint16_t usConnId, bool bRegistered, BTGattStatus_t xStatus, uint16_t usHandle)

Callback invoked in response to pxRegisterForNotification and pxUnregisterForNotification.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
[in]bRegisteredSet to True if attribute id registered for notifications, set to False otherwise.
[in]xStatusreturns eBTGattStatusSuccess if operation succeeded.
[in]usHandleHandle number of attribute [de]registered for notification.

◆ BTNotifyCallback_t

typedef void(* BTNotifyCallback_t) (uint16_t usConnId, BTGattNotifyParams_t *pxData)

Remote device notification callback, invoked when a remote device sends a notification or indication that a client has registered for.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
[in]pxDataParameters for attribute change notifications.

◆ BTReadCharacteristicCallback_t

typedef void(* BTReadCharacteristicCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus, BTGattReadParams_t *pxData)

Reports result of a GATT read operation. Triggered by pxReadCharacteristic.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
[in]xStatusreturns eBTGattStatusSuccess if operation succeeded.
[in]pxDataParameters for GATT read operation.

◆ BTWriteCharacteristicCallback_t

typedef void(* BTWriteCharacteristicCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus, uint16_t usHandle)

GATT write characteristic operation callback. Triggered by pxWriteCharacteristic.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
[in]xStatusreturns eBTGattStatusSuccess if operation succeeded.
[in]usHandleHandle of the attribute written to.

◆ BTExecuteWriteCallback_t

typedef void(* BTExecuteWriteCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus)

GATT execute prepared write callback. Triggered by pxExecuteWrite.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
[in]xStatusreturns eBTGattStatusSuccess if operation succeeded.

◆ BTReadDescriptorCallback_t

typedef void(* BTReadDescriptorCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus, BTGattReadParams_t *pxData)

Callback invoked in response to pxReadDescriptor.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
[in]xStatusreturns eBTGattStatusSuccess if operation succeeded.
[in]pxDataParameters for GATT read operation.

◆ BTWriteDescriptorCallback_t

typedef void(* BTWriteDescriptorCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus, uint16_t usHandle)

Callback invoked in response to pxWriteDescriptor.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
[in]xStatusreturns eBTGattStatusSuccess if operation succeeded.
[in]usHandleHandle of the attribute written to.

◆ BTListenCallback_t

typedef void(* BTListenCallback_t) (BTGattStatus_t xStatus, uint32_t ulServerIf)

Callback indicating the status of a listen() operation.

Callback has been deprecated, use BTAdvStatusCallback_t in BTBleAdapterCallbacks_t instead.

◆ BTConfigureMtuCallback_t

typedef void(* BTConfigureMtuCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus, uint32_t ulMtu)

Callback invoked when the MTU for a given connection changes. Triggered by pxConfigureMtu.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
[in]xStatusreturns eBTGattStatusSuccess if operation succeeded.
[in]ulMtuMTU size.

◆ BTGetGattDbCallback_t

typedef void(* BTGetGattDbCallback_t) (uint16_t usConnId, BTGattDbElement_t *pxDb, uint32_t ulCount)

GATT get database callback. Triggered by pxGetGattDb.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
[in]pxDbGATT database elements
[in]ulCountNumber of elements in GATT database.

◆ BTServicesRemovedCallback_t

typedef void(* BTServicesRemovedCallback_t) (uint16_t usConnId, uint16_t usStartHandle, uint16_t usEndHandle)

GATT services between startHandle and endHandle were removed.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
[in]usStartHandleFirst service handle removed from server.
[in]usEndHandleLast service handle removed from server.

◆ BTServicesAddedCallback_t

typedef void(* BTServicesAddedCallback_t) (uint16_t usConnId, BTGattDbElement_t *pxAdded, uint32_t ulAddedCount)

GATT services were added.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
[in]pxAddedGATT database elements added.
[in]ulAddedCountNumber of GATT database elements added.