QOpcUaMonitoringParameters::EventFilter Class
class QOpcUaMonitoringParameters::EventFilter모니터링 대상 항목에 대한 EventFilter를 정의합니다. 더 보기...
공개 함수
| EventFilter(const QOpcUaMonitoringParameters::EventFilter &rhs) | |
| QList<QOpcUaSimpleAttributeOperand> | selectClauses() const |
| QList<QOpcUaSimpleAttributeOperand> & | selectClausesRef() |
| void | setSelectClauses(const QList<QOpcUaSimpleAttributeOperand> &selectClauses) |
| void | setWhereClause(const QList<QOpcUaContentFilterElement> &whereClause) |
| QList<QOpcUaContentFilterElement> | whereClause() const |
| QList<QOpcUaContentFilterElement> & | whereClauseRef() |
| operator const QVariant() | |
| QOpcUaMonitoringParameters::EventFilter & | operator<<(const QOpcUaContentFilterElement &whereClauseElement) |
| QOpcUaMonitoringParameters::EventFilter & | operator<<(const QOpcUaSimpleAttributeOperand &selectClauseElement) |
| QOpcUaMonitoringParameters::EventFilter & | operator=(const QOpcUaMonitoringParameters::EventFilter &rhs) |
| bool | operator==(const QOpcUaMonitoringParameters::EventFilter &rhs) const |
상세 설명
서버에서 이벤트를 모니터링하려면 이벤트 필터가 필요합니다. 이 필터는 ` select ` 절과 ` where ` 절로 구성됩니다.
select 절은 이벤트 발생 시 사용자가 수신하고자 하는 데이터를 지정하는 데 사용됩니다. 이 절은 이벤트 유형의 자식 노드 속성을 선택하는 QOpcUaSimpleAttributeOperand 단순 속성 피연산자(예: BaseEventType의 "Message" 속성 값)로 구성됩니다.
where 절은 특정 기준과 일치시키는 방식으로 보고되는 이벤트를 제한하는 데 사용됩니다. 여러 연산자와 네 가지 서로 다른 피연산자 유형을 통해 이벤트 유형의 자식 노드 속성 값을 기반으로 필터링할 수 있습니다.
필터는 setter 연산자나 스트리밍 연산자를 사용하여 구성할 수 있습니다. QOpcUaSimpleAttributeOperand 를 이벤트 필터로 스트리밍하면 필터에 새로운 ` select ` 절이 추가되며, ` QOpcUaContentFilterElement `가 ` where ` 절 뒤에 추가됩니다. 콘텐츠 필터 요소는 ` QOpcUaLiteralOperand`, ` QOpcUaElementOperand`, ` QOpcUaAttributeOperand ` 및 ` QOpcUaSimpleAttributeOperand ` 유형의 피연산자와 연산자를 콘텐츠 필터 요소로 스트리밍하여 구성할 수 있습니다. 마지막 연산자만 사용되며, 이전 연산자들은 무시됩니다.
다음 EventFilter는 “Severity” 필드의 값이 500 이상인 이벤트에 대해 “Message” 필드의 값을 보고하도록 서버에 지시합니다:
QOpcUaMonitoringParameters::EventFilter filter;
filter << QOpcUaSimpleAttributeOperand("Message"); // Select clause of the filter
QOpcUaContentFilterElement condition;
condition << QOpcUaContentFilterElement::FilterOperator::GreaterThanOrEqual;
condition << QOpcUaSimpleAttributeOperand("Severity");
condition << QOpcUaLiteralOperand(500, QOpcUa::Types::UInt16);
filter << condition; // Where clause of the filter두 가지 조건이 포함된 더 복잡한 예제는 QOpcUaElementOperand 를 참조하십시오.
멤버 함수 문서
EventFilter::EventFilter(const QOpcUaMonitoringParameters::EventFilter &rhs)
rhs 에서 이벤트 필터를 생성합니다.
QList<QOpcUaSimpleAttributeOperand> EventFilter::selectClauses() const
새 이벤트를 보고할 때 포함되어야 할 선택된 이벤트 필드를 반환합니다.
setSelectClauses()도 참조하십시오 .
QList<QOpcUaSimpleAttributeOperand> &EventFilter::selectClausesRef()
select 절에 대한 참조를 반환합니다.
void EventFilter::setSelectClauses(const QList<QOpcUaSimpleAttributeOperand> &selectClauses)
select 절을 selectClauses 로 설정합니다.
selectClauses()도 참조하십시오 .
void EventFilter::setWhereClause(const QList<QOpcUaContentFilterElement> &whereClause)
WHERE 절을 whereClause 로 설정합니다.
whereClause()도 참조하십시오 .
QList<QOpcUaContentFilterElement> EventFilter::whereClause() const
보고되는 이벤트를 특정 기준에 부합하는 이벤트로 제한하는 데 사용되는 콘텐츠 필터를 반환합니다.
setWhereClause()도 참조하십시오 .
QList<QOpcUaContentFilterElement> &EventFilter::whereClauseRef()
where 절에 대한 참조를 반환합니다.
whereClause()도 참조하십시오 .
EventFilter::operator const QVariant()
이 이벤트 필터를 ` QVariant`로 변환합니다.
QOpcUaMonitoringParameters::EventFilter &EventFilter::operator<<(const QOpcUaContentFilterElement &whereClauseElement)
이 이벤트 필터의 where 절에 콘텐츠 필터 요소 whereClauseElement 를 추가합니다.
QOpcUaMonitoringParameters::EventFilter &EventFilter::operator<<(const QOpcUaSimpleAttributeOperand &selectClauseElement)
이 콘텐츠 필터 요소의 select 절에 간단한 속성 피연산자 selectClauseElement 를 추가합니다.
QOpcUaMonitoringParameters::EventFilter &EventFilter::operator=(const QOpcUaMonitoringParameters::EventFilter &rhs)
이 이벤트 필터에 rhs 의 값을 설정합니다.
bool EventFilter::operator==(const QOpcUaMonitoringParameters::EventFilter &rhs) const
이 이벤트 필터의 값이 rhs 와 동일한 경우 true 를 반환합니다.
© 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.