QLowEnergyDescriptor¶
The QLowEnergyDescriptor
class stores information about the Bluetooth Low Energy descriptor. More…
Synopsis¶
Functions¶
Detailed Description¶
QLowEnergyDescriptor
provides information about a Bluetooth Low Energy descriptor’s name()
, uuid()
, and value()
. Descriptors are encapsulated by Bluetooth Low Energy characteristics and provide additional contextual information about the characteristic (data format, notification activation and so on).
The descriptor value may be written via the QLowEnergyService
instance that manages the service to which this descriptor belongs. The writeDescriptor()
function writes the new value. The descriptorWritten()
signal is emitted upon success. The cached value()
of this object is updated accordingly.
- class PySide6.QtBluetooth.QLowEnergyDescriptor¶
PySide6.QtBluetooth.QLowEnergyDescriptor(other)
- Parameters
Construct a new QLowEnergyDescriptor
. A default-constructed instance of this class is always invalid.
Construct a new QLowEnergyDescriptor
that is a copy of other
.
The two copies continue to share the same underlying data which does not detach upon write.
- PySide6.QtBluetooth.QLowEnergyDescriptor.isValid()¶
- Return type
bool
Returns true
if the QLowEnergyDescriptor
object is valid, otherwise returns false
.
An invalid descriptor instance is not associated with any service (default-constructed) or the associated service is no longer valid due to a disconnect from the underlying Bluetooth Low Energy device, for example. Once the object is invalid it cannot become valid anymore.
Note
If a QLowEnergyDescriptor
instance turns invalid due to a disconnect from the underlying device, the information encapsulated by the current instance remains as it was at the time of the disconnect. Therefore it can be retrieved after the disconnect event.
- PySide6.QtBluetooth.QLowEnergyDescriptor.name()¶
- Return type
str
Returns the human-readable name of the descriptor.
The name is based on the descriptor’s type()
. The complete list of descriptor types can be found under Bluetooth.org Descriptors .
The returned string is empty if the type()
is unknown.
See also
- PySide6.QtBluetooth.QLowEnergyDescriptor.__ne__(b)¶
- Parameters
- Return type
bool
- PySide6.QtBluetooth.QLowEnergyDescriptor.__eq__(b)¶
- Parameters
- Return type
bool
- PySide6.QtBluetooth.QLowEnergyDescriptor.type()¶
- Return type
Returns the type of the descriptor.
See also
- PySide6.QtBluetooth.QLowEnergyDescriptor.uuid()¶
- Return type
Returns the UUID of this descriptor if isValid()
returns true
; otherwise a null
UUID.
- PySide6.QtBluetooth.QLowEnergyDescriptor.value()¶
- Return type
Returns the cached value of the descriptor.
The cached descriptor value may be updated using writeDescriptor()
or readDescriptor()
.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.