Direct-BT
2.3.1
Direct-BT - Direct Bluetooth Programming.
|
Go to the documentation of this file.
49 std::shared_ptr<BTGattChar> ref = wbr_char.lock();
50 if(
nullptr == ref ) {
57 return getGattCharChecked()->getGattHandlerChecked();
61 return getGattCharChecked()->getDeviceChecked();
65 std::shared_ptr<BTDevice> device = getDeviceChecked();
67 if(
nullptr == gatt ) {
74 std::shared_ptr<BTDevice> device = getDeviceChecked();
76 if(
nullptr == gatt ) {
83 return "[type 0x"+type->toString()+
", handle "+
to_hexstring(handle)+
", value["+value.toString()+
"] ]";
86 std::string BTGattDesc::toShortString() const noexcept {
87 return "[handle "+
to_hexstring(handle)+
", value["+value.toString()+
"] ]";
bool writeDescriptorValue(const BTGattDesc &cd)
BT Core Spec v5.2: Vol 3, Part G GATT: 4.12.3 Write Characteristic Descriptors.
static const uuid16_t TYPE_EXT_PROP
@ CHARACTERISTIC_EXTENDED_PROPERTIES
bool readDescriptorValue(BTGattDesc &cd, int expectedLength=-1)
BT Core Spec v5.2: Vol 3, Part G GATT: 4.12.1 Read Characteristic Descriptor.
virtual std::string toString() const noexcept override
@ CHARACTERISTIC_USER_DESCRIPTION
bool writeValue()
BT Core Spec v5.2: Vol 3, Part G GATT: 4.12.3 Write Characteristic Descriptors.
std::shared_ptr< BTGattChar > getGattCharChecked() const
static const uuid16_t TYPE_USER_DESC
bool readValue(int expectedLength=-1)
BT Core Spec v5.2: Vol 3, Part G GATT: 4.12.1 Read Characteristic Descriptor.
static const uuid16_t TYPE_CCC_DESC
std::shared_ptr< BTDevice > getDeviceChecked() const
@ CLIENT_CHARACTERISTIC_CONFIGURATION
std::string to_hexstring(value_type const &v) noexcept
Produce a lower-case hexadecimal string representation of the given pointer.
std::shared_ptr< BTGattHandler > getGattHandler() noexcept
Returns the connected GATTHandler or nullptr, see connectGATT(), getGattService() and disconnect().
std::shared_ptr< BTGattHandler > getGattHandlerChecked() const