QOpcUaContentFilterElement Class

The OPC UA ContentFilterElement. More...

Header: #include <QOpcUaContentFilterElement>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua

Public Types

enum FilterOperator { Equals, IsNull, GreaterThan, LessThan, GreaterThanOrEqual, …, BitwiseOr }

Public Functions

QOpcUaContentFilterElement(const QOpcUaContentFilterElement &rhs)
QOpcUaContentFilterElement &operator=(const QOpcUaContentFilterElement &rhs)
QList<QVariant> filterOperands() const
QList<QVariant> &filterOperandsRef()
QOpcUaContentFilterElement::FilterOperator filterOperator() const
void setFilterOperands(const QList<QVariant> &filterOperands)
void setFilterOperator(QOpcUaContentFilterElement::FilterOperator filterOperator)
QVariant operator QVariant() const
QOpcUaContentFilterElement &operator<<(QOpcUaContentFilterElement::FilterOperator op)
QOpcUaContentFilterElement &operator<<(const QOpcUaSimpleAttributeOperand &op)
QOpcUaContentFilterElement &operator<<(const QOpcUaAttributeOperand &op)
QOpcUaContentFilterElement &operator<<(const QOpcUaLiteralOperand &op)
QOpcUaContentFilterElement &operator<<(const QOpcUaElementOperand &op)
bool operator==(const QOpcUaContentFilterElement &rhs) const

Detailed Description

A content filter element contains an operator and a list of operands. There are four different operator types which contain literal values, references to attributes of nodes or to other content filter elements.

A combination of one or more content filter elements makes a content filter which is used by the server to filter data for the criteria defined by the content filter elements. For example, the where clause of an event filter is a content filter which is used to decide if a notification is generated for an event.

Member Type Documentation

enum QOpcUaContentFilterElement::FilterOperator

FilterOperator enumerates all possible operators for a ContentFilterElement that are specified in OPC-UA part 4, Tables 115 and 116.

ConstantValue
QOpcUaContentFilterElement::Equals0
QOpcUaContentFilterElement::IsNull1
QOpcUaContentFilterElement::GreaterThan2
QOpcUaContentFilterElement::LessThan3
QOpcUaContentFilterElement::GreaterThanOrEqual4
QOpcUaContentFilterElement::LessThanOrEqual5
QOpcUaContentFilterElement::Like6
QOpcUaContentFilterElement::Not7
QOpcUaContentFilterElement::Between8
QOpcUaContentFilterElement::InList9
QOpcUaContentFilterElement::And10
QOpcUaContentFilterElement::Or11
QOpcUaContentFilterElement::Cast12
QOpcUaContentFilterElement::InView13
QOpcUaContentFilterElement::OfType14
QOpcUaContentFilterElement::RelatedTo15
QOpcUaContentFilterElement::BitwiseAnd16
QOpcUaContentFilterElement::BitwiseOr17

Member Function Documentation

QOpcUaContentFilterElement::QOpcUaContentFilterElement(const QOpcUaContentFilterElement &rhs)

Constructs a content filter element from rhs.

QOpcUaContentFilterElement &QOpcUaContentFilterElement::operator=(const QOpcUaContentFilterElement &rhs)

Sets the values from rhs in this content filter element.

QList<QVariant> QOpcUaContentFilterElement::filterOperands() const

Returns the operands of the filter element.

See also setFilterOperands().

QList<QVariant> &QOpcUaContentFilterElement::filterOperandsRef()

Returns a reference to the filter operands.

See also filterOperands().

QOpcUaContentFilterElement::FilterOperator QOpcUaContentFilterElement::filterOperator() const

Returns the filter operator.

See also setFilterOperator().

void QOpcUaContentFilterElement::setFilterOperands(const QList<QVariant> &filterOperands)

Sets the filter operands for this content filter element to filterOperands. Supported classes are QOpcUaElementOperand, QOpcUaLiteralOperand, QOpcUaSimpleAttributeOperand and QOpcUaAttributeOperand.

See also filterOperands().

void QOpcUaContentFilterElement::setFilterOperator(QOpcUaContentFilterElement::FilterOperator filterOperator)

Sets the operator that is applied to the filter operands to filterOperator.

See also filterOperator().

QVariant QOpcUaContentFilterElement::operator QVariant() const

Converts this content filter element to QVariant.

QOpcUaContentFilterElement &QOpcUaContentFilterElement::operator<<(QOpcUaContentFilterElement::FilterOperator op)

Sets filter operator op in this content filter element. If multiple operators are streamed into one content filter element, only the last operator is used. All others are discarded.

QOpcUaContentFilterElement &QOpcUaContentFilterElement::operator<<(const QOpcUaSimpleAttributeOperand &op)

Adds the simple attribute operand op to the operands list of this content filter element.

QOpcUaContentFilterElement &QOpcUaContentFilterElement::operator<<(const QOpcUaAttributeOperand &op)

Adds the attribute operand op to the operands list of this content filter element.

QOpcUaContentFilterElement &QOpcUaContentFilterElement::operator<<(const QOpcUaLiteralOperand &op)

Adds the literal operand op to the operands list of this content filter element.

QOpcUaContentFilterElement &QOpcUaContentFilterElement::operator<<(const QOpcUaElementOperand &op)

Adds the element operand op to the operands list of this content filter element.

bool QOpcUaContentFilterElement::operator==(const QOpcUaContentFilterElement &rhs) const

Returns true if this content filter element has the same value as rhs.