Bike service
Fork of BLE_API by
Diff: ble/DiscoveredCharacteristicDescriptor.h
- Revision:
- 1069:ec5549427b4a
- Parent:
- 1068:704b281b4ba0
- Child:
- 1071:4210304cfbe3
diff -r 704b281b4ba0 -r ec5549427b4a ble/DiscoveredCharacteristicDescriptor.h --- a/ble/DiscoveredCharacteristicDescriptor.h Mon Jan 11 08:51:39 2016 +0000 +++ b/ble/DiscoveredCharacteristicDescriptor.h Mon Jan 11 08:51:40 2016 +0000 @@ -24,33 +24,79 @@ #include "CharacteristicDescriptorDiscovery.h" /** + * @brief Representation of a descriptor discovered during a GattClient + * discovery procedure (see GattClient::discoverCharacteristicDescriptors or + * DiscoveredCharacteristic::discoverDescriptors ). * + * @detail Provide detailed informations about a discovered characteristic descriptor + * like: + * - Its UUID (see getUUID). + * - Its handle (see getAttributeHandle) + * Basic read (see GattClient::read) and write (see GattClient::write) procedure from + * GattClient can be used access the value of the descriptor. + * + * @todo read member function + * @todo write member function + * @todo enumeration of standard descriptors */ class DiscoveredCharacteristicDescriptor { public: + + /** + * @brief construct a new instance of a DiscoveredCharacteristicDescriptor + * + * @param client The client from where the descriptor has been discovered + * @param connectionHandle The connection handle on which the descriptor has + * been discovered + * @param attributeHandle The handle of the attribute containing this descriptor + * @param uuid The UUID of the descriptor + */ DiscoveredCharacteristicDescriptor( - GattClient* client, Gap::Handle_t connectionHandle, GattAttribute::Handle_t gattHandle, const UUID& uuid) : - _client(client), _connectionHandle(connectionHandle), _uuid(uuid), _gattHandle(gattHandle) { + GattClient* client, Gap::Handle_t connectionHandle, GattAttribute::Handle_t attributeHandle, const UUID& uuid) : + _client(client), _connectionHandle(connectionHandle), _uuid(uuid), _gattHandle(attributeHandle) { } + /** + * @brief Return the GattClient which can operate on this descriptor. + * @return The GattClient which can operate on this descriptor. + */ GattClient* getGattClient() { return _client; } + /** + * @brief Return the GattClient which can operate on this descriptor. + * @return The GattClient which can operate on this descriptor. + */ const GattClient* getGattClient() const { return _client; } + /** + * @brief Return the connection handle to the GattServer which contain + * this descriptor. + * @return the connection handle to the GattServer which contain + * this descriptor. + */ Gap::Handle_t getConnectionHandle() const { return _connectionHandle; } + /** + * @brief Return the UUID of this descriptor + * @return the UUID of this descriptor + */ const UUID& getUUID(void) const { return _uuid; } + /** + * @brief Return the attribute handle to use to access to this descriptor + * on the gatt server. + * @return The attribute handle of the descriptor + */ GattAttribute::Handle_t getAttributeHandle() const { return _gattHandle; }