QOpcUaElementOperand Class

OPC UA ElementOperand 유형. 더 보기...

헤더: #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)

상세 설명

ElementOperand 은 OPC UA 1.05 파트 4, 7.7.4.2에 정의되어 있습니다. 인덱스로 필터의 다른 요소를 식별하는 데 사용됩니다(첫 번째 요소는 인덱스가 0임).

예를 들어 ((Severity > 500) AND (Message == "TestString"))에서 AND 연산의 두 피연산자를 참조하는 등 복잡한 필터를 만드는 데 필요합니다. 첫 번째 단계는 (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()

기본값은 매개변수가 설정되지 않은 요소 피연산자를 구성합니다.

QOpcUaElementOperand::QOpcUaElementOperand(quint32 index)

인덱스가 있는 요소 피연산자를 구성합니다 index.

QOpcUaElementOperand::QOpcUaElementOperand(const QOpcUaElementOperand &rhs)

rhs 에서 요소 피연산자를 구성합니다.

quint32 QOpcUaElementOperand::index() const

피연산자로 사용할 필터 요소의 인덱스를 반환합니다.

setIndex()도 참조하세요 .

void QOpcUaElementOperand::setIndex(quint32 index)

피연산자로 사용할 필터 요소의 인덱스를 index 로 설정합니다.

index()도 참조하세요 .

QVariant QOpcUaElementOperand::operator QVariant() const

이 요소 피연산자를 QVariant 로 변환합니다.

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

이 요소 피연산자에 rhs 의 값을 설정합니다.

관련 비회원

[noexcept, since 6.7] bool operator!=(const QOpcUaElementOperand &lhs, const QOpcUaElementOperand &rhs)

lhsrhs 과 다른 값이면 true 을 반환합니다.

이 함수는 Qt 6.7에 도입되었습니다.

[noexcept, since 6.7] bool operator==(const QOpcUaElementOperand &lhs, const QOpcUaElementOperand &rhs)

lhsrhs 과 같은 값이면 true 을 반환합니다.

이 함수는 Qt 6.7에 도입되었습니다.

© 2025 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.