QOpcUaErrorState Class

QOpcUaErrorState를 사용하면 백엔드에서 오류 상태를 조사하고 상호 작용할 수 있습니다. 더 보기...

Header: #include <QOpcUaErrorState>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua
이후: QtOpcUa 5.13

공용 형

enum class ConnectionStep { Unknown, CertificateValidation, OpenSecureChannel, CreateSession, ActivateSession }

공용 함수

QOpcUaErrorState()
QOpcUaErrorState(const QOpcUaErrorState &other)
QOpcUaErrorState::ConnectionStep connectionStep() const
QOpcUa::UaStatusCode errorCode() const
bool ignoreError() const
bool isClientSideError() const
void setClientSideError(bool clientSideError)
void setConnectionStep(QOpcUaErrorState::ConnectionStep step)
void setErrorCode(QOpcUa::UaStatusCode error)
void setIgnoreError(bool ignore = true)
QOpcUaErrorState &operator=(const QOpcUaErrorState &rhs)

상세 설명

코드에서 이 클래스를 인스턴스화할 필요는 없습니다. 클라이언트는 연결을 설정하는 동안 오류가 발생한 경우 QOpcUaClient::connectError 을 통해 오류 상태를 전송합니다.

오류는 백엔드 자체 또는 서버가 연결을 거부하여 발생할 수 있습니다. 로컬 백엔드에서 발생한 오류의 경우 setIgnoreError() 함수를 호출하여 무시할 수 있습니다.

회원 유형 문서

enum class QOpcUaErrorState::ConnectionStep

연결 설정 중 어느 단계에서 오류가 발생했는지 지정합니다.

상수설명
QOpcUaErrorState::ConnectionStep::Unknown0x00연결 단계를 알 수 없습니다.
QOpcUaErrorState::ConnectionStep::CertificateValidation0x1인증서 유효성 검사 단계에서 오류가 발생했습니다.
QOpcUaErrorState::ConnectionStep::OpenSecureChannel0x2보안 채널을 열 때 오류가 발생했습니다.
QOpcUaErrorState::ConnectionStep::CreateSession0x3세션을 만드는 동안 오류가 발생했습니다.
QOpcUaErrorState::ConnectionStep::ActivateSession0x4세션 활성화 중에 오류가 발생했습니다.

멤버 기능 문서

QOpcUaErrorState::QOpcUaErrorState()

기본값은 매개변수가 설정되지 않은 오류 상태를 구성합니다.

QOpcUaErrorState::QOpcUaErrorState(const QOpcUaErrorState &other)

other 에서 오류 상태를 구성합니다.

QOpcUaErrorState::ConnectionStep QOpcUaErrorState::connectionStep() const

오류가 발생한 연결 단계를 반환합니다.

setConnectionStep()도 참조하세요 .

QOpcUa::UaStatusCode QOpcUaErrorState::errorCode() const

발생한 오류의 OPC UA 상태 코드를 반환합니다.

setErrorCode()도 참조하세요 .

bool QOpcUaErrorState::ignoreError() const

이 클라이언트 측 오류를 무시해야 하는 경우 반환합니다.

setIgnoreError()도 참조하세요 .

bool QOpcUaErrorState::isClientSideError() const

발생한 오류가 클라이언트 측 오류인 경우 반환합니다.

void QOpcUaErrorState::setClientSideError(bool clientSideError)

발생한 오류가 클라이언트 측 오류인지 여부를 clientSideError 로 설정합니다.

isClientSideError()도 참조하세요 .

void QOpcUaErrorState::setConnectionStep(QOpcUaErrorState::ConnectionStep step)

오류가 발생한 연결 단계를 step 으로 설정합니다.

connectionStep()도 참조하세요 .

void QOpcUaErrorState::setErrorCode(QOpcUa::UaStatusCode error)

발생한 오류의 OPC UA 상태 코드를 error 로 설정합니다.

errorCode()도 참조하세요 .

void QOpcUaErrorState::setIgnoreError(bool ignore = true)

이 클라이언트 측 오류를 무시할지 여부를 ignore 로 설정합니다.

이 플래그를 설정하면 오류가 실제로 클라이언트 측 오류인 경우에만 작동합니다.

ignoreError()도 참조하세요 .

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

이 오류 상태의 rhs 값을 설정합니다.

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