ElementOperand QML Type
The OPC UA ElementOperand type. More...
Import Statement: | import QtOpcUa . |
Since: | QtOpcUa 5.13 |
Properties
- index : int
Detailed Description
The ElementOperand is defined in OPC-UA part 4, 7.4.4.2. It is used to identify another element in the filter by its index (the first element has the index 0).
This is required to create complex filters, for example to reference the two operands of the AND operation in ((Severity > 500) AND (Message == "TestString")). The first step is to create content filter elements for the two conditions (Severity > 500) and (Message == "TestString"). A third content filter element is required to create an AND combination of the two conditions. It consists of the AND operator and two element operands with the indices of the two conditions created before:
import QtOpcUa 5.13 as QtOpcUa QtOpcUa.EventFilter { select : [ ... ] where: [ QtOpcUa.FilterElement { operator: QtOpcUa.FilterElement.GreaterThan firstOperand: QtOpcUA.SimpleAttributeOperand { browsePath: [ QtOpcUa.NodeId { identifier: "Severity" ns: "http://opcfoundation.org/UA/" } ] } secondOperand: QtOpcUa.LiteralOperand { value: 500 type: QtOpcUa.Constants.UInt16 } } QtOpcUa.FilterElement { operator: QtOpcUa.FilterElement.Equals firstOperand: QtOpcUA.SimpleAttributeOperand { browsePath: [ QtOpcUa.NodeId { identifier: "Message" ns: "http://opcfoundation.org/UA/" } ] } secondOperand: QtOpcUa.LiteralOperand { value: "TestString" type: QtOpcUa.Constants.String } } QtOpcUa.FilterElement { operator: QtOpcUa.FilterElement.And firstOperand: QtOpcUA.ElementOperand { index: 0 } secondOperand: QtOpcUa.ElementOperand { index: 1 } } ] }
Property Documentation
index : int |
Index of the filter element that is going to be used as operand.
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.