このページでは

QOpcUaHistoryEvent Class

このクラスは、ノードからの履歴イベントを保存します。詳細...

ヘッダー: #include <QOpcUaHistoryEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua
以下のように: Qt 6.7 以降

パブリック関数

QOpcUaHistoryEvent()
QOpcUaHistoryEvent(const QString &nodeId)
QOpcUaHistoryEvent(const QOpcUaHistoryEvent &other)
QOpcUaHistoryEvent(QOpcUaHistoryEvent &&other)
~QOpcUaHistoryEvent()
void addEvent(const QVariantList &value)
int count() const
QList<QVariantList> events() const
QString nodeId() const
void setNodeId(const QString &nodeId)
void setStatusCode(QOpcUa::UaStatusCode statusCode)
QOpcUa::UaStatusCode statusCode() const
void swap(QOpcUaHistoryEvent &other)
QOpcUaHistoryEvent &operator=(QOpcUaHistoryEvent &&other)
QOpcUaHistoryEvent &operator=(const QOpcUaHistoryEvent &other)
bool operator!=(const QOpcUaHistoryEvent &lhs, const QOpcUaHistoryEvent &rhs)
bool operator==(const QOpcUaHistoryEvent &lhs, const QOpcUaHistoryEvent &rhs)

詳細な説明

履歴イベントの読み取りリクエストが処理されている間、このクラスのインスタンスは、どのノードが読み取られたか、そのイベント、およびステータスコードに関する情報を格納するために使用されます。履歴読み取りレスポンスの finished シグナルは、QOpcUaHistoryEvent オブジェクトのリストを返します。このリストを解析することで、リクエストの結果を確認できます。

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

QOpcUaHistoryEvent::QOpcUaHistoryEvent()

無効な履歴イベント項目を作成します。

[explicit] QOpcUaHistoryEvent::QOpcUaHistoryEvent(const QString &nodeId)

履歴イベント項目を作成し、それがどのノードに対応するかを保存します。

QOpcUaHistoryEvent::QOpcUaHistoryEvent(const QOpcUaHistoryEvent &other)

other から履歴イベント項目を作成します。

[constexpr noexcept default] QOpcUaHistoryEvent::QOpcUaHistoryEvent(QOpcUaHistoryEvent &&other)

other から新しい履歴イベントオブジェクトを移動生成します。

注: 移動元のオブジェクト other は 、部分的に形成された状態になります。この状態では、有効な操作は破棄と新しい値の代入のみです。

[noexcept] QOpcUaHistoryEvent::~QOpcUaHistoryEvent()

履歴イベント項目を削除します。

void QOpcUaHistoryEvent::addEvent(const QVariantList &value)

value で指定されたイベントフィールドリストを追加します。

int QOpcUaHistoryEvent::count() const

利用可能なイベントの数を返します。

QList<QVariantList> QOpcUaHistoryEvent::events() const

履歴読み取りリクエストの結果を含むQVariantList オブジェクトのリストを返します。

QString QOpcUaHistoryEvent::nodeId() const

イベントが保存されているノードの nodeId を返します。

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

void QOpcUaHistoryEvent::setNodeId(const QString &nodeId)

nodeId をnodeId に設定します。

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

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

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

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

QOpcUa::UaStatusCode QOpcUaHistoryEvent::statusCode() const

履歴イベントの取得中にエラーが発生したかどうかを示すステータスコードを返します。

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

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

other の履歴イベントオブジェクトを、この履歴イベントオブジェクトと入れ替えます。この操作は非常に高速で、失敗することはありません。

[noexcept] QOpcUaHistoryEvent &QOpcUaHistoryEvent::operator=(QOpcUaHistoryEvent &&other)

other をこのQOpcUaHistoryEvent インスタンスに割り当てます。

注: 移動元のオブジェクト other は 、部分的に形成された状態となり、この状態では破棄と新しい値の代入のみが有効な操作となります。

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

この履歴イベント項目に、other の値を設定します。

関連する非メンバー

[noexcept] bool operator!=(const QOpcUaHistoryEvent &lhs, const QOpcUaHistoryEvent &rhs)

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

[noexcept] bool operator==(const QOpcUaHistoryEvent &lhs, const QOpcUaHistoryEvent &rhs)

rhs とlhs の値が同じ場合、true を返します。

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