class QOpcUaErrorState

QOpcUaErrorState allows investigation and interaction with error state from backends. More

Synopsis

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

There is not need to instantiate this class in your code. A client will emit an error state via connectError in case an error has happened 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() .

class ConnectionStep

Specifies at which step during the connection establishment the error occurred.

Constant

Description

QOpcUaErrorState.ConnectionStep.Unknown

The connection step is unknown.

QOpcUaErrorState.ConnectionStep.CertificateValidation

Error happened in the certificate validation step.

QOpcUaErrorState.ConnectionStep.OpenSecureChannel

Error happened when opening the secure channel.

QOpcUaErrorState.ConnectionStep.CreateSession

Error happened when creating the session.

QOpcUaErrorState.ConnectionStep.ActivateSession

Error happened during session acivation.

__init__()

Default constructs an error state with no parameters set.

__init__(other)
Parameters:

otherQOpcUaErrorState

Constructs an error state from other.

connectionStep()
Return type:

ConnectionStep

Returns the connection step in which the error occurred.

errorCode()
Return type:

UaStatusCode

Returns the OPC UA status code of the error occurred.

See also

setErrorCode()

ignoreError()
Return type:

bool

Returns if this client side error should be ignored.

See also

setIgnoreError()

isClientSideError()
Return type:

bool

Returns if the occurred error is a client side error.

setClientSideError(clientSideError)
Parameters:

clientSideError – bool

Sets if the occurred error is a client side error to clientSideError.

setConnectionStep(step)
Parameters:

stepConnectionStep

Sets the connection step in which the error occurred to step.

See also

connectionStep()

setErrorCode(error)
Parameters:

errorUaStatusCode

Sets the OPC UA status code of the error occurred to error.

See also

errorCode()

setIgnoreError([ignore=true])
Parameters:

ignore – bool

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()