QOpcUaHistoryReadRawRequest Class

This class stores the necessary information to request historic data from a server. More...

Header: #include <QOpcUaHistoryReadRawRequest>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua
Since: Qt 6.3

Public Functions

QOpcUaHistoryReadRawRequest()
QOpcUaHistoryReadRawRequest(const QList<QOpcUaReadItem> &nodesToRead, const QDateTime &startTimestamp, const QDateTime &endTimestamp, quint32 numValuesPerNode = 0, bool returnBounds = false)
(since 6.7) QOpcUaHistoryReadRawRequest(const QList<QOpcUaReadItem> &nodesToRead, const QDateTime &startTimestamp, const QDateTime &endTimestamp, QOpcUa::TimestampsToReturn timestampsToReturn)
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)

Detailed Description

This is the Qt OPC UA representation for the OPC UA ReadRawModifiedDetails for reading historical data defined in OPC UA 1.04 part 11, 6.4.3.

When requesting historic data from a server, several values need to be provided to the server to know which data to collect. The QOpcUaHistoryReadRawRequest class provides the required values. startTimestamp and endTimestamp define the timerange where historic data should be collected from. nodesToRead defines from which nodes historic data should be collected. numValuesPerNode defines the maximum number of data values that should be returned per node. returnBounds defines if the bounding values should be included in the result.

Member Function Documentation

QOpcUaHistoryReadRawRequest::QOpcUaHistoryReadRawRequest()

Constructs an invalid QOpcUaHistoryReadRawRequest.

[explicit] QOpcUaHistoryReadRawRequest::QOpcUaHistoryReadRawRequest(const QList<QOpcUaReadItem> &nodesToRead, const QDateTime &startTimestamp, const QDateTime &endTimestamp, quint32 numValuesPerNode = 0, bool returnBounds = false)

Constructs a QOpcUaHistoryReadRawRequest item with the given values.

[explicit, since 6.7] QOpcUaHistoryReadRawRequest::QOpcUaHistoryReadRawRequest(const QList<QOpcUaReadItem> &nodesToRead, const QDateTime &startTimestamp, const QDateTime &endTimestamp, QOpcUa::TimestampsToReturn timestampsToReturn)

Constructs a QOpcUaHistoryReadRawRequest item with the given values. The timestampsToReturn parameter determines the timestamps to return for each value.

This function was introduced in Qt 6.7.

QOpcUaHistoryReadRawRequest::QOpcUaHistoryReadRawRequest(const QOpcUaHistoryReadRawRequest &other)

Constructs a QOpcUaHistoryReadRawRequest item from other.

[noexcept] QOpcUaHistoryReadRawRequest::~QOpcUaHistoryReadRawRequest()

Destroys the request object.

void QOpcUaHistoryReadRawRequest::addNodeToRead(const QOpcUaReadItem &nodeToRead)

Adds a node to the nodeToRead list.

QDateTime QOpcUaHistoryReadRawRequest::endTimestamp() const

Returns the end time stamp.

See also setEndTimestamp().

QList<QOpcUaReadItem> QOpcUaHistoryReadRawRequest::nodesToRead() const

Returns the list of nodes to read.

See also setNodesToRead().

quint32 QOpcUaHistoryReadRawRequest::numValuesPerNode() const

Returns the number of values per node.

See also setNumValuesPerNode().

bool QOpcUaHistoryReadRawRequest::returnBounds() const

Returns if the return bounds should be requested.

See also setReturnBounds().

void QOpcUaHistoryReadRawRequest::setEndTimestamp(const QDateTime &endTimestamp)

Sets endTimestamp for the historical data to be fetched.

See also endTimestamp().

void QOpcUaHistoryReadRawRequest::setNodesToRead(const QList<QOpcUaReadItem> &nodesToRead)

Sets the nodesToRead list.

See also nodesToRead().

void QOpcUaHistoryReadRawRequest::setNumValuesPerNode(quint32 numValuesPerNode)

Sets numValuesPerNode to indicate the number of values per node to be fetched.

See also numValuesPerNode().

void QOpcUaHistoryReadRawRequest::setReturnBounds(bool returnBounds)

Sets returnBounds to indicate if the return bounds should be requested.

See also returnBounds().

void QOpcUaHistoryReadRawRequest::setStartTimestamp(const QDateTime &startTimestamp)

Sets startTimestamp for the historical data to be fetched.

See also startTimestamp().

[since 6.7] void QOpcUaHistoryReadRawRequest::setTimestampsToReturn(QOpcUa::TimestampsToReturn timestampsToReturn)

Sets the selected timestamps to return for each value to timestampsToReturn.

This function was introduced in Qt 6.7.

See also timestampsToReturn().

QDateTime QOpcUaHistoryReadRawRequest::startTimestamp() const

Returns the start time stamp.

See also setStartTimestamp().

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

Swaps this request instance with other. This function is very fast and never fails.

[since 6.7] QOpcUa::TimestampsToReturn QOpcUaHistoryReadRawRequest::timestampsToReturn() const

Returns the selected timestamps to return for each value.

This function was introduced in Qt 6.7.

See also setTimestampsToReturn().

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

Sets the values from other in this QOpcUaHistoryReadRawRequest item.

Related Non-Members

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

Returns true if lhs is not equal to rhs; otherwise returns false.

Two QOpcUaHistoryReadRawRequest items are considered not equal if their startTimestamp, endTimestamp, numValuesPerNode, returnBounds or nodesToRead are not equal.

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

Returns true if lhs is equal to rhs; otherwise returns false.

Two QOpcUaHistoryReadRawRequest items are considered equal if their startTimestamp, endTimestamp, numValuesPerNode, returnBounds and nodesToRead are equal.

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