The QLowEnergyDescriptorData class is used to create GATT service data. 更多...
头: | #include <QLowEnergyDescriptorData> |
qmake: | QT += bluetooth |
QLowEnergyDescriptorData () | |
QLowEnergyDescriptorData (const QBluetoothUuid & uuid , const QByteArray & value ) | |
QLowEnergyDescriptorData (const QLowEnergyDescriptorData & other ) | |
~QLowEnergyDescriptorData () | |
bool | isReadable () const |
bool | isValid () const |
bool | isWritable () const |
QBluetooth::AttAccessConstraints | readConstraints () const |
void | setReadPermissions (bool readable , QBluetooth::AttAccessConstraints constraints = QBluetooth::AttAccessConstraints()) |
void | setUuid (const QBluetoothUuid & uuid ) |
void | setValue (const QByteArray & value ) |
void | setWritePermissions (bool writable , QBluetooth::AttAccessConstraints constraints = QBluetooth::AttAccessConstraints()) |
void | swap (QLowEnergyDescriptorData & other ) |
QBluetoothUuid | uuid () const |
QByteArray | value () const |
QBluetooth::AttAccessConstraints | writeConstraints () const |
QLowEnergyDescriptorData & | operator= (const QLowEnergyDescriptorData & other ) |
bool | operator!= (const QLowEnergyDescriptorData & a , const QLowEnergyDescriptorData & b ) |
bool | operator== (const QLowEnergyDescriptorData & a , const QLowEnergyDescriptorData & b ) |
An object of this class provides a descriptor to be added to a QLowEnergyCharacteristicData object via QLowEnergyCharacteristicData::addDescriptor ().
注意: The member functions related to access permissions are only applicable to those types of descriptors for which the Bluetooth specification does not prescribe if and how their values can be accessed.
另请参阅 QLowEnergyCharacteristicData , QLowEnergyServiceData ,和 QLowEnergyController::addService .
Creates a new invalid object of this class.
Creates a new object of this class with UUID and value being provided by uuid and value ,分别。
Constructs a new object of this class that is a copy of other .
销毁此对象。
返回
true
if the value of this descriptor is readable and
false
否则。
Returns true if and only if this object has a non-null UUID.
返回
true
if the value of this descriptor is writable and
false
否则。
Returns the constraints under which the value of this descriptor can be read. This value is only relevant if
isReadable
() 返回
true
.
Specifies whether the value of this descriptor is readable and if so, under which constraints .
另请参阅 setWritePermissions ().
Sets the UUID of this descriptor to uuid .
另请参阅 uuid ().
Sets the value of this descriptor to value . It will be sent to a peer device exactly the way it is provided here, so callers need to take care of things such as endianness.
另请参阅 value ().
Specifies whether the value of this descriptor is writable and if so, under which constraints .
另请参阅 setReadPermissions ().
Swaps this object with other .
Returns the UUID of this descriptor.
另请参阅 setUuid ().
Returns the value of this descriptor.
另请参阅 setValue ().
Returns the constraints under which the value of this descriptor can be written. This value is only relevant if
isWritable
() 返回
true
.
Makes this object a copy of other and returns the new value of this object.
返回
true
if
a
and
b
are unequal with respect to their public state, otherwise returns
false
.
返回
true
if
a
and
b
are equal with respect to their public state, otherwise returns
false
.