QLowEnergyCharacteristicData

The QLowEnergyCharacteristicData class is used to set up GATT service data. More

Inheritance diagram of PySide6.QtBluetooth.QLowEnergyCharacteristicData

Synopsis

Functions

Detailed Description

An Object of this class provides a characteristic to be added to a QLowEnergyServiceData object via addCharacteristic() .

class PySide6.QtBluetooth.QLowEnergyCharacteristicData

PySide6.QtBluetooth.QLowEnergyCharacteristicData(other)

Parameters

otherPySide6.QtBluetooth.QLowEnergyCharacteristicData

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

descriptorPySide6.QtBluetooth.QLowEnergyDescriptorData

Adds descriptor to the list of descriptors of this characteristic, if it is valid.

See also

setDescriptors()

PySide6.QtBluetooth.QLowEnergyCharacteristicData.descriptors()
Return type

Returns the descriptors of this characteristic.

See also

setDescriptors()

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

bPySide6.QtBluetooth.QLowEnergyCharacteristicData

Return type

bool

PySide6.QtBluetooth.QLowEnergyCharacteristicData.__eq__(b)
Parameters

bPySide6.QtBluetooth.QLowEnergyCharacteristicData

Return type

bool

PySide6.QtBluetooth.QLowEnergyCharacteristicData.properties()
Return type

PropertyTypes

Returns the properties of this characteristic.

See also

setProperties()

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.

PySide6.QtBluetooth.QLowEnergyCharacteristicData.setDescriptors(descriptors)
Parameters

descriptors

Sets the descriptors of this characteristic to descriptors. Only valid descriptors are considered.

PySide6.QtBluetooth.QLowEnergyCharacteristicData.setProperties(properties)
Parameters

propertiesPropertyTypes

Sets the properties of this characteristic to properties.

See also

properties()

PySide6.QtBluetooth.QLowEnergyCharacteristicData.setReadConstraints(constraints)
Parameters

constraintsAttAccessConstraints

Specifies that clients need to fulfill constraints to read the value of this characteristic.

PySide6.QtBluetooth.QLowEnergyCharacteristicData.setUuid(uuid)
Parameters

uuidPySide6.QtBluetooth.QBluetoothUuid

Sets the UUID of this characteristic to uuid.

See also

uuid()

PySide6.QtBluetooth.QLowEnergyCharacteristicData.setValue(value)
Parameters

valuePySide6.QtCore.QByteArray

Sets the value of this characteristic to value.

See also

value()

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

constraintsAttAccessConstraints

Specifies that clients need to fulfill constraints to write the value of this characteristic.

PySide6.QtBluetooth.QLowEnergyCharacteristicData.swap(other)
Parameters

otherPySide6.QtBluetooth.QLowEnergyCharacteristicData

Swaps this object with other.

PySide6.QtBluetooth.QLowEnergyCharacteristicData.uuid()
Return type

PySide6.QtBluetooth.QBluetoothUuid

Returns the UUID of this characteristic.

See also

setUuid()

PySide6.QtBluetooth.QLowEnergyCharacteristicData.value()
Return type

PySide6.QtCore.QByteArray

Returns the value of this characteristic.

See also

setValue()

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.