The QLowEnergyCharacteristicData class is used to set up GATT service data. More...
Header: | #include <QLowEnergyCharacteristicData> |
qmake: | QT += bluetooth |
Since: | Qt 5.7 |
QLowEnergyCharacteristicData() | |
QLowEnergyCharacteristicData(const QLowEnergyCharacteristicData &other) | |
~QLowEnergyCharacteristicData() | |
void | addDescriptor(const QLowEnergyDescriptorData &descriptor) |
QList<QLowEnergyDescriptorData> | descriptors() const |
bool | isValid() const |
int | maximumValueLength() const |
int | minimumValueLength() const |
QLowEnergyCharacteristic::PropertyTypes | properties() const |
QBluetooth::AttAccessConstraints | readConstraints() const |
void | setDescriptors(const QList<QLowEnergyDescriptorData> &descriptors) |
void | setProperties(QLowEnergyCharacteristic::PropertyTypes properties) |
void | setReadConstraints(QBluetooth::AttAccessConstraints constraints) |
void | setUuid(const QBluetoothUuid &uuid) |
void | setValue(const QByteArray &value) |
void | setValueLength(int minimum, int maximum) |
void | setWriteConstraints(QBluetooth::AttAccessConstraints constraints) |
void | swap(QLowEnergyCharacteristicData &other) |
QBluetoothUuid | uuid() const |
QByteArray | value() const |
QBluetooth::AttAccessConstraints | writeConstraints() const |
QLowEnergyCharacteristicData & | operator=(const QLowEnergyCharacteristicData &other) |
The QLowEnergyCharacteristicData class is used to set up GATT service data.
An Object of this class provides a characteristic to be added to a QLowEnergyServiceData object via QLowEnergyServiceData::addCharacteristic().
See also QLowEnergyServiceData and QLowEnergyController::addService.
Creates a new invalid object of this class.
Constructs a new object of this class that is a copy of other.
Destroys this object.
Adds descriptor to the list of descriptors of this characteristic, if it is valid.
See also setDescriptors().
Returns the descriptors of this characteristic.
See also setDescriptors().
Returns true if and only if this characteristic is valid, that is, it has a non-null UUID.
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.
Returns the minimum length in bytes that the value of this characteristic can have. The default is zero.
Returns the properties of this characteristic.
See also setProperties().
Returns the constraints needed for a client to read the value of this characteristic. If properties() does not include QLowEnergyCharacteristic::Read, this value is irrelevant. By default, there are no read constraints.
See also setReadConstraints().
Sets the descriptors of this characteristic to descriptors. Only valid descriptors are considered.
See also descriptors() and addDescriptor().
Sets the properties of this characteristic to properties.
See also properties().
Specifies that clients need to fulfill constraints to read the value of this characteristic.
See also readConstraints().
Sets the UUID of this characteristic to uuid.
See also uuid().
Sets the value of this characteristic to value.
See also value().
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.
Specifies that clients need to fulfill constraints to write the value of this characteristic.
See also writeConstraints().
Swaps this object with other.
Returns the UUID of this characteristic.
See also setUuid().
Returns the value of this characteristic.
See also setValue().
Returns the constraints needed for a client to write the value of this characteristic. If properties() does not include either of QLowEnergyCharacteristic::Write, QLowEnergyCharacteristic::WriteNoResponse and QLowEnergyCharacteristic::WriteSigned, this value is irrelevant. By default, there are no write constraints.
See also setWriteConstraints().
Makes this object a copy of other and returns the new value of this object.