class QOpcUaHistoryEvent#

This class stores historical events from a node. More

New in version 6.7.

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#

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

__init__()#

Constructs an invalid history event item.

__init__(other)
Parameters:

otherQOpcUaHistoryEvent

Constructs a history event item from other.

__init__(nodeId)
Parameters:

nodeId – str

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

addEvent(value)#
Parameters:

value – .list of QVariant

Adds an event field list given by value.

count()#
Return type:

int

Returns the number of available events.

events()#
Return type:

.list of list of QVariant

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

nodeId()#
Return type:

str

Returns the nodeId of the node whose events have been stored.

See also

setNodeId()

__ne__(rhs)#
Parameters:

rhsQOpcUaHistoryEvent

Return type:

bool

Returns true if lhs is not equal to rhs.

setNodeId(nodeId)#
Parameters:

nodeId – str

Sets the nodeId to nodeId.

See also

nodeId()

setStatusCode(statusCode)#
Parameters:

statusCodeUaStatusCode

Sets the status code to statusCode.

See also

statusCode()

statusCode()#
Return type:

UaStatusCode

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

See also

setStatusCode()

swap(other)#
Parameters:

otherQOpcUaHistoryEvent

Swaps history event object other with this history event object. This operation is very fast and never fails.