QOpcUaErrorState allows investigation and interaction with error state from backends. 更多...
头: | #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.
常量 | 值 | 描述 |
---|---|---|
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.
另请参阅 setConnectionStep ().
Returns the OPC UA status code of the error occurred.
另请参阅 setErrorCode ().
Returns if this client side error should be ignored.
另请参阅 setIgnoreError ().
Returns if the occurred error is a client side error.
Sets if the occurred error is a client side error to clientSideError .
另请参阅 isClientSideError ().
Sets the connection step in which the error occurred to step .
另请参阅 connectionStep ().
Sets the OPC UA status code of the error occurred to error .
另请参阅 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.
另请参阅 ignoreError ().