EventFilter QML Type
모니터링 대상 항목에 대한 EventFilter를 정의합니다. 더 보기...
| Import Statement: | import QtOpcUa |
| Since: | QtOpcUa 5.13 |
| Status: | Deprecated since 6.9 |
이 타입은 QtOpcUa 6.9부터 더 이상 사용되지 않습니다. 새로운 코드에서는 이 타입을 사용하지 않는 것을 강력히 권장합니다.
속성
상세 설명
서버에서 이벤트를 모니터링하려면 이벤트 필터가 필요합니다. 이 필터는 ` select ` 절과 ` where ` 절로 구성됩니다.
select 절은 이벤트 발생 시 사용자가 수신하고자 하는 데이터를 지정하는 데 사용됩니다. 이 절은 SimpleAttributeOperand 단순 속성 피연산자로 구성되며, 이벤트 유형의 자식 노드 속성을 선택합니다(예: BaseEventType의 "Message" 속성 값).
where 절은 특정 기준과 일치시켜 보고되는 이벤트를 제한하는 데 사용됩니다. 여러 연산자와 네 가지 유형의 피연산자를 통해 이벤트 유형의 자식 노드 속성 값을 기반으로 필터링할 수 있습니다.
select 절은 SimpleAttributeOperand 의 배열로 구성됩니다. where 절은 SimpleAttributeOperand, LiteralOperand, ElementOperand 또는 AttributeOperand 의 배열로 구성됩니다.
다음 EventFilter는 "Severity" 필드의 값이 500 이상인 이벤트에 대해 "Message" 필드의 값을 보고하도록 서버에 지시합니다:
import QtOpcUa as QtOpcUa
QtOpcUa.Node {
...
eventFilter: QtOpcUa.EventFilter {
select: [
QtOpcUa.SimpleAttributeOperand {
browsePath: [
QtOpcUa.NodeId {
identifier: "Severity"
ns: "http://opcfoundation.org/UA/"
}
]
},
QtOpcUa.SimpleAttributeOperand {
browsePath: [
QtOpcUa.NodeId {
identifier: "Message"
ns: "http://opcfoundation.org/UA/"
}
]
}
]
where: [
QtOpcUa.FilterElement {
operator: QtOpcUa.FilterElement.GreaterThanOrEqual
firstOperand: QtOpcUa.SimpleAttributeOperand {
browsePath: [
QtOpcUa.NodeId {
identifier: "Severity"
ns: "http://opcfoundation.org/UA/"
}
]
}
secondOperand: QtOpcUa.LiteralOperand {
value: 700
type: QtOpcUa.Constants.UInt16
}
}
]
}
}두 가지 조건이 포함된 더 복잡한 예제는 QOpcUaElementOperand 를 참조하십시오.
FilterElement도 참조하십시오 .
속성 설명서
select : list<SimpleAttributeOperand>
새로운 이벤트를 보고할 때 포함되어야 할 선택된 이벤트 필드.
where : list<FilterElement>
보고된 이벤트를 특정 기준에 부합하는 이벤트로만 제한하는 데 사용되는 콘텐츠 필터.
© 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.