QOpcUaWriteItem Class

このクラスは、書き込み操作のオプションを格納します。詳細...

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

パブリック関数

QOpcUaWriteItem()
QOpcUaWriteItem(const QString &nodeId, QOpcUa::NodeAttribute attribute, const QVariant &value, QOpcUa::Types type = QOpcUa::Types::Undefined, const QString &indexRange = QString())
QOpcUaWriteItem(const QOpcUaWriteItem &other)
QOpcUa::NodeAttribute attribute() const
bool hasStatusCode() 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 setType(QOpcUa::Types type)
void setValue(const QVariant &value)
void setValue(const QVariant &value, QOpcUa::Types type)
QDateTime sourceTimestamp() const
QOpcUa::UaStatusCode statusCode() const
QOpcUa::Types type() const
QVariant value() const
QOpcUaWriteItem &operator=(const QOpcUaWriteItem &rhs)

詳細説明

OPC UAサーバーへの書き込み操作は、サーバー上のノードの属性の値の全体または特定のインデックス範囲を上書きします。このクラスは、バックエンドがサーバーに書き込み要求を行うために必要な情報を含んでいます。

このクラスの 1 つまたは複数のオブジェクトが、QOpcUaClient::writeNodeAttributes() 操作の要求を構成します。

QOpcUaClient::writeNodeAttributes() およびQOpcUaWriteResultも参照してください

メンバ関数ドキュメント

QOpcUaWriteItem::QOpcUaWriteItem()

デフォルトでは、パラメータが設定されていない書き込み項目が作成されます。

QOpcUaWriteItem::QOpcUaWriteItem(const QString &nodeId, QOpcUa::NodeAttribute attribute, const QVariant &value, QOpcUa::Types type = QOpcUa::Types::Undefined, const QString &indexRange = QString())

ノードnodeId から属性attribute の書き込み項目を作成する。型type の値valueattribute の位置indexRange に書き込まれます。

QOpcUaWriteItem::QOpcUaWriteItem(const QOpcUaWriteItem &other)

other から新しい書き込み項目を作成する。

QOpcUa::NodeAttribute QOpcUaWriteItem::attribute() const

書き込み項目の属性を返します。

setAttribute()も参照

bool QOpcUaWriteItem::hasStatusCode() const

書き込む値のステータスコードが設定されていればtrueを返す。

QString QOpcUaWriteItem::indexRange() const

書き込み項目のインデックス範囲を返します。

setIndexRange()も参照

QString QOpcUaWriteItem::nodeId() const

書き込み項目のノード ID を返します。

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

QDateTime QOpcUaWriteItem::serverTimestamp() const

書き込む値のサーバのタイムスタンプを返します。

setServerTimestamp()も参照

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

書き込み項目の属性をattribute に設定する。

attribute()も参照のこと

void QOpcUaWriteItem::setIndexRange(const QString &indexRange)

書き込み項目のインデックス範囲をindexRange に設定する。

indexRange()も参照のこと

void QOpcUaWriteItem::setNodeId(const QString &nodeId)

書き込み項目のノード ID をnodeId に設定する。

nodeId()も参照

void QOpcUaWriteItem::setServerTimestamp(const QDateTime &serverTimestamp)

serverTimestamp に書き込む値のサーバ・タイムスタンプを設定する。 サーバ・タイムスタンプが無効な場合、その値はクライアントによって無視され、サーバに送信されない。サーバがタイムスタンプの書き込みをサポートしていない場合、この項目の書き込み操作はステータスコードBadWriteNotSupported で失敗します。

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

void QOpcUaWriteItem::setSourceTimestamp(const QDateTime &sourceTimestamp)

書き込む値のソース・タイムスタンプをsourceTimestamp に設定します。 ソース・タイムスタンプが無効な場合、クライアントによって無視され、サーバには送信されません。サーバがタイムスタンプの書き込みをサポートしていない場合、この項目の書き込み操作はステータスコードBadWriteNotSupported で失敗します。

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

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

statusCode に書き込む値のステータス・コードを設定する。 ステータス・コードが設定されていない場合、ステータス・コードはサーバに送信されない。

statusCode()も参照のこと

void QOpcUaWriteItem::setType(QOpcUa::Types type)

書き込み項目の値の型をtype に設定する。

type()も参照のこと

void QOpcUaWriteItem::setValue(const QVariant &value)

書き込み項目の値をvalue に設定する。与えられた場合、値を SDK 固有のデータ型に変換する際にsetType() の型情報が使用される。

value() およびsetType()も参照

void QOpcUaWriteItem::setValue(const QVariant &value, QOpcUa::Types type)

書き込み項目の値を

定数説明
and値の型をtype に設定する。

QDateTime QOpcUaWriteItem::sourceTimestamp() const

値の書き込み元のタイムスタンプを返します。

setSourceTimestamp()も参照

QOpcUa::UaStatusCode QOpcUaWriteItem::statusCode() const

書き込む値のステータス・コードを返す。

setStatusCode()も参照

QOpcUa::Types QOpcUaWriteItem::type() const

書き込み項目の値の型を返す。

setType()も参照

QVariant QOpcUaWriteItem::value() const

書き込み項目の値を返します。

setValue()も参照

QOpcUaWriteItem &QOpcUaWriteItem::operator=(const QOpcUaWriteItem &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.