このページでは

QOpcUaDataValue Class

このクラスは、OPC UAの値データおよび関連するメタデータを格納します。詳細...

ヘッダー: #include <QOpcUaDataValue>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua
以下より: Qt 6.3

パブリック関数

QOpcUaDataValue()
QOpcUaDataValue(const QOpcUaDataValue &other)
~QOpcUaDataValue()
(since 6.7) quint16 serverPicoseconds() const
QDateTime serverTimestamp() const
(since 6.7) void setServerPicoseconds(quint16 serverPicoseconds)
void setServerTimestamp(const QDateTime &serverTimestamp)
(since 6.7) void setSourcePicoseconds(quint16 sourcePicoseconds)
void setSourceTimestamp(const QDateTime &sourceTimestamp)
void setStatusCode(QOpcUa::UaStatusCode statusCode)
void setValue(const QVariant &value)
(since 6.7) quint16 sourcePicoseconds() const
QDateTime sourceTimestamp() const
QOpcUa::UaStatusCode statusCode() const
void swap(QOpcUaDataValue &other)
QVariant value() const
(since 6.7) operator QVariant() const
QOpcUaDataValue &operator=(const QOpcUaDataValue &other)
(since 6.7) bool operator!=(const QOpcUaDataValue &lhs, const QOpcUaDataValue &rhs)
(since 6.7) bool operator==(const QOpcUaDataValue &lhs, const QOpcUaDataValue &rhs)

詳細な説明

このクラスは、OPC UA の DataValue 型に対応しています。

メンバ関数のドキュメント

QOpcUaDataValue::QOpcUaDataValue()

無効なデータ値を生成します。

QOpcUaDataValue::QOpcUaDataValue(const QOpcUaDataValue &other)

other からデータ値を生成します。

[noexcept] QOpcUaDataValue::~QOpcUaDataValue()

データ値を破棄します。

[since 6.7] quint16 QOpcUaDataValue::serverPicoseconds() const

サーバーのタイムスタンプに対応する10ピコ秒間隔の数を返します。

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

setServerPicoseconds()も参照してください 。

QDateTime QOpcUaDataValue::serverTimestamp() const

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

setServerTimestamp()も参照してください 。

[since 6.7] void QOpcUaDataValue::setServerPicoseconds(quint16 serverPicoseconds)

サーバーのタイムスタンプの10ピコ秒間隔の数をserverPicoseconds に設定します。

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

serverPicoseconds()も参照してください 。

void QOpcUaDataValue::setServerTimestamp(const QDateTime &serverTimestamp)

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

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

[since 6.7] void QOpcUaDataValue::setSourcePicoseconds(quint16 sourcePicoseconds)

ソースのタイムスタンプに対する10ピコ秒間隔の数をsourcePicoseconds に設定します。

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

sourcePicoseconds()も参照してください 。

void QOpcUaDataValue::setSourceTimestamp(const QDateTime &sourceTimestamp)

ソースのタイムスタンプをsourceTimestamp に設定します。

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

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

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

statusCode()も参照してください 。

void QOpcUaDataValue::setValue(const QVariant &value)

値を「value 」に設定します。

このデータ値を `QOpcUaBinaryDataEncoding ` または `QOpcUaGenericStructHandler` で使用する場合は、その値の型が `QOpcUaVariant` でなければなりません。

value()も参照してください 。

[since 6.7] quint16 QOpcUaDataValue::sourcePicoseconds() const

指定されたタイムスタンプに対応する10ピコ秒間隔の数を返します。

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

setSourcePicoseconds()も参照してください 。

QDateTime QOpcUaDataValue::sourceTimestamp() const

value() のソースタイムスタンプを返します。

setSourceTimestamp()も参照してください 。

QOpcUa::UaStatusCode QOpcUaDataValue::statusCode() const

このデータ値のステータスコードを返します。ステータスコードが「Good 」でない場合、その値とタイムスタンプは無効です。

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

[noexcept] void QOpcUaDataValue::swap(QOpcUaDataValue &other)

このデータ値のインスタンスをother と入れ替えます。この関数は非常に高速で、失敗することはありません。

QVariant QOpcUaDataValue::value() const

値を返します。

setValue()も参照してください 。

[since 6.7] QOpcUaDataValue::operator QVariant() const

このデータ値を含むQVariant を返します。

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

QOpcUaDataValue &QOpcUaDataValue::operator=(const QOpcUaDataValue &other)

other の値を、このデータ値に設定します。

関連する非メンバー

[noexcept, since 6.7] bool operator!=(const QOpcUaDataValue &lhs, const QOpcUaDataValue &rhs)

lhs がrhs と等しくない場合、true を返します。

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

[noexcept, since 6.7] bool operator==(const QOpcUaDataValue &lhs, const QOpcUaDataValue &rhs)

lhs がrhs と等しい場合、true を返します。

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

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