QOpcUaErrorState allows investigation and interaction with error state from backends. More...
Header: | #include <QOpcUaErrorState> |
qmake: | QT += opcua |
Since: | QtOpcUa 5.13 |
enum class | ConnectionStep { Unknown, CertificateValidation, OpenSecureChannel, CreateSession, ActivateSession } |
QOpcUaErrorState(const QOpcUaErrorState &other) | |
QOpcUaErrorState & | operator=(const QOpcUaErrorState &rhs) |
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) |
There is not need to instatiate this class in your code. A client will emit an error state via QOpcUaClient::connectError in case an error has happend while establishing a connection.
The error can be caused by the backend itself or by the server rejecting the connection. If case of errors issued by the local backend, they can be ignored by calling the function setIgnoreError().
Specifies at which step during the connection establishment the error occurred.
Constant | Value | Description |
---|---|---|
QOpcUaErrorState::ConnectionStep::Unknown |
0x00 |
The connection step is unknown. |
QOpcUaErrorState::ConnectionStep::CertificateValidation |
0x1 |
Error happened in the certificate validation step. |
QOpcUaErrorState::ConnectionStep::OpenSecureChannel |
0x2 |
Error happened when opening the secure channel. |
QOpcUaErrorState::ConnectionStep::CreateSession |
0x3 |
Error happened when creating the session. |
QOpcUaErrorState::ConnectionStep::ActivateSession |
0x4 |
Error happened during session acivation. |
Constructs an error state from other.
Sets the values of rhs in this error state.
Returns the connection step in which the error occurred.
See also setConnectionStep().
Returns the OPC UA status code of the error occurred.
See also setErrorCode().
Returns if this client side error should be ignored.
See also setIgnoreError().
Returns if the occurred error is a client side error.
Sets if the occurred error is a client side error to clientSideError.
See also isClientSideError().
Sets the connection step in which the error occurred to step.
See also connectionStep().
Sets the OPC UA status code of the error occurred to error.
See also errorCode().
Sets if this client side error should be ignored to ignore.
Setting this flag does only work if the error is actually a client side error.
See also ignoreError().
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.2/qopcuaerrorstate.html