QOpcUaReadResult Class

このクラスは、読み取り操作の結果を保存します。詳細...

ヘッダー #include <QOpcUaReadResult>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua

パブリック関数

QOpcUaReadResult()
QOpcUaReadResult(const QOpcUaReadResult &other)
QOpcUa::NodeAttribute attribute() const
QString indexRange() const
QString nodeId() const
QDateTime serverTimestamp() const
void setAttribute(QOpcUa::NodeAttribute attribute)
void setIndexRange(const QString &indexRange)
void setNodeId(const QString &nodeId)
void setServerTimestamp(const QDateTime &serverTimestamp)
void setSourceTimestamp(const QDateTime &sourceTimestamp)
void setStatusCode(QOpcUa::UaStatusCode statusCode)
void setValue(const QVariant &value)
QDateTime sourceTimestamp() const
QOpcUa::UaStatusCode statusCode() const
QVariant value() const
QOpcUaReadResult &operator=(const QOpcUaReadResult &rhs)

詳細説明

OPC UAサーバーの読み取り操作は、ソースがいつ値を生成し、サーバーがいつそれを取得したかを示す値とタイムスタンプを返します。また、値が読み取れたかどうか、読み取れなかった場合はどのような理由で読み取りに失敗したかを示すステータスコードも返します。

サーバから返されるデータに加えて、このクラスには、クライアントが結果と要求を一致させることができるように、要求からのノード ID、属性、およびインデックス範囲も含まれます。

このクラスのオブジェクトは、QOpcUaClient::readNodeAttributesFinished() シグナルで返され、QOpcUaClient::readNodeAttributes() 要求の一部であった読み取り操作の結果を含みます。

QOpcUaClient::readNodeAttributes()、QOpcUaClient::readNodeAttributesFinished()、QOpcUaReadItemも参照のこと

メンバ関数ドキュメント

QOpcUaReadResult::QOpcUaReadResult()

デフォルトでは、パラメータが設定されていない読み取り結果が構築される。

QOpcUaReadResult::QOpcUaReadResult(const QOpcUaReadResult &other)

other から読み取り結果を構築する。

QOpcUa::NodeAttribute QOpcUaReadResult::attribute() const

属性 ID を返します。

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

QString QOpcUaReadResult::indexRange() const

インデックス範囲を返します。

setIndexRange()も参照

QString QOpcUaReadResult::nodeId() const

ノード ID を返します。

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

QDateTime QOpcUaReadResult::serverTimestamp() const

value() のサーバのタイムスタンプを返す。

setServerTimestamp()も参照

void QOpcUaReadResult::setAttribute(QOpcUa::NodeAttribute attribute)

属性 id をattribute に設定します。

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

void QOpcUaReadResult::setIndexRange(const QString &indexRange)

インデックス範囲をindexRange に設定する。

indexRange()も参照のこと

void QOpcUaReadResult::setNodeId(const QString &nodeId)

ノード ID をnodeId に設定します。

nodeId()も参照

void QOpcUaReadResult::setServerTimestamp(const QDateTime &serverTimestamp)

サーバのタイムスタンプをserverTimestamp に設定する。

serverTimestamp()も参照のこと

void QOpcUaReadResult::setSourceTimestamp(const QDateTime &sourceTimestamp)

送信元のタイムスタンプをsourceTimestamp に設定する。

sourceTimestamp()も参照のこと

void QOpcUaReadResult::setStatusCode(QOpcUa::UaStatusCode statusCode)

ステータスコードをstatusCode に設定する。

statusCode()も参照のこと

void QOpcUaReadResult::setValue(const QVariant &value)

値をvalue に設定する。

value()も参照のこと

QDateTime QOpcUaReadResult::sourceTimestamp() const

value() の送信元タイムスタンプを返す。

setSourceTimestamp()も参照

QOpcUa::UaStatusCode QOpcUaReadResult::statusCode() const

この要素のステータスコードを返す。ステータス・コードがGood でない場合、値とタイムスタンプは無効です。

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

QVariant QOpcUaReadResult::value() const

値を返す。

setValue()も参照

QOpcUaReadResult &QOpcUaReadResult::operator=(const QOpcUaReadResult &rhs)

この読み込み結果のrhs の値を設定する。

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