20 #ifndef MBED_GATT_CLIENT_H__ 22 #define MBED_GATT_CLIENT_H__ 24 #include "ble/common/CallChainOfFunctionPointersWithContext.h" 25 #include "ble/common/blecommon.h" 27 #include "ble/gatt/GattAttribute.h" 28 #include "ble/gatt/ServiceDiscovery.h" 29 #include "ble/gatt/CharacteristicDescriptorDiscovery.h" 30 #include "ble/gatt/GattCallbackParamTypes.h" 31 #include "ble/gatt/DiscoveredService.h" 32 #include "ble/gatt/DiscoveredCharacteristic.h" 36 #if !defined(DOXYGEN_ONLY) 40 #endif // !defined(DOXYGEN_ONLY) 115 (void)connectionHandle;
160 GATT_OP_WRITE_REQ = 0x01,
168 GATT_OP_WRITE_CMD = 0x02,
177 GATT_OP_SIGNED_WRITE_CMD = 0x03
369 bool isServiceDiscoveryActive()
const;
377 void terminateServiceDiscovery();
518 void onServiceDiscoveryTermination(
560 bool isCharacteristicDescriptorDiscoveryActive(
573 void terminateCharacteristicDescriptorDiscovery(
627 template <
typename T>
630 onShutdown({objPtr, memberPtr});
709 #if !defined(DOXYGEN_ONLY) 710 GattClient(impl::GattClient* impl) : impl(impl) { }
713 #endif // !defined(DOXYGEN_ONLY) 716 impl::GattClient *impl;
Function like object adapter over freestanding and member functions.
Definition of the general handler of GattClient related events.
FunctionPointerWithContext< const GattClient * > GattClientShutdownCallback_t
Shutdown event handler.
uintptr_t connection_handle_t
Opaque reference to a connection.
Representation of a characteristic discovered.
Handle Value Notification/Indication event.
CallChainOfFunctionPointersWithContext< const GattReadCallbackParams * > ReadCallbackChain_t
Callchain of attribute read event handlers.
CallChainOfFunctionPointersWithContext< const GattWriteCallbackParams * > WriteCallbackChain_t
Callchain of attribute write event handlers.
Representation of a Universally Unique Identifier (UUID).
FunctionPointerWithContext< const GattHVXCallbackParams * > HVXCallback_t
Handle value notification/indication event handler.
ble::attribute_handle_t Handle_t
Representation of an attribute handle.
FunctionPointerWithContext< const GattWriteCallbackParams * > WriteCallback_t
Attribute write event handler.ble::WriteCallback_t.
GATT Write event definition.
void onShutdown(T *objPtr, void(T::*memberPtr)(const GattClient *))
Register a shutdown event handler.
uint16_t ShortUUIDBytes_t
Type for a 16-bit UUID.
GATT Read event definition.
WriteOp_t
GATT write operations.
virtual void onAttMtuChange(ble::connection_handle_t connectionHandle, uint16_t attMtuSize)
Function invoked when the connections changes the ATT_MTU which controls the maximum size of an attri...
Define procedures required for interacting with a distant GATT server.
CallChainOfFunctionPointersWithContext< const GattClient * > GattClientShutdownCallbackChain_t
Callchain of shutdown event handlers.
Function like object hosting a list of FunctionPointerWithContext.
FunctionPointerWithContext< const GattReadCallbackParams * > ReadCallback_t
Attribute read event handler.
Entry namespace for all BLE API definitions.
CallChainOfFunctionPointersWithContext< const GattHVXCallbackParams * > HVXCallbackChain_t
Callchain of handle value notification/indication event handlers.
ble_error_t
Error codes for the BLE API.