이 페이지에서

ElementOperand QML Type

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

Import Statement: import QtOpcUa
Since: QtOpcUa 5.13
Status: Deprecated since 6.9

이 타입은 QtOpcUa 6.9부터 더 이상 사용되지 않습니다. 새로운 코드에서는 이 타입을 사용하지 않는 것을 강력히 권장합니다.

속성

상세 설명

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

이는 복잡한 필터를 생성하는 데 필수적이며, 예를 들어 ((Severity > 500) AND (Message == "TestString"))에서 AND 연산의 두 피연산자를 참조하는 데 사용됩니다. 첫 번째 단계는 두 조건(Severity > 500)과 (Message == "TestString")에 대한 콘텐츠 필터 요소를 생성하는 것입니다. 두 조건을 AND 연산으로 결합하려면 세 번째 콘텐츠 필터 요소가 필요합니다. 이 요소는 AND 연산자와 앞서 생성된 두 조건의 인덱스를 가진 두 개의 요소 피연산자로 구성됩니다:

import QtOpcUa as QtOpcUa

QtOpcUa.EventFilter {
    select : [ ... ]
    where: [
        QtOpcUa.FilterElement {
            operator: QtOpcUa.FilterElement.GreaterThan
            firstOperand: QtOpcUa.SimpleAttributeOperand {
                browsePath: [
                    QtOpcUa.NodeId {
                        identifier: "Severity"
                        ns: "http://opcfoundation.org/UA/"
                    }
                ]
            }
            secondOperand: QtOpcUa.LiteralOperand {
                value: 500
                type: QtOpcUa.Constants.UInt16
            }
        }
        QtOpcUa.FilterElement {
            operator: QtOpcUa.FilterElement.Equals
            firstOperand: QtOpcUa.SimpleAttributeOperand {
                browsePath: [
                    QtOpcUa.NodeId {
                        identifier: "Message"
                        ns: "http://opcfoundation.org/UA/"
                    }
                ]
            }
            secondOperand: QtOpcUa.LiteralOperand {
                value: "TestString"
                type: QtOpcUa.Constants.String
            }
        }
        QtOpcUa.FilterElement {
            operator: QtOpcUa.FilterElement.And
            firstOperand: QtOpcUa.ElementOperand {
                index: 0
            }
            secondOperand: QtOpcUa.ElementOperand {
                index: 1
            }
        }
    ]
}

속성 설명서

index : int

연산자로 사용될 필터 요소의 인덱스.

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