QLowEnergyDescriptorData#
The QLowEnergyDescriptorData
class is used to create GATT service data. More…
Synopsis#
Functions#
def
isReadable
()def
isValid
()def
isWritable
()def
__ne__
(b)def
__eq__
(b)def
readConstraints
()def
setReadPermissions
(readable[, constraints=QBluetooth.AttAccessConstraints()])def
setUuid
(uuid)def
setValue
(value)def
setWritePermissions
(writable[, constraints=QBluetooth.AttAccessConstraints()])def
swap
(other)def
uuid
()def
value
()def
writeConstraints
()
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 QLowEnergyCharacteristicData
object 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.
- class PySide6.QtBluetooth.QLowEnergyDescriptorData#
PySide6.QtBluetooth.QLowEnergyDescriptorData(uuid, value)
PySide6.QtBluetooth.QLowEnergyDescriptorData(other)
- Parameters:
Creates a new invalid object of this class.
Creates a new object of this class with UUID and value being provided by uuid
and value
, respectively.
Constructs a new object of this class that is a copy of other
.
- PySide6.QtBluetooth.QLowEnergyDescriptorData.isReadable()#
- Return type:
bool
Returns true
if the value of this descriptor is readable and false
otherwise.
- PySide6.QtBluetooth.QLowEnergyDescriptorData.isValid()#
- Return type:
bool
Returns true if and only if this object has a non-null UUID.
- PySide6.QtBluetooth.QLowEnergyDescriptorData.isWritable()#
- Return type:
bool
Returns true
if the value of this descriptor is writable and false
otherwise.
- PySide6.QtBluetooth.QLowEnergyDescriptorData.__ne__(b)#
- Parameters:
- Return type:
bool
Returns true
if a
and b
are unequal with respect to their public state, otherwise returns false
.
- PySide6.QtBluetooth.QLowEnergyDescriptorData.__eq__(b)#
- Parameters:
- Return type:
bool
Returns true
if a
and b
are equal with respect to their public state, otherwise returns false
.
- PySide6.QtBluetooth.QLowEnergyDescriptorData.readConstraints()#
- Return type:
Combination of
QBluetooth.AttAccessConstraint
Returns the constraints under which the value of this descriptor can be read. This value is only relevant if isReadable()
returns true
.
- PySide6.QtBluetooth.QLowEnergyDescriptorData.setReadPermissions(readable[, constraints=QBluetooth.AttAccessConstraints()])#
- Parameters:
readable – bool
constraints – Combination of
QBluetooth.AttAccessConstraint
Specifies whether the value of this descriptor is readable
and if so, under which constraints
.
See also
- PySide6.QtBluetooth.QLowEnergyDescriptorData.setUuid(uuid)#
- Parameters:
Sets the UUID of this descriptor to uuid
.
See also
- PySide6.QtBluetooth.QLowEnergyDescriptorData.setValue(value)#
- Parameters:
value –
PySide6.QtCore.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
- PySide6.QtBluetooth.QLowEnergyDescriptorData.setWritePermissions(writable[, constraints=QBluetooth.AttAccessConstraints()])#
- Parameters:
writable – bool
constraints – Combination of
QBluetooth.AttAccessConstraint
Specifies whether the value of this descriptor is writable
and if so, under which constraints
.
See also
- PySide6.QtBluetooth.QLowEnergyDescriptorData.swap(other)#
- Parameters:
Swaps this object with other
.
- PySide6.QtBluetooth.QLowEnergyDescriptorData.uuid()#
- Return type:
Returns the UUID of this descriptor.
See also
- PySide6.QtBluetooth.QLowEnergyDescriptorData.value()#
- Return type:
Returns the value of this descriptor.
See also
- PySide6.QtBluetooth.QLowEnergyDescriptorData.writeConstraints()#
- Return type:
Combination of
QBluetooth.AttAccessConstraint
Returns the constraints under which the value of this descriptor can be written. This value is only relevant if isWritable()
returns true
.