ElementOperand QML Type
El tipo de ElementOperand de OPC UA. Más...
| Import Statement: | import QtOpcUa |
| Since: | QtOpcUa 5.13 |
| Status: | Deprecated since 6.9 |
Este tipo está obsoleto desde QtOpcUa 6.9. Desaconsejamos su uso en código nuevo.
Propiedades
- index : int
Descripción detallada
El ElementOperand se define en OPC UA 1.05 parte 4, 7.7.4.2. Se utiliza para identificar otro elemento en el filtro por su índice (el primer elemento tiene el índice 0).
Esto es necesario para crear filtros complejos, por ejemplo para referenciar los dos operandos de la operación AND en ((Severidad > 500) AND (Mensaje == "CadenaDePrueba")). El primer paso consiste en crear elementos de filtro de contenido para las dos condiciones (Gravedad > 500) y (Mensaje == "CadenaDePrueba"). Se necesita un tercer elemento de filtro de contenido para crear una combinación AND de las dos condiciones. Consiste en el operador AND y dos operandos de elemento con los índices de las dos condiciones creadas anteriormente:
import QtOpcUa 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 } } ] }
Documentación de propiedades
index : int
Índice del elemento de filtro que se va a utilizar como operando.
© 2026 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.