Spec-Zone.ru › Qt 6.1

Класс QOpcUaElementOperand

Тип OPC UA ElementOperand. Подробнее...

Заголовок: #include <QOpcUaElementOperand>
qmake: QT += opcua
  • Список всех членов, включая унаследованные

Открытые функции

QOpcUaElementOperand(quint32 index)
QOpcUaElementOperand(const QOpcUaElementOperand &rhs)
QOpcUaElementOperand & operator=(const QOpcUaElementOperand &rhs)
quint32 index() const
void setIndex(quint32 index)
QVariant operator QVariant() const

Подробное описание

Тип ElementOperand определён в разделе OPC-UA часть 4, 7.4.4.2. Он используется для идентификации другого элемента в фильтре по его индексу (первый элемент имеет индекс 0).

Это необходимо для создания сложных фильтров, например, для ссылки на два операнда операции AND в ((Severity > 500) AND (Message == "TestString")). Первый шаг — создание элементов фильтра содержимого для двух условий (Severity > 500) и (Message == "TestString"). Третий элемент фильтра содержимого необходим для создания комбинации AND из двух условий. Он состоит из оператора AND и двух операндов элемента с индексами двух условий, созданных ранее:

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;

Документация по членам-функциям

QOpcUaElementOperand::QOpcUaElementOperand(quint32 index)

Создаёт операнд элемента с индексом index.

QOpcUaElementOperand::QOpcUaElementOperand(const QOpcUaElementOperand &rhs)

Создаёт операнд элемента из rhs.

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

Устанавливает значения из rhs в этот операнд элемента.

quint32 QOpcUaElementOperand::index() const

Возвращает индекс элемента фильтра, который будет использоваться в качестве операнда.

См. также setIndex().

void QOpcUaElementOperand::setIndex(quint32 index)

Устанавливает индекс элемента фильтра, который будет использоваться в качестве операнда, в index.

См. также index().

QVariant QOpcUaElementOperand::operator QVariant() const

Преобразует этот операнд элемента в QVariant.

© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.1/qopcuaelementoperand.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API