class QOpcUaDataValue

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

Added in version 6.3.

Synopsis

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

This class corresponds to the OPC UA DataValue type.

__init__()

Constructs an invalid data value.

__init__(other)
Parameters:

otherQOpcUaDataValue

Constructs a data value from other.

__ne__(rhs)
Parameters:

rhsQOpcUaDataValue

Return type:

bool

Returns true if lhs is not equal to rhs.

__eq__(rhs)
Parameters:

rhsQOpcUaDataValue

Return type:

bool

Returns true if lhs is equal to rhs.

serverPicoseconds()
Return type:

int

Returns the number of 10 picosecond intervals for the server timestamp.

serverTimestamp()
Return type:

QDateTime

Returns the server timestamp for value() .

setServerPicoseconds(serverPicoseconds)
Parameters:

serverPicoseconds – int

Sets the number of 10 picosecond intervals for the server timestamp to serverPicoseconds.

setServerTimestamp(serverTimestamp)
Parameters:

serverTimestampQDateTime

Sets the server timestamp to serverTimestamp.

setSourcePicoseconds(sourcePicoseconds)
Parameters:

sourcePicoseconds – int

Sets the number of 10 picosecond intervals for the source timestamp to sourcePicoseconds.

setSourceTimestamp(sourceTimestamp)
Parameters:

sourceTimestampQDateTime

Sets the source timestamp to sourceTimestamp.

setStatusCode(statusCode)
Parameters:

statusCodeUaStatusCode

Sets the status code to statusCode.

See also

statusCode()

setValue(value)
Parameters:

value – object

Sets the value to value.

If this data value is to be used with QOpcUaBinaryDataEncoding or QOpcUaGenericStructHandler , the value’s type must be QOpcUaVariant .

See also

value()

sourcePicoseconds()
Return type:

int

Returns the number of 10 picosecond intervals for the source timestamp.

sourceTimestamp()
Return type:

QDateTime

Returns the source timestamp for value() .

statusCode()
Return type:

UaStatusCode

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()

swap(other)
Parameters:

otherQOpcUaDataValue

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

value()
Return type:

object

Returns the value.

See also

setValue()