QMqttLastWillProperties Class
QMqttLastWillProperties クラスは、QMqttClient がサーバーへの接続時に「ラストウィル」を指定する際、サーバーに渡すことのできる設定オプションを表します。詳細...
| ヘッダー: | #include <QMqttLastWillProperties> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Mqtt) target_link_libraries(mytarget PRIVATE Qt6::Mqtt) |
| qmake: | QT += mqtt |
パブリック関数
| 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 |
詳細な説明
注: Last WillプロパティはMQTT 5.0仕様の一部であり、それより低いプロトコルレベルで接続する場合は使用できません。詳細については、QMqttClient::ProtocolVersion を参照してください。
メンバ関数のドキュメント
QString QMqttLastWillProperties::contentType() const
最後の遺言メッセージのコンテンツタイプを返します。
setContentType()も参照してください 。
QByteArray QMqttLastWillProperties::correlationData() const
リクエストを識別するための相関データを返します。
setCorrelationData()も参照してください 。
quint32 QMqttLastWillProperties::messageExpiryInterval() const
「will delay」間隔から数えて、最後の「will」メッセージの有効期間を秒単位で返します。
setMessageExpiryInterval()も参照してください 。
QMqtt::PayloadFormatIndicator QMqttLastWillProperties::payloadFormatIndicator() const
ペイロード形式のインジケータを返します。
setPayloadFormatIndicator()も参照してください 。
QString QMqttLastWillProperties::responseTopic() const
「last will」メッセージのサブスクライバーが応答すべきトピックを返します。
setResponseTopic()も参照してください 。
void QMqttLastWillProperties::setContentType(const QString &content)
コンテンツタイプを「content 」に設定します。
contentType()も参照してください 。
void QMqttLastWillProperties::setCorrelationData(const QByteArray &correlation)
相関データを `correlation` に設定します。
correlationData()も参照してください 。
void QMqttLastWillProperties::setMessageExpiryInterval(quint32 expiry)
メッセージの有効期限をexpiry に設定します。
messageExpiryInterval()も参照してください 。
void QMqttLastWillProperties::setPayloadFormatIndicator(QMqtt::PayloadFormatIndicator p)
ペイロード形式インジケータを「p 」に設定します。
payloadFormatIndicator()も参照してください 。
void QMqttLastWillProperties::setResponseTopic(const QString &response)
レスポンストピックを「response 」に設定します。
responseTopic()も参照してください 。
void QMqttLastWillProperties::setUserProperties(const QMqttUserProperties &properties)
ユーザープロパティを「properties 」に設定します。
userProperties()も参照してください 。
void QMqttLastWillProperties::setWillDelayInterval(quint32 delay)
ウィルの遅延間隔をdelay に設定します。
willDelayInterval()も参照してください 。
QMqttUserProperties QMqttLastWillProperties::userProperties() const
ユーザーのプロパティを返します。
setUserProperties()も参照してください 。
quint32 QMqttLastWillProperties::willDelayInterval() const
サーバーからの切断後、遺言メッセージが送信されるまでの遅延時間を秒単位で返します。
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.