QOpcUaHistoryReadRawRequest Class
该类存储了从服务器请求历史数据所需的必要信息。更多...
| 头文件: | #include <QOpcUaHistoryReadRawRequest> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa) target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
| qmake: | QT += opcua |
| 鉴于: | Qt 6.3 |
公共函数
| QOpcUaHistoryReadRawRequest() | |
(since 6.7) | QOpcUaHistoryReadRawRequest(const QList<QOpcUaReadItem> &nodesToRead, const QDateTime &startTimestamp, const QDateTime &endTimestamp, QOpcUa::TimestampsToReturn timestampsToReturn) |
| QOpcUaHistoryReadRawRequest(const QList<QOpcUaReadItem> &nodesToRead, const QDateTime &startTimestamp, const QDateTime &endTimestamp, quint32 numValuesPerNode = 0, bool returnBounds = false) | |
| QOpcUaHistoryReadRawRequest(const QOpcUaHistoryReadRawRequest &other) | |
| ~QOpcUaHistoryReadRawRequest() | |
| void | addNodeToRead(const QOpcUaReadItem &nodeToRead) |
| QDateTime | endTimestamp() const |
| QList<QOpcUaReadItem> | nodesToRead() const |
| quint32 | numValuesPerNode() const |
| bool | returnBounds() const |
| void | setEndTimestamp(const QDateTime &endTimestamp) |
| void | setNodesToRead(const QList<QOpcUaReadItem> &nodesToRead) |
| void | setNumValuesPerNode(quint32 numValuesPerNode) |
| void | setReturnBounds(bool returnBounds) |
| void | setStartTimestamp(const QDateTime &startTimestamp) |
(since 6.7) void | setTimestampsToReturn(QOpcUa::TimestampsToReturn timestampsToReturn) |
| QDateTime | startTimestamp() const |
| void | swap(QOpcUaHistoryReadRawRequest &other) |
(since 6.7) QOpcUa::TimestampsToReturn | timestampsToReturn() const |
| QOpcUaHistoryReadRawRequest & | operator=(const QOpcUaHistoryReadRawRequest &other) |
相关的非成员
| bool | operator!=(const QOpcUaHistoryReadRawRequest &lhs, const QOpcUaHistoryReadRawRequest &rhs) |
| bool | operator==(const QOpcUaHistoryReadRawRequest &lhs, const QOpcUaHistoryReadRawRequest &rhs) |
详细描述
这是Qt OPC UA 对OPCUA 1.04第11部分6.4.3中定义的用于读取历史数据的OPCUA ReadRawModifiedDetails的表示。
从服务器请求历史数据时,需要向服务器提供几个值,以便服务器知道要收集哪些数据。 QOpcUaHistoryReadRawRequest 类提供了所需的值。startTimestamp 和endTimestamp 定义了应从其中收集历史数据的时段范围。nodesToRead 定义了应从哪些节点收集历史数据。numValuesPerNode 定义了每个节点应返回的数据值最大数量。returnBounds 定义了边界值是否应包含在结果中。
成员函数文档
QOpcUaHistoryReadRawRequest::QOpcUaHistoryReadRawRequest()
构建了一个无效的 QOpcUaHistoryReadRawRequest。
[explicit, since 6.7] QOpcUaHistoryReadRawRequest::QOpcUaHistoryReadRawRequest(const QList<QOpcUaReadItem> &nodesToRead, const QDateTime &startTimestamp, const QDateTime &endTimestamp, QOpcUa::TimestampsToReturn timestampsToReturn)
根据给定的值构建一个 QOpcUaHistoryReadRawRequest 对象。timestampsToReturn 参数用于确定为每个值返回的时间戳。
该函数于 Qt 6.7 中引入。
[explicit] QOpcUaHistoryReadRawRequest::QOpcUaHistoryReadRawRequest(const QList<QOpcUaReadItem> &nodesToRead, const QDateTime &startTimestamp, const QDateTime &endTimestamp, quint32 numValuesPerNode = 0, bool returnBounds = false)
根据给定的值构建一个 QOpcUaHistoryReadRawRequest 对象。
QOpcUaHistoryReadRawRequest::QOpcUaHistoryReadRawRequest(const QOpcUaHistoryReadRawRequest &other)
根据other 构建一个QOpcUaHistoryReadRawRequest对象。
[noexcept] QOpcUaHistoryReadRawRequest::~QOpcUaHistoryReadRawRequest()
销毁请求对象。
void QOpcUaHistoryReadRawRequest::addNodeToRead(const QOpcUaReadItem &nodeToRead)
将一个节点添加到nodeToRead 列表中。
QDateTime QOpcUaHistoryReadRawRequest::endTimestamp() const
返回结束时间戳。
另请参阅 setEndTimestamp()。
QList<QOpcUaReadItem> QOpcUaHistoryReadRawRequest::nodesToRead() const
返回待读取的节点列表。
另请参阅 setNodesToRead()。
quint32 QOpcUaHistoryReadRawRequest::numValuesPerNode() const
返回每个节点中的值个数。
另请参阅 setNumValuesPerNode()。
bool QOpcUaHistoryReadRawRequest::returnBounds() const
返回是否应请求返回边界。
另请参阅 setReturnBounds()。
void QOpcUaHistoryReadRawRequest::setEndTimestamp(const QDateTime &endTimestamp)
将endTimestamp 设置为要获取的历史数据。
另请参阅 endTimestamp()。
void QOpcUaHistoryReadRawRequest::setNodesToRead(const QList<QOpcUaReadItem> &nodesToRead)
设置nodesToRead 列表。
另请参阅 nodesToRead()。
void QOpcUaHistoryReadRawRequest::setNumValuesPerNode(quint32 numValuesPerNode)
将numValuesPerNode 设置为指定每个节点要获取的值个数。
另请参阅 numValuesPerNode()。
void QOpcUaHistoryReadRawRequest::setReturnBounds(bool returnBounds)
将returnBounds 设置为指定是否应请求返回边界。
另请参阅 returnBounds()。
void QOpcUaHistoryReadRawRequest::setStartTimestamp(const QDateTime &startTimestamp)
将startTimestamp 设置为要获取的历史数据。
另请参阅 startTimestamp()。
[since 6.7] void QOpcUaHistoryReadRawRequest::setTimestampsToReturn(QOpcUa::TimestampsToReturn timestampsToReturn)
设置为timestampsToReturn 的每个值返回的选定时间戳。
该函数在 Qt 6.7 中引入。
另请参阅 timestampsToReturn()。
QDateTime QOpcUaHistoryReadRawRequest::startTimestamp() const
返回开始时间戳。
另请参阅 setStartTimestamp()。
[noexcept] void QOpcUaHistoryReadRawRequest::swap(QOpcUaHistoryReadRawRequest &other)
将此请求实例与other 互换。该函数运行速度极快,且绝不会失败。
[since 6.7] QOpcUa::TimestampsToReturn QOpcUaHistoryReadRawRequest::timestampsToReturn() const
返回每个值对应的选定时间戳。
该函数在 Qt 6.7 中引入。
另请参阅 setTimestampsToReturn()。
QOpcUaHistoryReadRawRequest &QOpcUaHistoryReadRawRequest::operator=(const QOpcUaHistoryReadRawRequest &other)
将other 中的值设置到此QOpcUaHistoryReadRawRequest 项目中。
相关非成员
[noexcept] bool operator!=(const QOpcUaHistoryReadRawRequest &lhs, const QOpcUaHistoryReadRawRequest &rhs)
如果lhs 不等于rhs ,则返回true ;否则返回false 。
如果两个 `QOpcUaHistoryReadRawRequest ` 项的 `startTimestamp`、`endTimestamp`、`numValuesPerNode`、`returnBounds ` 或 `nodesToRead ` 不相等,则视为不相等。
[noexcept] bool operator==(const QOpcUaHistoryReadRawRequest &lhs, const QOpcUaHistoryReadRawRequest &rhs)
如果lhs 等于rhs ,则返回true ;否则返回false 。
若两个 `QOpcUaHistoryReadRawRequest ` 项的 `startTimestamp`、`endTimestamp`、`numValuesPerNode`、`returnBounds ` 和 `nodesToRead ` 均相等,则视为相等。
© 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.