EventFilter#

Defines an EventFilter for a monitored item. More

Inheritance diagram of PySide6.QtOpcUa.QOpcUaMonitoringParameters.EventFilter

Synopsis#

Functions#

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#

An event filter is required for monitoring events on the server. It consists of select clauses and a where clause.

The select clauses are used to specify the data the user wants to receive when an event occurs. It consists of QOpcUaSimpleAttributeOperand simple attribute operands which select attributes of child nodes of an event type, for example the value attribute of the “Message” property of BaseEventType.

The where clause is used to restrict the reported events by matching against certain criteria. Several operators and four different operand types allow filtering based on the values of the attributes of the child nodes of an event type.

Filters can be constructed using the setter or the streaming operator. Streaming a QOpcUaSimpleAttributeOperand into an event filter adds a new select clause to the filter, a QOpcUaContentFilterElement is appended to the where clause. A content filter element can be constructed by streaming operands of the types QOpcUaLiteralOperand , QOpcUaElementOperand , QOpcUaAttributeOperand and QOpcUaSimpleAttributeOperand and an operator into a content filter element. Only the last operator is used, previous operators will be discarded.

The following EventFilter tells the server to report the value of the “Message” field for events that have a “Severity” field with value >= 500:

QOpcUaMonitoringParameters::EventFilter filter;
filter << QOpcUaSimpleAttributeOperand("Message"); // Select clause of the filter

QOpcUaContentFilterElement condition;
condition << QOpcUaContentFilterElement::FilterOperator::GreaterThanOrEqual;
condition << QOpcUaSimpleAttributeOperand("Severity");
condition << QOpcUaLiteralOperand(500, QOpcUa::Types::UInt16);
filter << condition; // Where clause of the filter

For a more complex example with two conditions, see QOpcUaElementOperand .

class PySide6.QtOpcUa.QOpcUaMonitoringParameters.EventFilter#

PySide6.QtOpcUa.QOpcUaMonitoringParameters.EventFilter(arg__1)

Parameters:

arg__1PySide6.QtOpcUa.QOpcUaMonitoringParameters.EventFilter

Constructs an event filter from rhs.

PySide6.QtOpcUa.QOpcUaMonitoringParameters.EventFilter.__lshift__(whereClauseElement)#
Parameters:

whereClauseElementPySide6.QtOpcUa.QOpcUaContentFilterElement

Return type:

PySide6.QtOpcUa.QOpcUaMonitoringParameters.EventFilter

Adds the content filter element whereClauseElement to the where clause of this event filter.

PySide6.QtOpcUa.QOpcUaMonitoringParameters.EventFilter.__lshift__(selectClauseElement)
Parameters:

selectClauseElementPySide6.QtOpcUa.QOpcUaSimpleAttributeOperand

Return type:

PySide6.QtOpcUa.QOpcUaMonitoringParameters.EventFilter

Adds the simple attribute operand selectClauseElement to the select clause of this content filter element.

PySide6.QtOpcUa.QOpcUaMonitoringParameters.EventFilter.__eq__(rhs)#
Parameters:

rhsPySide6.QtOpcUa.QOpcUaMonitoringParameters.EventFilter

Return type:

bool

Returns true if this event filter has the same value as rhs.

PySide6.QtOpcUa.QOpcUaMonitoringParameters.EventFilter.selectClauses()#

Returns the selected event fields that shall be included when a new event is reported.

PySide6.QtOpcUa.QOpcUaMonitoringParameters.EventFilter.selectClausesRef()#

Returns a reference to the select clauses.

PySide6.QtOpcUa.QOpcUaMonitoringParameters.EventFilter.setSelectClauses(selectClauses)#
Parameters:

selectClauses

Sets the select clauses to selectClauses.

See also

selectClauses()

PySide6.QtOpcUa.QOpcUaMonitoringParameters.EventFilter.setWhereClause(whereClause)#
Parameters:

whereClause

Sets the where clause to whereClause.

See also

whereClause()

PySide6.QtOpcUa.QOpcUaMonitoringParameters.EventFilter.whereClause()#

Returns the content filter used to restrict the reported events to events matching certain criteria.

See also

setWhereClause()

PySide6.QtOpcUa.QOpcUaMonitoringParameters.EventFilter.whereClauseRef()#

Returns a reference to the where clause.

See also

whereClause()