QMqttSubscriptionProperties Class
La classe QMqttSubscriptionProperties rappresenta le opzioni di configurazione che un’ QMqttClient e può trasmettere al server al momento della sottoscrizione a un filtro di argomento. Per saperne di più...
| Intestazione: | #include <QMqttSubscriptionProperties> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Mqtt) target_link_libraries(mytarget PRIVATE Qt6::Mqtt) |
| qmake: | QT += mqtt |
Funzioni pubbliche
(since 6.4) bool | noLocal() const |
(since 6.4) void | setNoLocal(bool noloc) |
| void | setSubscriptionIdentifier(quint32 id) |
| void | setUserProperties(const QMqttUserProperties &user) |
| quint32 | subscriptionIdentifier() const |
| QMqttUserProperties | userProperties() const |
Descrizione dettagliata
Nota: le proprietàdi sottoscrizione fanno parte della specifica MQTT 5.0 e non possono essere utilizzate quando ci si connette con un livello di protocollo inferiore. Per ulteriori informazioni, consultare QMqttClient::ProtocolVersion.
Documentazione delle funzioni membro
[since 6.4] bool QMqttSubscriptionProperties::noLocal() const
Restituisce true se l'abbonamento non deve ricevere messaggi locali sullo stesso argomento.
Questa funzione è stata introdotta in Qt 6.4.
Vedi anche setNoLocal().
[since 6.4] void QMqttSubscriptionProperties::setNoLocal(bool noloc)
Imposta l'opzione di sottoscrizione in modo da non ricevere messaggi locali. Quando un client pubblica un messaggio con lo stesso argomento di una sottoscrizione locale esistente, il server, per impostazione predefinita, rinvia il messaggio al client. Se l'opzione " noloc " è impostata su "true", il broker non invierà alcun messaggio pubblicato dallo stesso client.
Questa funzione è stata introdotta in Qt 6.4.
Vedi anche noLocal().
void QMqttSubscriptionProperties::setSubscriptionIdentifier(quint32 id)
Imposta l'identificatore dell'abbonamento su id.
Vedi anche subscriptionIdentifier().
void QMqttSubscriptionProperties::setUserProperties(const QMqttUserProperties &user)
Imposta le proprietà dell'utente su user.
Vedi anche userProperties().
quint32 QMqttSubscriptionProperties::subscriptionIdentifier() const
Restituisce l'identificatore dell'abbonamento utilizzato per descrivere questo abbonamento.
Vedi anche setSubscriptionIdentifier().
QMqttUserProperties QMqttSubscriptionProperties::userProperties() const
Restituisce le proprietà specificate dall'utente.
Vedi anche setUserProperties().
© 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.