QLowEnergyCharacteristicData#
The QLowEnergyCharacteristicData
class is used to set up GATT service data. More…
Synopsis#
Functions#
def
addDescriptor
(descriptor)def
descriptors
()def
isValid
()def
maximumValueLength
()def
minimumValueLength
()def
__ne__
(b)def
__eq__
(b)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
()
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 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
Returns true
if a
and b
are not equal with respect to their public state, otherwise returns false
.
- PySide6.QtBluetooth.QLowEnergyCharacteristicData.__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.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