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

QOpcUaDataValue Class

This class stores OPC UA value data and associated metadata. More...

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

Public Functions

QOpcUaDataValue(const QOpcUaDataValue &other)
QOpcUaDataValue()
QOpcUaDataValue & operator=(const QOpcUaDataValue &other)
~QOpcUaDataValue()
QDateTime serverTimestamp() const
void setServerTimestamp(const QDateTime &serverTimestamp)
void setSourceTimestamp(const QDateTime &sourceTimestamp)
void setStatusCode(QOpcUa::UaStatusCode statusCode)
void setValue(const QVariant &value)
QDateTime sourceTimestamp() const
QOpcUa::UaStatusCode statusCode() const
void swap(QOpcUaDataValue &other)
QVariant value() const

Detailed Description

This class corresponds to the OPC UA DataValue type.

Member Function Documentation

QOpcUaDataValue::QOpcUaDataValue(const QOpcUaDataValue &other)

Constructs a data value from other.

QOpcUaDataValue::QOpcUaDataValue()

Constructs an invalid data value.

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

Sets the values from other in this data value.

QOpcUaDataValue::~QOpcUaDataValue()

Destroys the data value.

QDateTime QOpcUaDataValue::serverTimestamp() const

Returns the server timestamp for value().

See also setServerTimestamp().

void QOpcUaDataValue::setServerTimestamp(const QDateTime &serverTimestamp)

Sets the server timestamp to serverTimestamp.

See also serverTimestamp().

void QOpcUaDataValue::setSourceTimestamp(const QDateTime &sourceTimestamp)

Sets the source timestamp to sourceTimestamp.

See also sourceTimestamp().

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

Sets the status code to statusCode.

See also statusCode().

void QOpcUaDataValue::setValue(const QVariant &value)

Sets the value to value.

See also value().

QDateTime QOpcUaDataValue::sourceTimestamp() const

Returns the source timestamp for value().

See also setSourceTimestamp().

QOpcUa::UaStatusCode QOpcUaDataValue::statusCode() const

Returns the status code for this data value. If the status code is not Good, the value and the timestamps are invalid.

See also setStatusCode().

void QOpcUaDataValue::swap(QOpcUaDataValue &other)

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

QVariant QOpcUaDataValue::value() const

Returns the value.

See also setValue().

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded