In questa pagina

QMqttLastWillProperties Class

La classe QMqttLastWillProperties rappresenta le opzioni di configurazione che un " QMqttClient " può trasmettere al server quando specifica le ultime volontà durante la connessione a un server. Per saperne di più...

Intestazione: #include <QMqttLastWillProperties>
CMake: find_package(Qt6 REQUIRED COMPONENTS Mqtt)
target_link_libraries(mytarget PRIVATE Qt6::Mqtt)
qmake: QT += mqtt

Funzioni pubbliche

QString contentType() const
QByteArray correlationData() const
quint32 messageExpiryInterval() const
QMqtt::PayloadFormatIndicator payloadFormatIndicator() const
QString responseTopic() const
void setContentType(const QString &content)
void setCorrelationData(const QByteArray &correlation)
void setMessageExpiryInterval(quint32 expiry)
void setPayloadFormatIndicator(QMqtt::PayloadFormatIndicator p)
void setResponseTopic(const QString &response)
void setUserProperties(const QMqttUserProperties &properties)
void setWillDelayInterval(quint32 delay)
QMqttUserProperties userProperties() const
quint32 willDelayInterval() const

Descrizione dettagliata

Nota: le proprietàLast Will 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 dei membri

QString QMqttLastWillProperties::contentType() const

Restituisce il tipo di contenuto dell'ultimo messaggio di testamento.

Vedi anche setContentType().

QByteArray QMqttLastWillProperties::correlationData() const

Restituisce i dati di correlazione che identificano la richiesta.

Vedi anche setCorrelationData().

quint32 QMqttLastWillProperties::messageExpiryInterval() const

Restituisce la durata del messaggio dell’ultima volontà in secondi, a partire dall’intervallo di ritardo della volontà.

Vedi anche setMessageExpiryInterval().

QMqtt::PayloadFormatIndicator QMqttLastWillProperties::payloadFormatIndicator() const

Restituisce l'indicatore del formato del payload.

Vedi anche setPayloadFormatIndicator().

QString QMqttLastWillProperties::responseTopic() const

Restituisce l'argomento a cui devono rispondere gli iscritti al messaggio "last will".

Vedi anche setResponseTopic().

void QMqttLastWillProperties::setContentType(const QString &content)

Imposta il tipo di contenuto su content.

Vedi anche contentType().

void QMqttLastWillProperties::setCorrelationData(const QByteArray &correlation)

Imposta i dati di correlazione su correlation.

Vedi anche correlationData().

void QMqttLastWillProperties::setMessageExpiryInterval(quint32 expiry)

Imposta l'intervallo di scadenza dei messaggi su expiry.

Vedi anche messageExpiryInterval().

void QMqttLastWillProperties::setPayloadFormatIndicator(QMqtt::PayloadFormatIndicator p)

Imposta l'indicatore del formato del payload su p.

Vedi anche ` payloadFormatIndicator()`.

void QMqttLastWillProperties::setResponseTopic(const QString &response)

Imposta l'argomento di risposta su response.

Vedi anche responseTopic().

void QMqttLastWillProperties::setUserProperties(const QMqttUserProperties &properties)

Imposta le proprietà dell'utente su properties.

Vedi anche userProperties().

void QMqttLastWillProperties::setWillDelayInterval(quint32 delay)

Imposta l'intervallo di ritardo su delay.

Vedi anche willDelayInterval().

QMqttUserProperties QMqttLastWillProperties::userProperties() const

Restituisce le proprietà dell'utente.

Vedi anche setUserProperties().

quint32 QMqttLastWillProperties::willDelayInterval() const

Restituisce il ritardo, espresso in secondi, con cui verrà inviato un messaggio di "last will" dopo la disconnessione dal server.

Vedi anche setWillDelayInterval().

© 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.