Callbacks for BT-GATT Server Interface. More...
Typedefs | |
typedef void(* | BTRegisterServerCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, BTUuid_t *pxAppUuid) |
Callback invoked in response to pxRegisterServer. | |
typedef void(* | BTUnregisterServerCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf) |
Callback invoked in response to pxUnregisterServer. | |
typedef void(* | BTConnectionCallback_t) (uint16_t usConnId, uint8_t ucServerIf, bool bConnected, BTBdaddr_t *pxBda) |
Callback invoked on a connection event. | |
typedef void(* | BTServiceAddedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, BTGattSrvcId_t *pxSrvcId, uint16_t usServiceHandle) |
Callback invoked in response to pxAddService. | |
typedef void(* | BTIncludedServiceAddedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, uint16_t usServiceHandle, uint16_t usInclSrvcHandle) |
Callback invoked in response to pxAddIncludedService. | |
typedef void(* | BTCharacteristicAddedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, BTUuid_t *pxUuid, uint16_t usServiceHandle, uint16_t usCharHandle) |
Callback invoked in response to pxAddCharacteristic. | |
typedef void(* | BTSetValCallback_t) (BTStatus_t xStatus, uint16_t usAttrHandle) |
Callback invoked in response to pxSetVal. | |
typedef void(* | BTDescriptorAddedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, BTUuid_t *pxUuid, uint16_t usServiceHandle, uint16_t usDescrHandle) |
Callback invoked in response to pxAddDescriptor. | |
typedef void(* | BTServiceStartedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, uint16_t usServiceHandle) |
Callback invoked in response to pxStartService. | |
typedef void(* | BTServiceStoppedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, uint16_t usServiceHandle) |
Callback invoked in response to pxStopService. | |
typedef void(* | BTServiceDeletedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, uint16_t usServiceHandle) |
Callback invoked in response to pxDeleteService. | |
typedef void(* | BTRequestReadCallback_t) (uint16_t usConnId, uint32_t ulTransId, BTBdaddr_t *pxBda, uint16_t usAttrHandle, uint16_t usOffset) |
Callback invoked on read event. | |
typedef void(* | BTRequestWriteCallback_t) (uint16_t usConnId, uint32_t ulTransId, BTBdaddr_t *pxBda, uint16_t usAttrHandle, uint16_t usOffset, size_t xLength, bool bNeedRsp, bool bIsPrep, uint8_t *pucValue) |
Callback invoked on write event. | |
typedef void(* | BTRequestExecWriteCallback_t) (uint16_t usConnId, uint32_t ulTransId, BTBdaddr_t *pxBda, bool bExecWrite) |
Callback invoked on execute write event. | |
typedef void(* | BTResponseConfirmationCallback_t) (BTStatus_t xStatus, uint16_t usHandle) |
Callback triggered in response to sendResponse if the remote device sends a confirmation. | |
typedef void(* | BTIndicationSentCallback_t) (uint16_t usConnId, BTStatus_t xStatus) |
Callback on confirmation device from the remote device to an indication. Or confirm a Notification as been sent. | |
typedef void(* | BTMtuChangedCallback_t) (uint16_t usConnId, uint16_t usMtu) |
Callback invoked when the MTU for a given connection changes. | |
typedef void(* | BTWhiteListChangedCallback_t) (const BTBdaddr_t *pxBdAddr, bool bIsAdded) |
Callback for notifying modification in white list. | |
Callbacks for BT-GATT Server Interface.
typedef void(* BTRegisterServerCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, BTUuid_t *pxAppUuid) |
Callback invoked in response to pxRegisterServer.
BT-GATT Server callback structure.
[in] | xStatus | returns eBTStatusSuccess if operation succeeded. |
[in] | ucServerIf | Server interface. |
[in] | pxAppUuid | GATT server UUID. |
typedef void(* BTUnregisterServerCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf) |
Callback invoked in response to pxUnregisterServer.
[in] | xStatus | returns eBTStatusSuccess if operation succeeded. |
[in] | ucServerIf | Server interface, return on the callback BTRegisterServerCallback_t after successful pxRegisterServer call. |
typedef void(* BTConnectionCallback_t) (uint16_t usConnId, uint8_t ucServerIf, bool bConnected, BTBdaddr_t *pxBda) |
Callback invoked on a connection event.
[in] | usConnId | Connection Identifier. Uniquely identify a connection. |
[in] | ucServerIf | Server interface, return on the callback BTRegisterServerCallback_t after successful pxRegisterServer call. |
[in] | bConnected | Flag set to true on a connect and to false on a disconnect. |
[in] | pxBda | Address of the remote device. |
typedef void(* BTServiceAddedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, BTGattSrvcId_t *pxSrvcId, uint16_t usServiceHandle) |
Callback invoked in response to pxAddService.
[in] | xStatus | returns eBTStatusSuccess if operation succeeded. |
[in] | ucServerIf | Server interface, return on the callback BTRegisterServerCallback_t after successful pxRegisterServer call. |
[in] | pxSrvcId | Service ID, returned on BTServiceAddedCallback_t after calling pxAddService. |
[in] | usServiceHandle | Handle of the service containing the attribute. |
typedef void(* BTIncludedServiceAddedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, uint16_t usServiceHandle, uint16_t usInclSrvcHandle) |
Callback invoked in response to pxAddIncludedService.
[in] | xStatus | returns eBTStatusSuccess if operation succeeded. |
[in] | ucServerIf | Server interface, return on the callback BTRegisterServerCallback_t after successful pxRegisterServer call. |
[in] | usServiceHandle | Handle of the service containing the attribute. |
[in] | usInclSrvcHandle | Handle of the Attribute "included service". |
typedef void(* BTCharacteristicAddedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, BTUuid_t *pxUuid, uint16_t usServiceHandle, uint16_t usCharHandle) |
Callback invoked in response to pxAddCharacteristic.
[in] | xStatus | returns eBTStatusSuccess if operation succeeded. |
[in] | ucServerIf | Server interface, return on the callback BTRegisterServerCallback_t after successful pxRegisterServer call. |
[in] | pxUuid | UUID of the characteristic. |
[in] | usServiceHandle | Handle of the service containing the attribute. |
[in] | usCharHandle | Handle of the characteristic being added. |
typedef void(* BTSetValCallback_t) (BTStatus_t xStatus, uint16_t usAttrHandle) |
Callback invoked in response to pxSetVal.
[in] | xStatus | returns eBTStatusSuccess if operation succeeded. |
[in] | usAttrHandle | Handle of the attribute. |
typedef void(* BTDescriptorAddedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, BTUuid_t *pxUuid, uint16_t usServiceHandle, uint16_t usDescrHandle) |
Callback invoked in response to pxAddDescriptor.
[in] | xStatus | returns eBTStatusSuccess if operation succeeded. |
[in] | ucServerIf | Server interface, return on the callback BTRegisterServerCallback_t after successful pxRegisterServer call. |
[in] | pxUuid | UUID of the descriptor. |
[in] | usServiceHandle | Handle of the service containing the attribute. |
[in] | usDescrHandle | Handle of the descriptor being added. |
typedef void(* BTServiceStartedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, uint16_t usServiceHandle) |
Callback invoked in response to pxStartService.
[in] | xStatus | returns eBTStatusSuccess if operation succeeded. |
[in] | ucServerIf | Server interface, return on the callback BTRegisterServerCallback_t after successful pxRegisterServer call. |
[in] | usServiceHandle | Handle of the service containing the attribute. |
typedef void(* BTServiceStoppedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, uint16_t usServiceHandle) |
Callback invoked in response to pxStopService.
[in] | xStatus | returns eBTStatusSuccess if operation succeeded. |
[in] | ucServerIf | Server interface, return on the callback BTRegisterServerCallback_t after successful pxRegisterServer call. |
[in] | usServiceHandle | Handle of the service containing the attribute. |
typedef void(* BTServiceDeletedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, uint16_t usServiceHandle) |
Callback invoked in response to pxDeleteService.
[in] | xStatus | Returns eBTStatusSuccess if operation succeeded. |
[in] | ucServerIf | Server interface, return on the callback BTRegisterServerCallback_t after successful pxRegisterServer call. |
[in] | usServiceHandle | Handle of the service containing the attribute. |
typedef void(* BTRequestReadCallback_t) (uint16_t usConnId, uint32_t ulTransId, BTBdaddr_t *pxBda, uint16_t usAttrHandle, uint16_t usOffset) |
Callback invoked on read event.
Callback invoked when a remote device has requested to read a characteristic or descriptor. The application must respond by calling sendResponse.
[in] | usConnId | Connection Identifier, created and return on connection event, when BTConnectionCallback_t is invoked. |
[in] | ulTransId | Transaction ID. |
[in] | pxBda | Remote device address. |
[in] | usAttrHandle | Handle of the attribute. |
[in] | usOffset | Index of read. |
typedef void(* BTRequestWriteCallback_t) (uint16_t usConnId, uint32_t ulTransId, BTBdaddr_t *pxBda, uint16_t usAttrHandle, uint16_t usOffset, size_t xLength, bool bNeedRsp, bool bIsPrep, uint8_t *pucValue) |
Callback invoked on write event.
Callback invoked when a remote device has requested to write to a characteristic or descriptor.
[in] | usConnId | Connection Identifier, created and return on connection event, when BTConnectionCallback_t is invoked. |
[in] | ulTransId | Transaction ID. |
[in] | pxBda | Remote device address. |
[in] | usAttrHandle | Handle of the attribute. |
[in] | usOffset | Index of write. |
[in] | xLength | Length of pucValue to write. |
[in] | bNeedRsp | True if a response is needed. |
[in] | bIsPrep | True if it is a prepare write command. |
[in] | pucValue | Data to write. |
typedef void(* BTRequestExecWriteCallback_t) (uint16_t usConnId, uint32_t ulTransId, BTBdaddr_t *pxBda, bool bExecWrite) |
Callback invoked on execute write event.
Callback invoked when a remote device that has done prepare write is now executing the command.
[in] | usConnId | Connection Identifier, created and return on connection event, when BTConnectionCallback_t is invoked. |
[in] | ulTransId | Transaction ID. |
[in] | pxBda | Remote device address. |
[in] | bExecWrite | True is the write order needs to be executed. |
typedef void(* BTResponseConfirmationCallback_t) (BTStatus_t xStatus, uint16_t usHandle) |
Callback triggered in response to sendResponse if the remote device sends a confirmation.
[in] | xStatus | returns eBTStatusSuccess if operation succeeded. |
[in] | usHandle | Handle of the attribute. |
typedef void(* BTIndicationSentCallback_t) (uint16_t usConnId, BTStatus_t xStatus) |
Callback on confirmation device from the remote device to an indication. Or confirm a Notification as been sent.
[in] | usConnId | Connection Identifier, created and return on connection event, when BTConnectionCallback_t is invoked. |
[in] | xStatus | returns eBTStatusSuccess if operation succeeded. |
typedef void(* BTMtuChangedCallback_t) (uint16_t usConnId, uint16_t usMtu) |
Callback invoked when the MTU for a given connection changes.
[in] | usConnId | Connection Identifier, created and return on connection event, when BTConnectionCallback_t is invoked. |
[in] | usMtu | MTU size. |
typedef void(* BTWhiteListChangedCallback_t) (const BTBdaddr_t *pxBdAddr, bool bIsAdded) |
Callback for notifying modification in white list.
[in] | pxBdAddr | Address of the Remote device. |
[in] | bIsAdded | true if device added false if device not in white list |