PySide6.QtOpcUa.QOpcUaHistoryEvent¶
- class QOpcUaHistoryEvent¶
This class stores historical events from a node. More…
Added in version 6.7.
Synopsis¶
Methods¶
def
__init__()
def
addEvent()
def
count()
def
events()
def
nodeId()
def
__ne__()
def
__eq__()
def
setNodeId()
def
setStatusCode()
def
statusCode()
def
swap()
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:
other –
QOpcUaHistoryEvent
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
- __ne__(rhs)¶
- Parameters:
rhs –
QOpcUaHistoryEvent
- Return type:
bool
Returns
true
iflhs
is not equal torhs
.- __eq__(rhs)¶
- Parameters:
rhs –
QOpcUaHistoryEvent
- Return type:
bool
Returns
true
ifrhs
andlhs
contain the same values.- setNodeId(nodeId)¶
- Parameters:
nodeId – str
Sets the
nodeId
tonodeId
.See also
- setStatusCode(statusCode)¶
- Parameters:
statusCode –
UaStatusCode
Sets the status code to
statusCode
.See also
- statusCode()¶
- Return type:
Returns the status code which indicates if an error occurred while fetching the history events.
See also
- swap(other)¶
- Parameters:
other –
QOpcUaHistoryEvent
Swaps history event object
other
with this history event object. This operation is very fast and never fails.