19#ifndef MBED_DISCOVERED_CHARACTERISTIC_H__
20#define MBED_DISCOVERED_CHARACTERISTIC_H__
23#include "ble/gatt/GattAttribute.h"
24#include "ble/gatt/GattCallbackParamTypes.h"
25#include "ble/gatt/CharacteristicDescriptorDiscovery.h"
26#include "ble/gatt/DiscoveredCharacteristicDescriptor.h"
276 return !(lhs == rhs);
281 operator uint8_t()
const;
282 operator unsigned()
const;
436 const uint8_t *value,
581 return !(lhs == rhs);
Representation of a characteristic discovered.
GattAttribute::Handle_t declHandle
Value handle of the discovered characteristic's declaration attribute.
GattAttribute::Handle_t getValueHandle() const
Get the attribute handle of the characteristic value.
const Properties_t & getProperties() const
Get the properties of this characteristic.
GattAttribute::Handle_t getDeclHandle() const
Get the declaration handle of this characteristic.
GattAttribute::Handle_t valueHandle
Value handle of the discovered characteristic's value attribute.
ble_error_t write(uint16_t length, const uint8_t *value, const ble::WriteCallback_t &onWrite) const
Initiate a write procedure of the characteristic value.
ble_error_t read(uint16_t offset=0) const
Initiate a read of the characteristic value.
ble_error_t writeWoResponse(uint16_t length, const uint8_t *value) const
Perform a write without response procedure.
ble::connection_handle_t connHandle
Handle of the connection where the characteristic was discovered.
GattAttribute::Handle_t getLastHandle() const
Return the last attribute handle of the characteristic definition.
GattAttribute::Handle_t lastHandle
Value handle of the discovered characteristic's last attribute.
ble_error_t write(uint16_t length, const uint8_t *value) const
Initiate a write procedure of the characteristic value.
friend bool operator==(const DiscoveredCharacteristic &lhs, const DiscoveredCharacteristic &rhs)
"Equal to" operator for DiscoveredCharacteristic.
ble::connection_handle_t getConnectionHandle() const
Get the connection handle to the GattServer containing this characteristic.
friend bool operator!=(const DiscoveredCharacteristic &lhs, const DiscoveredCharacteristic &rhs)
"Not equal to" operator for DiscoveredCharacteristic.
Properties_t props
Hold the configured properties of the discovered characteristic.
ble_error_t discoverDescriptors(const CharacteristicDescriptorDiscovery::DiscoveryCallback_t &onDescriptorDiscovered, const CharacteristicDescriptorDiscovery::TerminationCallback_t &onTermination) const
Initiate a discovery of the characteristic descriptors.
const ble::GattClient * getGattClient() const
Get the ble::GattClient, which can operate on this characteristic.
ble::GattClient * getGattClient()
Get the ble::GattClient, which can operate on this characteristic.
ble::GattClient * gattc
Pointer to the underlying ble::GattClient for this DiscoveredCharacteristic object.
UUID uuid
Discovered characteristic's UUID.
ble_error_t read(uint16_t offset, const ble::ReadCallback_t &onRead) const
Initiate a read of the characteristic value and pass the response to its completion callback.
const UUID & getUUID() const
Get the UUID of the discovered characteristic.
Function like object adapter over freestanding and member functions.
Representation of a GattServer attribute.
ble::attribute_handle_t Handle_t
Representation of an attribute handle.
Representation of a Universally Unique Identifier (UUID).
void setupLong(const LongUUIDBytes_t longUUID, ByteOrder_t order=UUID::MSB)
Replace existing value with a 128-bit UUID.
uint8_t LongUUIDBytes_t[LENGTH_OF_LONG_UUID]
Type for a 128-bit UUID.
ByteOrder_t
Enumeration of byte ordering.
@ MSB
Most significant byte first (at the smallest address).
Define procedures required for interacting with a distant GATT server.
ble_error_t
Error codes for the BLE API.
Entry namespace for all BLE API definitions.
uintptr_t connection_handle_t
Opaque reference to a connection.
Properties of a discovered characteristic.
friend bool operator==(Properties_t lhs, Properties_t rhs)
Equal to operator for DiscoveredCharacteristic::Properties_t.
uint8_t _indicate
If set, the server can emit indication of the Characteristic Value (with client acknowledgement).
uint8_t _notify
If set, the server can emit notifications of the Characteristic Value (without client acknowledgment)...
bool writeWoResp() const
Return the value of the write without response property.
uint8_t _writeWoResp
If set, a write command can write the characteristic value (write without response).
bool broadcast() const
Return the value of the broadcast propertie.
uint8_t _write
If set, clients can issue requests to write the characteristic.
bool indicate() const
Return the value of the indicate property.
bool read() const
Return the value of the read property.
bool notify() const
Return the value of the notification property.
uint8_t _authSignedWrite
If set, signed write of the Characteristic Value is supported.
uint8_t _broadcast
Permits broadcasts of the characteristic value using the character the Server Characteristic Configur...
bool write() const
Return the value of the write property.
uint8_t _read
If set, the value of the characteristic can be read.
bool authSignedWrite() const
Return the value of the authenticated signed writes property.
friend bool operator!=(Properties_t lhs, Properties_t rhs)
Not equal to operator for DiscoveredCharacteristic::Properties_t.