The OPC UA ElementOperand type. More...
| Header: | #include <QOpcUaElementOperand> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa)target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
| qmake: | QT += opcua |
| QOpcUaElementOperand() | |
| QOpcUaElementOperand(quint32 index) | |
| QOpcUaElementOperand(const QOpcUaElementOperand &rhs) | |
| quint32 | index() const |
| void | setIndex(quint32 index) |
| QVariant | operator QVariant() const |
| QOpcUaElementOperand & | operator=(const QOpcUaElementOperand &rhs) |
(since 6.7) bool |
operator!=(const QOpcUaElementOperand &lhs, const QOpcUaElementOperand &rhs) |
(since 6.7) bool |
operator==(const QOpcUaElementOperand &lhs, const QOpcUaElementOperand &rhs) |
The ElementOperand is defined in OPC UA 1.05 part 4, 7.7.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:
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;
Default constructs an element operand with no parameters set.
Constructs an element operand with index index.
Constructs an element operand from rhs.
Returns the index of the filter element that is going to be used as operand.
See also setIndex().
Sets the index of the filter element that is going to be used as operand to index.
See also index().
Converts this element operand to QVariant.
Sets the values from rhs in this element operand.
[noexcept, since 6.7] bool operator!=(const QOpcUaElementOperand &lhs, const QOpcUaElementOperand
&rhs)Returns true if lhs a different value than rhs.
This function was introduced in Qt 6.7.
[noexcept, since 6.7] bool operator==(const QOpcUaElementOperand &lhs, const QOpcUaElementOperand
&rhs)Returns true if lhs has the same value as rhs.
This function was introduced in Qt 6.7.
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: