QOpcUaHistoryReadEventRequest Class
该类存储从服务器请求历史数据的必要信息。更多
Header: | #include <QOpcUaHistoryReadEventRequest> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa) target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
qmake: | QT += opcua |
自 | Qt 6.7 |
公共函数
QOpcUaHistoryReadEventRequest() | |
QOpcUaHistoryReadEventRequest(const QList<QOpcUaReadItem> &nodesToRead, const QDateTime &startTimestamp, const QDateTime &endTimestamp, const QOpcUaMonitoringParameters::EventFilter &filter) | |
QOpcUaHistoryReadEventRequest(const QOpcUaHistoryReadEventRequest &other) | |
QOpcUaHistoryReadEventRequest(QOpcUaHistoryReadEventRequest &&other) | |
~QOpcUaHistoryReadEventRequest() | |
void | addNodeToRead(const QOpcUaReadItem &nodeToRead) |
QDateTime | endTimestamp() const |
QOpcUaMonitoringParameters::EventFilter | filter() const |
QList<QOpcUaReadItem> | nodesToRead() const |
quint32 | numValuesPerNode() const |
void | setEndTimestamp(const QDateTime &endTimestamp) |
void | setFilter(const QOpcUaMonitoringParameters::EventFilter &filter) |
void | setNodesToRead(const QList<QOpcUaReadItem> &nodesToRead) |
void | setNumValuesPerNode(quint32 numValuesPerNode) |
void | setStartTimestamp(const QDateTime &startTimestamp) |
QDateTime | startTimestamp() const |
void | swap(QOpcUaHistoryReadEventRequest &other) |
QOpcUaHistoryReadEventRequest & | operator=(QOpcUaHistoryReadEventRequest &&other) |
QOpcUaHistoryReadEventRequest & | operator=(const QOpcUaHistoryReadEventRequest &other) |
相关非成员
bool | operator!=(const QOpcUaHistoryReadEventRequest &lhs, const QOpcUaHistoryReadEventRequest &rhs) |
bool | operator==(const QOpcUaHistoryReadEventRequest &lhs, const QOpcUaHistoryReadEventRequest &rhs) |
详细描述
Qt OPC UA 表示用于读取OPC-UA 第 11 部分 6.4.2 中定义的历史数据的OPC UA ReadEventDetails。
从服务器请求历史数据时,需要向服务器提供几个值,以便知道要收集哪些数据。QOpcUaHistoryReadEventRequest 类提供了所需的值。startTimestamp 和endTimestamp 定义了应从何处收集历史事件的时间范围。nodesToRead 定义了应从哪些节点收集历史数据。numValuesPerNode 定义了每个节点应返回的最大事件数。filter 是事件过滤器,用于确定应返回哪些事件及其哪些字段。
成员函数文档
QOpcUaHistoryReadEventRequest::QOpcUaHistoryReadEventRequest()
构造一个无效的 QOpcUaHistoryReadEventRequest。
[explicit]
QOpcUaHistoryReadEventRequest::QOpcUaHistoryReadEventRequest(const QList<QOpcUaReadItem> &nodesToRead, const QDateTime &startTimestamp, const QDateTime &endTimestamp, const QOpcUaMonitoringParameters::EventFilter &filter)
使用给定值构建 QOpcUaHistoryReadEventRequest 项目。
QOpcUaHistoryReadEventRequest::QOpcUaHistoryReadEventRequest(const QOpcUaHistoryReadEventRequest &other)
从other 构造一个 QOpcUaHistoryReadEventRequest 项目。
[noexcept]
QOpcUaHistoryReadEventRequest::QOpcUaHistoryReadEventRequest(QOpcUaHistoryReadEventRequest &&other)
移动-从other 构建一个新的读取事件请求对象。
注: moved-from 对象other 处于部分形成状态,其中唯一有效的操作是销毁和赋新值。
[noexcept]
QOpcUaHistoryReadEventRequest::~QOpcUaHistoryReadEventRequest()
销毁请求对象。
void QOpcUaHistoryReadEventRequest::addNodeToRead(const QOpcUaReadItem &nodeToRead)
将节点添加到nodeToRead 列表中。
QDateTime QOpcUaHistoryReadEventRequest::endTimestamp() const
返回结束时间戳。
另请参阅 setEndTimestamp().
QOpcUaMonitoringParameters::EventFilter QOpcUaHistoryReadEventRequest::filter() const
返回用于检索历史事件的事件过滤器。
另请参阅 setFilter().
QList<QOpcUaReadItem> QOpcUaHistoryReadEventRequest::nodesToRead() const
返回要读取的节点列表。
另请参阅 setNodesToRead()。
quint32 QOpcUaHistoryReadEventRequest::numValuesPerNode() const
返回每个节点的数值个数。
另请参见 setNumValuesPerNode()。
void QOpcUaHistoryReadEventRequest::setEndTimestamp(const QDateTime &endTimestamp)
为要获取的历史数据设置endTimestamp 。
另请参阅 endTimestamp().
void QOpcUaHistoryReadEventRequest::setFilter(const QOpcUaMonitoringParameters::EventFilter &filter)
将用于检索历史事件的事件过滤器设置为filter 。
另请参阅 filter() 。
void QOpcUaHistoryReadEventRequest::setNodesToRead(const QList<QOpcUaReadItem> &nodesToRead)
设置nodesToRead 列表。
另请参阅 nodesToRead().
void QOpcUaHistoryReadEventRequest::setNumValuesPerNode(quint32 numValuesPerNode)
设置numValuesPerNode ,表示每个节点要获取的值的个数。
另请参阅 numValuesPerNode().
void QOpcUaHistoryReadEventRequest::setStartTimestamp(const QDateTime &startTimestamp)
为要获取的历史数据设置startTimestamp 。
另请参阅 startTimestamp().
QDateTime QOpcUaHistoryReadEventRequest::startTimestamp() const
返回起始时间戳。
另请参阅 setStartTimestamp().
[noexcept]
void QOpcUaHistoryReadEventRequest::swap(QOpcUaHistoryReadEventRequest &other)
将读取事件请求对象other 与此读取事件请求对象互换。该操作速度非常快,而且不会出现故障。
[noexcept]
QOpcUaHistoryReadEventRequest &QOpcUaHistoryReadEventRequest::operator=(QOpcUaHistoryReadEventRequest &&other)
移动--将other 赋值给此QOpcUaHistoryReadEventRequest 实例。
注意: 从移动对象other 将处于部分形成状态,其中唯一有效的操作是销毁和赋新值。
QOpcUaHistoryReadEventRequest &QOpcUaHistoryReadEventRequest::operator=(const QOpcUaHistoryReadEventRequest &other)
在QOpcUaHistoryReadEventRequest 项目中设置other 的值。
相关非会员
[noexcept]
bool operator!=(const QOpcUaHistoryReadEventRequest &lhs, const QOpcUaHistoryReadEventRequest &rhs)
如果lhs 不等于rhs ,则返回true
;否则返回false
。
如果两个QOpcUaHistoryReadEventRequest 项目的startTimestamp
,endTimestamp
,numValuesPerNode
,filter
或nodesToRead
不相等,则视为不相等。
[noexcept]
bool operator==(const QOpcUaHistoryReadEventRequest &lhs, const QOpcUaHistoryReadEventRequest &rhs)
如果lhs 等于rhs ,则返回true
;否则返回false
。
如果startTimestamp
,endTimestamp
,numValuesPerNode
,filter
和nodesToRead
相等,则认为两个QOpcUaHistoryReadEventRequest 项目相等。
© 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.