Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

QOpcUaHistoryData Class

This class stores historical data values from a node. More...

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

Public Functions

QOpcUaHistoryData(const QOpcUaHistoryData &other)
QOpcUaHistoryData(const QString &nodeId)
QOpcUaHistoryData()
QOpcUaHistoryData & operator=(const QOpcUaHistoryData &other)
~QOpcUaHistoryData()
void addValue(const QOpcUaDataValue &value)
int count() const
QString nodeId() const
QList<QOpcUaDataValue> result() const
void setNodeId(const QString &nodeId)
void setStatusCode(QOpcUa::UaStatusCode statusCode)
QOpcUa::UaStatusCode statusCode() const
void swap(QOpcUaHistoryData &other)

Detailed Description

When a request to read history data is being handled, instances of this class are used to store information about which node has been read, its values and the status code. The finished signal of a history read request will return a list of QOpcUaHistoryData objects which can be parsed to review the results of the request.

Member Function Documentation

QOpcUaHistoryData::QOpcUaHistoryData(const QOpcUaHistoryData &other)

Constructs a history data item from other.

QOpcUaHistoryData::QOpcUaHistoryData(const QString &nodeId)

Constructs a history data item and stores which node it corresponds to.

QOpcUaHistoryData::QOpcUaHistoryData()

Constructs an invalid history data item.

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

Sets the values from other in this history data item.

QOpcUaHistoryData::~QOpcUaHistoryData()

Destroys the history data item.

void QOpcUaHistoryData::addValue(const QOpcUaDataValue &value)

Adds a data value object given by value.

int QOpcUaHistoryData::count() const

Returns the number of available data value objects.

QString QOpcUaHistoryData::nodeId() const

Returns the nodeId of the node whose data has been stored.

See also setNodeId().

QList<QOpcUaDataValue> QOpcUaHistoryData::result() const

Returns the list of data value objects which contain the results of the history read request.

void QOpcUaHistoryData::setNodeId(const QString &nodeId)

Sets the nodeId to nodeId.

See also nodeId().

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

Sets the status code to statusCode.

See also statusCode().

QOpcUa::UaStatusCode QOpcUaHistoryData::statusCode() const

Returns the status code which indicates if an error occurred while fetching the history data.

See also setStatusCode().

void QOpcUaHistoryData::swap(QOpcUaHistoryData &other)

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

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded