QMqttLastWillProperties Class
Die Klasse „QMqttLastWillProperties“ repräsentiert Konfigurationsoptionen, die ein „ QMqttClient “ bei der Verbindung mit einem Server an diesen übermitteln kann, wenn der „Last Will“ festgelegt wird. Mehr...
| Header: | #include <QMqttLastWillProperties> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Mqtt) target_link_libraries(mytarget PRIVATE Qt6::Mqtt) |
| qmake: | QT += mqtt |
Öffentliche Funktionen
| 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 |
Ausführliche Beschreibung
Hinweis: „Last Will“-Eigenschaften sind Teil der MQTT 5.0-Spezifikation und können bei einer Verbindung mit einer niedrigeren Protokollebene nicht verwendet werden. Weitere Informationen finden Sie unter QMqttClient::ProtocolVersion.
Dokumentation der Mitgliedsfunktionen
QString QMqttLastWillProperties::contentType() const
Gibt den Inhaltstyp der letzten Willensbekundung zurück.
Siehe auch „ setContentType()“.
QByteArray QMqttLastWillProperties::correlationData() const
Gibt die Korrelationsdaten zurück, anhand derer die Anfrage identifiziert werden kann.
Siehe auch setCorrelationData().
quint32 QMqttLastWillProperties::messageExpiryInterval() const
Gibt die Lebensdauer der letzten Will-Nachricht in Sekunden zurück, gerechnet ab dem Will-Verzögerungsintervall.
Siehe auch „ setMessageExpiryInterval()“.
QMqtt::PayloadFormatIndicator QMqttLastWillProperties::payloadFormatIndicator() const
Gibt den Indikator für das Payload-Format zurück.
Siehe auch „ setPayloadFormatIndicator()“.
QString QMqttLastWillProperties::responseTopic() const
Gibt das Thema zurück, auf das Abonnenten der „Last Will“-Nachricht antworten sollen.
Siehe auch „ setResponseTopic()“.
void QMqttLastWillProperties::setContentType(const QString &content)
Legt den Inhaltstyp auf „ content “ fest.
Siehe auch contentType().
void QMqttLastWillProperties::setCorrelationData(const QByteArray &correlation)
Setzt die Korrelationsdaten auf „ correlation “.
Siehe auch correlationData().
void QMqttLastWillProperties::setMessageExpiryInterval(quint32 expiry)
Legt das Ablaufintervall für Nachrichten auf „ expiry “ fest.
Siehe auch messageExpiryInterval().
void QMqttLastWillProperties::setPayloadFormatIndicator(QMqtt::PayloadFormatIndicator p)
Setzt den Indikator für das Nutzdatenformat auf „ p “.
Siehe auch ` payloadFormatIndicator()`.
void QMqttLastWillProperties::setResponseTopic(const QString &response)
Legt das Antwortthema auf „ response “ fest.
Siehe auch responseTopic().
void QMqttLastWillProperties::setUserProperties(const QMqttUserProperties &properties)
Setzt die Benutzereigenschaften auf „ properties “.
Siehe auch userProperties().
void QMqttLastWillProperties::setWillDelayInterval(quint32 delay)
Legt das Verzögerungsintervall auf „ delay “ fest.
Siehe auch willDelayInterval().
QMqttUserProperties QMqttLastWillProperties::userProperties() const
Gibt die Benutzereigenschaften zurück.
Siehe auch „ setUserProperties()“.
quint32 QMqttLastWillProperties::willDelayInterval() const
Gibt die Verzögerung in Sekunden zurück, nach der eine „Last Will“-Nachricht nach dem Trennen der Verbindung zum Server gesendet wird.
Siehe auch „ 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.