QOpcUaErrorState#

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

Synopsis#

Functions#

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 PySide6.QtOpcUa.QOpcUaErrorState#

PySide6.QtOpcUa.QOpcUaErrorState(other)

Parameters:

otherPySide6.QtOpcUa.QOpcUaErrorState

Default constructs an error state with no parameters set.

Constructs an error state from other.

PySide6.QtOpcUa.QOpcUaErrorState.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.

PySide6.QtOpcUa.QOpcUaErrorState.connectionStep()#
Return type:

ConnectionStep

Returns the connection step in which the error occurred.

PySide6.QtOpcUa.QOpcUaErrorState.errorCode()#
Return type:

UaStatusCode

Returns the OPC UA status code of the error occurred.

See also

setErrorCode()

PySide6.QtOpcUa.QOpcUaErrorState.ignoreError()#
Return type:

bool

Returns if this client side error should be ignored.

See also

setIgnoreError()

PySide6.QtOpcUa.QOpcUaErrorState.isClientSideError()#
Return type:

bool

Returns if the occurred error is a client side error.

PySide6.QtOpcUa.QOpcUaErrorState.setClientSideError(clientSideError)#
Parameters:

clientSideError – bool

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

PySide6.QtOpcUa.QOpcUaErrorState.setConnectionStep(step)#
Parameters:

stepConnectionStep

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

See also

connectionStep()

PySide6.QtOpcUa.QOpcUaErrorState.setErrorCode(error)#
Parameters:

errorUaStatusCode

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

See also

errorCode()

PySide6.QtOpcUa.QOpcUaErrorState.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()