QMqttSubscriptionProperties Class

QMqttSubscriptionProperties クラスは、トピック・フィルタを購読する際にQMqttClient がサーバに渡すことができる設定オプションを表します。詳細...

ヘッダ #include <QMqttSubscriptionProperties>
CMake: find_package(Qt6 REQUIRED COMPONENTS Mqtt)
target_link_libraries(mytarget PRIVATE Qt6::Mqtt)
qmake: QT += mqtt

パブリック関数

(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

詳細説明

注意: サブスクリプション・プロパティは MQTT 5.0 仕様の一部であり、より低いプロトコル・レベルで接続する場合は使用できない。詳細はQMqttClient::ProtocolVersion を参照。

メンバ関数ドキュメント

[since 6.4] bool QMqttSubscriptionProperties::noLocal() const

サブスクリプションが同じトピックに関するローカルメッセージを受信しない場合、true を返します。

この関数は Qt 6.4 で導入されました。

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

[since 6.4] void QMqttSubscriptionProperties::setNoLocal(bool noloc)

ローカルメッセージを受信しないサブスクリプションオプションを設定します。クライアントが既存のローカルサブスクリプションと同じトピックのメッセージを発行すると、デフォルトではサーバはそのメッセージをクライアントに送り返します。noloc を true に設定すると、ブローカは同じクライアントが発行したメッセージを送信しません。

この関数は Qt 6.4 で導入されました。

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

void QMqttSubscriptionProperties::setSubscriptionIdentifier(quint32 id)

サブスクリプション識別子をid に設定する。

subscriptionIdentifier()も参照

void QMqttSubscriptionProperties::setUserProperties(const QMqttUserProperties &user)

ユーザ・プロパティをuser に設定する。

userProperties()も参照のこと

quint32 QMqttSubscriptionProperties::subscriptionIdentifier() const

このサブスクリプションを記述するために使用されるサブスクリプション識別子を返す。

setSubscriptionIdentifier()も参照

QMqttUserProperties QMqttSubscriptionProperties::userProperties() const

ユーザが指定したプロパティを返します。

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

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