ElementOperand QML Type

OPC UA 엘리먼트 오퍼랜드 유형입니다. 더 보기...

Import Statement: import QtOpcUa
Since: QtOpcUa 5.13

속성

상세 설명

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

피연산자로 사용할 필터 요소의 인덱스입니다.


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