Direct-BT
2.3.1
Direct-BT - Direct Bluetooth Programming.
|
BT Core Spec v5.2: Vol 3, Part G GATT: 3.3.3 Characteristic Descriptor. More...
#include <BTGattDesc.hpp>
Public Types | |
enum | Type : uint16_t { CHARACTERISTIC_APPEARANCE = 0x2A01, CHARACTERISTIC_PERIPHERAL_PRIV_FLAG = 0x2A02, CHARACTERISTIC_RECONNECTION_ADDRESS = 0x2A03, CHARACTERISTIC_PERIPHERAL_PREF_CONN = 0x2A04, CHARACTERISTIC_SERVICE_CHANGED = 0x2A05, CHARACTERISTIC_EXTENDED_PROPERTIES = 0x2900, CHARACTERISTIC_USER_DESCRIPTION = 0x2901, CLIENT_CHARACTERISTIC_CONFIGURATION = 0x2902, SERVER_CHARACTERISTIC_CONFIGURATION = 0x2903, CHARACTERISTIC_PRESENTATION_FORMAT = 0x2904, CHARACTERISTIC_AGGREGATE_FORMAT = 0x2905, CUSTOM_CHARACTERISTIC_DESCRIPTION = 0x8888 } |
Following UUID16 GATT profile attribute types are listed under: BT Core Spec v5.2: Vol 3, Part G GATT: 3.4 Summary of GATT Profile Attribute Types. More... | |
Public Member Functions | |
BTGattDesc (const BTGattCharRef &characteristic, std::unique_ptr< const uuid_t > &&type_, const uint16_t handle_) noexcept | |
std::string | get_java_class () const noexcept override |
std::shared_ptr< BTGattChar > | getGattCharUnchecked () const noexcept |
std::shared_ptr< BTGattChar > | getGattCharChecked () const |
std::shared_ptr< BTGattHandler > | getGattHandlerChecked () const |
std::shared_ptr< BTDevice > | getDeviceChecked () const |
virtual std::string | toString () const noexcept override |
bool | isExtendedProperties () const noexcept |
Value is uint16_t bitfield. More... | |
bool | isClientCharConfig () const noexcept |
bool | readValue (int expectedLength=-1) |
BT Core Spec v5.2: Vol 3, Part G GATT: 4.12.1 Read Characteristic Descriptor. More... | |
bool | writeValue () |
BT Core Spec v5.2: Vol 3, Part G GATT: 4.12.3 Write Characteristic Descriptors. More... | |
Public Member Functions inherited from direct_bt::BTObject | |
virtual | ~BTObject () noexcept |
bool | isValid () const noexcept |
Returns whether the object's reference is valid and in a general operational state. More... | |
Public Member Functions inherited from jau::JavaUplink | |
std::string | javaObjectToString () const noexcept |
std::shared_ptr< JavaAnon > | getJavaObject () noexcept |
void | setJavaObject (std::shared_ptr< JavaAnon > objRef) noexcept |
Assigns a new shared JavaAnon reference, replaced item might be deleted via JNI from dtor. More... | |
void | setJavaObject () noexcept |
Resets the shared JavaAnon reference, the replaced item might be deleted via JNI from dtor. More... | |
void | clearJavaObject () noexcept |
Clears the java reference, i.e. More... | |
virtual void | checkValid () const |
Throws an IllegalStateException if isValid() == false. More... | |
virtual | ~JavaUplink () noexcept |
Static Public Member Functions | |
static std::string | java_class () noexcept |
Public Attributes | |
std::unique_ptr< const uuid_t > | type |
Type of descriptor. More... | |
const uint16_t | handle |
Characteristic Descriptor Handle. More... | |
POctets | value |
Static Public Attributes | |
static const uuid16_t | TYPE_EXT_PROP |
static const uuid16_t | TYPE_USER_DESC |
static const uuid16_t | TYPE_CCC_DESC |
Additional Inherited Members | |
Protected Member Functions inherited from direct_bt::BTObject | |
BTObject () noexcept | |
Protected Attributes inherited from direct_bt::BTObject | |
std::atomic_bool | valid |
BT Core Spec v5.2: Vol 3, Part G GATT: 3.3.3 Characteristic Descriptor.
Definition at line 62 of file BTGattDesc.hpp.
enum direct_bt::BTGattDesc::Type : uint16_t |
Following UUID16 GATT profile attribute types are listed under: BT Core Spec v5.2: Vol 3, Part G GATT: 3.4 Summary of GATT Profile Attribute Types.
Definition at line 78 of file BTGattDesc.hpp.
|
inlinenoexcept |
Definition at line 115 of file BTGattDesc.hpp.
|
inlineoverridevirtualnoexcept |
Implements jau::JavaUplink.
Definition at line 119 of file BTGattDesc.hpp.
std::shared_ptr< BTDevice > BTGattDesc::getDeviceChecked | ( | ) | const |
Definition at line 60 of file BTGattDesc.cpp.
std::shared_ptr< BTGattChar > BTGattDesc::getGattCharChecked | ( | ) | const |
|
inlinenoexcept |
Definition at line 126 of file BTGattDesc.hpp.
std::shared_ptr< BTGattHandler > BTGattDesc::getGattHandlerChecked | ( | ) | const |
Definition at line 56 of file BTGattDesc.cpp.
|
inlinenoexcept |
|
inlinenoexcept |
Value is uint16_t bitfield.
Definition at line 134 of file BTGattDesc.hpp.
|
inlinestaticnoexcept |
bool BTGattDesc::readValue | ( | int | expectedLength = -1 | ) |
BT Core Spec v5.2: Vol 3, Part G GATT: 4.12.1 Read Characteristic Descriptor.
BT Core Spec v5.2: Vol 3, Part G GATT: 4.12.2 Read Long Characteristic Descriptor
If expectedLength = 0, then only one ATT_READ_REQ/RSP will be used.
If expectedLength < 0, then long values using multiple ATT_READ_BLOB_REQ/RSP will be used until the response returns zero. This is the default parameter.
If expectedLength > 0, then long values using multiple ATT_READ_BLOB_REQ/RSP will be used if required until the response returns zero.
Convenience delegation call to BTGattHandler via BTDevice If the BTDevice's BTGattHandler is null, i.e. not connected, an IllegalStateException is thrown.
Definition at line 64 of file BTGattDesc.cpp.
|
overridevirtualnoexcept |
Reimplemented from direct_bt::BTObject.
Definition at line 82 of file BTGattDesc.cpp.
bool BTGattDesc::writeValue | ( | ) |
BT Core Spec v5.2: Vol 3, Part G GATT: 4.12.3 Write Characteristic Descriptors.
BT Core Spec v5.2: Vol 3, Part G GATT: 3.3.3 Characteristic Descriptor
BT Core Spec v5.2: Vol 3, Part G GATT: 3.3.3.3 Client Characteristic Configuration
Convenience delegation call to BTGattHandler via BTDevice If the BTDevice's BTGattHandler is null, i.e. not connected, an IllegalStateException is thrown.
Definition at line 73 of file BTGattDesc.cpp.
const uint16_t direct_bt::BTGattDesc::handle |
Characteristic Descriptor Handle.
Attribute handles are unique for each device (server) (BT Core Spec v5.2: Vol 3, Part F Protocol..: 3.2.2 Attribute Handle).
Definition at line 110 of file BTGattDesc.hpp.
std::unique_ptr<const uuid_t> direct_bt::BTGattDesc::type |
|
static |
Definition at line 72 of file BTGattDesc.hpp.
|
static |
Definition at line 70 of file BTGattDesc.hpp.
|
static |
Definition at line 71 of file BTGattDesc.hpp.
POctets direct_bt::BTGattDesc::value |
Definition at line 113 of file BTGattDesc.hpp.