QOpcUaErrorState Class
QOpcUaErrorStateは、バックエンドからのエラー状態の調査と相互作用を可能にします。詳細...
ヘッダ | #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::Unknown | 0x00 | 接続ステップは不明です。 |
QOpcUaErrorState::ConnectionStep::CertificateValidation | 0x1 | 証明書の検証ステップでエラーが発生した。 |
QOpcUaErrorState::ConnectionStep::OpenSecureChannel | 0x2 | セキュアチャネルを開くときにエラーが発生しました。 |
QOpcUaErrorState::ConnectionStep::CreateSession | 0x3 | セッション作成時にエラーが発生しました。 |
QOpcUaErrorState::ConnectionStep::ActivateSession | 0x4 | セッションのアクティベーション中にエラーが発生しました。 |
メンバー関数ドキュメント
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.