PySide6.QtBluetooth.QLowEnergyDescriptor¶
- class QLowEnergyDescriptor¶
- The - QLowEnergyDescriptorclass stores information about the Bluetooth Low Energy descriptor. More…- Synopsis¶- Methods¶- Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Detailed Description¶- QLowEnergyDescriptorprovides 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 - QLowEnergyServiceinstance 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.- __init__()¶
 - Construct a new - QLowEnergyDescriptor. A default-constructed instance of this class is always invalid.- __init__(other)
- Parameters:
- other – - QLowEnergyDescriptor
 
 - Construct a new - QLowEnergyDescriptorthat is a copy of- other.- The two copies continue to share the same underlying data which does not detach upon write. - isValid()¶
- Return type:
- bool 
 
 - Returns - trueif the- QLowEnergyDescriptorobject 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 - QLowEnergyDescriptorinstance 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.- 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 - __ne__(b)¶
- Parameters:
- Return type:
- bool 
 
 - Returns - trueif- ais not equal to- b; otherwise- false.- Two - QLowEnergyDescriptorinstances are considered to be equal if they refer to the same descriptor on the same remote Bluetooth Low Energy device or both instances have been default-constructed.- __eq__(b)¶
- Parameters:
- Return type:
- bool 
 
 - Returns - trueif- ais equal to- b; otherwise- false.- Two - QLowEnergyDescriptorinstances are considered to be equal if they refer to the same descriptor on the same remote Bluetooth Low Energy device or both instances have been default-constructed.- type()¶
- Return type:
 
 - Returns the type of the descriptor. - See also - uuid()¶
- Return type:
 
 - Returns the UUID of this descriptor if - isValid()returns- true; otherwise a null UUID.- value()¶
- Return type:
 
 - Returns the cached value of the descriptor. - The cached descriptor value may be updated using - writeDescriptor()or- readDescriptor().