QLowEnergyDescriptorData Class
La classe QLowEnergyDescriptorData viene utilizzata per creare dati relativi ai servizi GATT. Per saperne di più...
| Intestazione: | #include <QLowEnergyDescriptorData> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Bluetooth) target_link_libraries(mytarget PRIVATE Qt6::Bluetooth) |
| qmake: | QT += bluetooth |
- Elenco di tutti i membri, compresi quelli ereditati
- QLowEnergyDescriptorData fa parte delle classi condivise implicitamente.
Funzioni pubbliche
| 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) |
Elementi non membri correlati
| bool | operator!=(const QLowEnergyDescriptorData &a, const QLowEnergyDescriptorData &b) |
| bool | operator==(const QLowEnergyDescriptorData &a, const QLowEnergyDescriptorData &b) |
Descrizione dettagliata
Un oggetto di questa classe fornisce un descrittore da aggiungere a un oggetto ` QLowEnergyCharacteristicData ` tramite ` QLowEnergyCharacteristicData::addDescriptor()`.
Nota: Le funzioni membro relative ai permessi di accesso sono applicabili solo a quei tipi di descrittori per i quali la specifica Bluetooth non prescrive se e come sia possibile accedere ai loro valori.
Vedi anche QLowEnergyCharacteristicData, QLowEnergyServiceData e QLowEnergyController::addService.
Documentazione delle funzioni membro
QLowEnergyDescriptorData::QLowEnergyDescriptorData()
Crea un nuovo oggetto non valido di questa classe.
QLowEnergyDescriptorData::QLowEnergyDescriptorData(const QBluetoothUuid &uuid, const QByteArray &value)
Crea un nuovo oggetto di questa classe con UUID e valore forniti rispettivamente da uuid e value.
QLowEnergyDescriptorData::QLowEnergyDescriptorData(const QLowEnergyDescriptorData &other)
Crea un nuovo oggetto di questa classe che è una copia di other.
[noexcept] QLowEnergyDescriptorData::~QLowEnergyDescriptorData()
Elimina questo oggetto.
bool QLowEnergyDescriptorData::isReadable() const
Restituisce ` true ` se il valore di questo descrittore è leggibile e ` false ` in caso contrario.
bool QLowEnergyDescriptorData::isValid() const
Restituisce true se e solo se questo oggetto ha un UUID non nullo.
bool QLowEnergyDescriptorData::isWritable() const
Restituisce ` true ` se il valore di questo descrittore è scrivibile e ` false ` in caso contrario.
QBluetooth::AttAccessConstraints QLowEnergyDescriptorData::readConstraints() const
Restituisce i vincoli in base ai quali è possibile leggere il valore di questo descrittore. Questo valore è rilevante solo se la funzione ` isReadable()` restituisce ` true`.
void QLowEnergyDescriptorData::setReadPermissions(bool readable, QBluetooth::AttAccessConstraints constraints = QBluetooth::AttAccessConstraints())
Specifica se il valore di questo descrittore è “ readable ” e, in tal caso, in base a quale constraints.
Vedi anche setWritePermissions().
void QLowEnergyDescriptorData::setUuid(const QBluetoothUuid &uuid)
Imposta l'UUID di questo descrittore su uuid.
Vedi anche uuid().
void QLowEnergyDescriptorData::setValue(const QByteArray &value)
Imposta il valore di questo descrittore su value. Verrà inviato a un dispositivo peer esattamente così come è specificato qui, pertanto chi effettua la chiamata deve prestare attenzione ad aspetti quali l’endianness.
Vedi anche value().
void QLowEnergyDescriptorData::setWritePermissions(bool writable, QBluetooth::AttAccessConstraints constraints = QBluetooth::AttAccessConstraints())
Specifica se il valore di questo descrittore è “ writable ” e, in tal caso, in quale “ constraints ”.
Vedi anche setReadPermissions().
[noexcept] void QLowEnergyDescriptorData::swap(QLowEnergyDescriptorData &other)
Scambia questo oggetto con other.
QBluetoothUuid QLowEnergyDescriptorData::uuid() const
Restituisce l'UUID di questo descrittore.
Vedi anche setUuid().
QByteArray QLowEnergyDescriptorData::value() const
Restituisce il valore di questo descrittore.
Vedi anche setValue().
QBluetooth::AttAccessConstraints QLowEnergyDescriptorData::writeConstraints() const
Restituisce i vincoli in base ai quali è possibile scrivere il valore di questo descrittore. Questo valore è rilevante solo se la funzione ` isWritable()` restituisce ` true`.
QLowEnergyDescriptorData &QLowEnergyDescriptorData::operator=(const QLowEnergyDescriptorData &other)
Crea una copia di other e restituisce il nuovo valore di questo oggetto.
Elementi correlati non membri
bool operator!=(const QLowEnergyDescriptorData &a, const QLowEnergyDescriptorData &b)
Restituisce ` true ` se ` a ` e ` b ` sono disuguali rispetto al loro stato pubblico, altrimenti restituisce ` false`.
bool operator==(const QLowEnergyDescriptorData &a, const QLowEnergyDescriptorData &b)
Restituisce ` true ` se ` a ` e ` b ` sono uguali in base al loro stato pubblico, altrimenti restituisce ` false`.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.