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

最後に送られたウィル・メッセージの有効期限を、ウィル・ディレイの間隔から秒単位で返します。

setMessageExpiryInterval()も参照してください

QMqtt::PayloadFormatIndicator QMqttLastWillProperties::payloadFormatIndicator() const

ペイロードフォーマットインジケータを返す。

setPayloadFormatIndicator()も参照

QString QMqttLastWillProperties::responseTopic() const

最後の 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()も参照ください

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