class QOpcUaReadResult

This class stores the result of a read operation. More

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

A read operation on an OPC UA server returns the value and timestamps which describe when a value was generated by the source and when the server obtained it. It also returns a status code which describes if the value could be read and if not, for what reason the read has failed.

In addition to the data returned by the server, this class also contains the node id, the attribute and the index range from the request to enable a client to match the result with a request.

Objects of this class are returned in the readNodeAttributesFinished() signal and contain the result of a read operation that was part of a readNodeAttributes() request.

__init__()

Default constructs a read result with no parameters set.

__init__(other)
Parameters:

otherQOpcUaReadResult

Constructs a read result from other.

attribute()
Return type:

NodeAttribute

Returns the attribute id.

See also

setAttribute()

indexRange()
Return type:

str

Returns the index range.

See also

setIndexRange()

nodeId()
Return type:

str

Returns the node id.

See also

setNodeId()

serverTimestamp()
Return type:

QDateTime

Returns the server timestamp for value() .

setAttribute(attribute)
Parameters:

attributeNodeAttribute

Sets the attribute id to attribute.

See also

attribute()

setIndexRange(indexRange)
Parameters:

indexRange – str

Sets the index range to indexRange.

See also

indexRange()

setNodeId(nodeId)
Parameters:

nodeId – str

Sets the node id to nodeId.

See also

nodeId()

setServerTimestamp(serverTimestamp)
Parameters:

serverTimestampQDateTime

Sets the server timestamp to serverTimestamp.

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.

See also

value()

sourceTimestamp()
Return type:

QDateTime

Returns the source timestamp for value() .

statusCode()
Return type:

UaStatusCode

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

See also

setStatusCode()

value()
Return type:

object

Returns the value.

See also

setValue()