PySide6.QtBluetooth.QLowEnergyDescriptorData¶
- class QLowEnergyDescriptorData¶
- The - QLowEnergyDescriptorDataclass is used to create GATT service data. More…- Synopsis¶- Methods¶- def - __init__()
- def - isReadable()
- def - isValid()
- def - isWritable()
- def - __ne__()
- def - __eq__()
- def - setUuid()
- def - setValue()
- def - swap()
- def - uuid()
- def - value()
 - 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¶- An object of this class provides a descriptor to be added to a - QLowEnergyCharacteristicDataobject via- addDescriptor().- Note - The member functions related to access permissions are only applicable to those types of descriptors for which the Bluetooth specification does not prescribe if and how their values can be accessed. - __init__()¶
 - Creates a new invalid object of this class. - __init__(other)
- Parameters:
- other – - QLowEnergyDescriptorData
 
 - Constructs a new object of this class that is a copy of - other.- __init__(uuid, value)
- Parameters:
- uuid – - QBluetoothUuid
- value – - QByteArray
 
 
 - Creates a new object of this class with UUID and value being provided by - uuidand- value, respectively.- isReadable()¶
- Return type:
- bool 
 
 - Returns - trueif the value of this descriptor is readable and- falseotherwise.- isValid()¶
- Return type:
- bool 
 
 - Returns true if and only if this object has a non-null UUID. - isWritable()¶
- Return type:
- bool 
 
 - Returns - trueif the value of this descriptor is writable and- falseotherwise.- __ne__(b)¶
- Parameters:
- Return type:
- bool 
 
 - Returns - trueif- aand- bare unequal with respect to their public state, otherwise returns- false.- __eq__(b)¶
- Parameters:
- Return type:
- bool 
 
 - Returns - trueif- aand- bare equal with respect to their public state, otherwise returns- false.- readConstraints()¶
- Return type:
- Combination of - AttAccessConstraint
 
 - Returns the constraints under which the value of this descriptor can be read. This value is only relevant if - isReadable()returns- true.- setReadPermissions(readable[, constraints=QBluetooth.AttAccessConstraints()])¶
- Parameters:
- readable – bool 
- constraints – Combination of - AttAccessConstraint
 
 
 - Specifies whether the value of this descriptor is - readableand if so, under which- constraints.- See also - setUuid(uuid)¶
- Parameters:
- uuid – - QBluetoothUuid
 
 - Sets the UUID of this descriptor to - uuid.- See also - setValue(value)¶
- Parameters:
- value – - QByteArray
 
 - Sets the value of this descriptor to - value. It will be sent to a peer device exactly the way it is provided here, so callers need to take care of things such as endianness.- See also - setWritePermissions(writable[, constraints=QBluetooth.AttAccessConstraints()])¶
- Parameters:
- writable – bool 
- constraints – Combination of - AttAccessConstraint
 
 
 - Specifies whether the value of this descriptor is - writableand if so, under which- constraints.- See also - swap(other)¶
- Parameters:
- other – - QLowEnergyDescriptorData
 
 - Swaps this object with - other.- uuid()¶
- Return type:
 
 - Returns the UUID of this descriptor. - See also - value()¶
- Return type:
 
 - Returns the value of this descriptor. - See also - writeConstraints()¶
- Return type:
- Combination of - AttAccessConstraint
 
 - Returns the constraints under which the value of this descriptor can be written. This value is only relevant if - isWritable()returns- true.