QOpcUaElementOperand Class
El tipo de ElementOperand de OPC UA. Más...
| Cabecera: | #include <QOpcUaElementOperand> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa)target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
| qmake: | QT += opcua |
Funciones públicas
| QOpcUaElementOperand() | |
| QOpcUaElementOperand(quint32 index) | |
| QOpcUaElementOperand(const QOpcUaElementOperand &rhs) | |
| quint32 | index() const |
| void | setIndex(quint32 index) |
| operator QVariant() const | |
| QOpcUaElementOperand & | operator=(const QOpcUaElementOperand &rhs) |
No miembros relacionados
(since 6.7) bool | operator!=(const QOpcUaElementOperand &lhs, const QOpcUaElementOperand &rhs) |
(since 6.7) bool | operator==(const QOpcUaElementOperand &lhs, const QOpcUaElementOperand &rhs) |
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:
QOpcUaMonitoringParameters::EventFilter filter; ... // setup select clauses ... QOpcUaContentFilterElement condition1; QOpcUaContentFilterElement condition2; QOpcUaContentFilterElement condition3; condition1 << QOpcUaContentFilterElement::FilterOperator::GreaterThan << QOpcUaSimpleAttributeOperand("Severity") << QOpcUaLiteralOperand(quint16(500), QOpcUa::Types::UInt16); condition2 << QOpcUaContentFilterElement::FilterOperator::Equals << QOpcUaSimpleAttributeOperand("Message") << QOpcUaLiteralOperand("TestString", QOpcUa::Types::String); condition3 << QOpcUaContentFilterElement::FilterOperator::And << QOpcUaElementOperand(0) << QOpcUaElementOperand(1); filter << condition1 << condition2 << condition3;
Documentación de la función miembro
QOpcUaElementOperand::QOpcUaElementOperand()
Por defecto construye un elemento operando sin parámetros establecidos.
QOpcUaElementOperand::QOpcUaElementOperand(quint32 index)
Construye un elemento operando con el índice index.
QOpcUaElementOperand::QOpcUaElementOperand(const QOpcUaElementOperand &rhs)
Construye un elemento operando a partir de rhs.
quint32 QOpcUaElementOperand::index() const
Devuelve el índice del elemento de filtro que se va a utilizar como operando.
Véase también setIndex().
void QOpcUaElementOperand::setIndex(quint32 index)
Establece el índice del elemento de filtro que se va a utilizar como operando en index.
Véase también index().
QOpcUaElementOperand::operator QVariant() const
Convierte este elemento operando a QVariant.
QOpcUaElementOperand &QOpcUaElementOperand::operator=(const QOpcUaElementOperand &rhs)
Establece los valores de rhs en este elemento operando.
No miembros relacionados
[noexcept, since 6.7] bool operator!=(const QOpcUaElementOperand &lhs, const QOpcUaElementOperand &rhs)
Devuelve true si lhs un valor diferente de rhs.
Esta función se introdujo en Qt 6.7.
[noexcept, since 6.7] bool operator==(const QOpcUaElementOperand &lhs, const QOpcUaElementOperand &rhs)
Devuelve true si lhs tiene el mismo valor que rhs.
Esta función se introdujo en Qt 6.7.
© 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.