PySide6.QtBluetooth.QLowEnergyCharacteristicData¶
- class QLowEnergyCharacteristicData¶
The
QLowEnergyCharacteristicData
class is used to set up GATT service data. More…Synopsis¶
Methods¶
def
__init__()
def
addDescriptor()
def
descriptors()
def
isValid()
def
__ne__()
def
__eq__()
def
properties()
def
setDescriptors()
def
setProperties()
def
setUuid()
def
setValue()
def
setValueLength()
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 characteristic to be added to a
QLowEnergyServiceData
object viaaddCharacteristic()
.See also
- __init__()¶
Creates a new invalid object of this class.
- __init__(other)
- Parameters:
other –
QLowEnergyCharacteristicData
Constructs a new object of this class that is a copy of
other
.- addDescriptor(descriptor)¶
- Parameters:
descriptor –
QLowEnergyDescriptorData
Adds
descriptor
to the list of descriptors of this characteristic, if it is valid.See also
- descriptors()¶
- Return type:
.list of QLowEnergyDescriptorData
Returns the descriptors of this characteristic.
See also
- isValid()¶
- Return type:
bool
Returns true if and only if this characteristic is valid, that is, it has a non-null UUID.
- 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.
- minimumValueLength()¶
- Return type:
int
Returns the minimum length in bytes that the value of this characteristic can have. The default is zero.
- __ne__(b)¶
- Parameters:
- Return type:
bool
Returns
true
ifa
andb
are not equal with respect to their public state, otherwise returnsfalse
.- __eq__(b)¶
- Parameters:
- Return type:
bool
Returns
true
ifa
andb
are equal with respect to their public state, otherwise returnsfalse
.- properties()¶
- Return type:
Combination of
PropertyType
Returns the properties of this characteristic.
See also
- readConstraints()¶
- Return type:
Combination of
AttAccessConstraint
Returns the constraints needed for a client to read the value of this characteristic. If
properties()
does not includeRead
, this value is irrelevant. By default, there are no read constraints.See also
- setDescriptors(descriptors)¶
- Parameters:
descriptors – .list of QLowEnergyDescriptorData
Sets the descriptors of this characteristic to
descriptors
. Only valid descriptors are considered.See also
- setProperties(properties)¶
- Parameters:
properties – Combination of
PropertyType
Sets the properties of this characteristic to
properties
.See also
- setReadConstraints(constraints)¶
- Parameters:
constraints – Combination of
AttAccessConstraint
Specifies that clients need to fulfill
constraints
to read the value of this characteristic.See also
- setUuid(uuid)¶
- Parameters:
uuid –
QBluetoothUuid
Sets the UUID of this characteristic to
uuid
.See also
- setValue(value)¶
- Parameters:
value –
QByteArray
Sets the value of this characteristic to
value
.See also
- setValueLength(minimum, maximum)¶
- Parameters:
minimum – int
maximum – int
Specifies
minimum
andmaximum
to be the smallest and largest length, respectively, that the value of this characteristic can have. The unit is bytes. Ifminimum
andmaximum
are equal, the characteristic has a fixed-length value.- setWriteConstraints(constraints)¶
- Parameters:
constraints – Combination of
AttAccessConstraint
Specifies that clients need to fulfill
constraints
to write the value of this characteristic.See also
- swap(other)¶
- Parameters:
other –
QLowEnergyCharacteristicData
Swaps this object with
other
.- uuid()¶
- Return type:
Returns the UUID of this characteristic.
See also
- value()¶
- Return type:
Returns the value of this characteristic.
See also
- writeConstraints()¶
- Return type:
Combination of
AttAccessConstraint
Returns the constraints needed for a client to write the value of this characteristic. If
properties()
does not include either ofWrite
,WriteNoResponse
andWriteSigned
, this value is irrelevant. By default, there are no write constraints.See also