QLowEnergyCharacteristicData¶
The QLowEnergyCharacteristicData
class is used to set up GATT service data. More…
Synopsis¶
Functions¶
def
__eq__
(b)def
__ne__
(b)def
addDescriptor
(descriptor)def
descriptors
()def
isValid
()def
maximumValueLength
()def
minimumValueLength
()def
properties
()def
readConstraints
()def
setDescriptors
(descriptors)def
setProperties
(properties)def
setReadConstraints
(constraints)def
setUuid
(uuid)def
setValue
(value)def
setValueLength
(minimum, maximum)def
setWriteConstraints
(constraints)def
swap
(other)def
uuid
()def
value
()def
writeConstraints
()
Detailed Description¶
An Object of this class provides a characteristic to be added to a QLowEnergyServiceData
object via addCharacteristic()
.
See also
- class PySide6.QtBluetooth.QLowEnergyCharacteristicData¶
PySide6.QtBluetooth.QLowEnergyCharacteristicData(other)
- Parameters
Creates a new invalid object of this class.
Constructs a new object of this class that is a copy of other
.
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.addDescriptor(descriptor)¶
- Parameters
descriptor –
PySide6.QtBluetooth.QLowEnergyDescriptorData
Adds descriptor
to the list of descriptors of this characteristic, if it is valid.
See also
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.descriptors()¶
- Return type
Returns the descriptors of this characteristic.
See also
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.isValid()¶
- Return type
bool
Returns true if and only if this characteristic is valid, that is, it has a non-null UUID.
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.maximumValueLength()¶
- Return type
int
Returns the maximum length in bytes that the value of this characteristic can have. By default, there is no limit beyond the constraints of the data type.
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.minimumValueLength()¶
- Return type
int
Returns the minimum length in bytes that the value of this characteristic can have. The default is zero.
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.__ne__(b)¶
- Parameters
- Return type
bool
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.__eq__(b)¶
- Parameters
- Return type
bool
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.properties()¶
- Return type
PropertyTypes
Returns the properties of this characteristic.
See also
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.readConstraints()¶
- Return type
AttAccessConstraints
Returns the constraints needed for a client to read the value of this characteristic. If properties()
does not include Read
, this value is irrelevant. By default, there are no read constraints.
See also
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.setDescriptors(descriptors)¶
- Parameters
descriptors –
Sets the descriptors of this characteristic to descriptors
. Only valid descriptors are considered.
See also
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.setProperties(properties)¶
- Parameters
properties –
PropertyTypes
Sets the properties of this characteristic to properties
.
See also
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.setReadConstraints(constraints)¶
- Parameters
constraints –
AttAccessConstraints
Specifies that clients need to fulfill constraints
to read the value of this characteristic.
See also
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.setUuid(uuid)¶
- Parameters
Sets the UUID of this characteristic to uuid
.
See also
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.setValue(value)¶
- Parameters
value –
PySide6.QtCore.QByteArray
Sets the value of this characteristic to value
.
See also
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.setValueLength(minimum, maximum)¶
- Parameters
minimum – int
maximum – int
Specifies minimum
and maximum
to be the smallest and largest length, respectively, that the value of this characteristic can have. The unit is bytes. If minimum
and maximum
are equal, the characteristic has a fixed-length value.
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.setWriteConstraints(constraints)¶
- Parameters
constraints –
AttAccessConstraints
Specifies that clients need to fulfill constraints
to write the value of this characteristic.
See also
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.swap(other)¶
- Parameters
Swaps this object with other
.
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.uuid()¶
- Return type
Returns the UUID of this characteristic.
See also
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.value()¶
- Return type
Returns the value of this characteristic.
See also
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.writeConstraints()¶
- Return type
AttAccessConstraints
Returns the constraints needed for a client to write the value of this characteristic. If properties()
does not include either of Write
, WriteNoResponse
and WriteSigned
, this value is irrelevant. By default, there are no write constraints.
See also
© 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.