ElementOperand QML Type
El tipo ElementOperand de OPC UA. Más información...
| Import Statement: | import QtOpcUa |
| Since: | QtOpcUa 5.13 |
| Status: | Deprecated since 6.9 |
Este tipo está obsoleto desde QtOpcUa 6.9. Recomendamos encarecidamente no utilizarlo en código nuevo.
Propiedades
- index : int
Descripción detallada
El ElementOperand se define en la norma OPC UA 1.05, parte 4, apartado 7.7.4.2. Se utiliza para identificar otro elemento del filtro mediante su índice (el primer elemento tiene el índice 0).
Esto es necesario para crear filtros complejos, por ejemplo, para hacer referencia a los dos operandos de la operación AND en ((Severity > 500) AND (Message == "TestString")). El primer paso consiste en crear elementos de filtro de contenido para las dos condiciones (Severity > 500) y (Message == «TestString»). Se necesita un tercer elemento de filtro de contenido para crear una combinación «AND» de las dos condiciones. Este elemento consta del operador «AND» y de 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.