Reference
OpcClient.State Property
Gets a value that indicates the current state of the client regarding its channel used to communicate with the endpoint defined by ServerAddress and EndpointPolicy setup via Security.
Reference
OpcClient.State Property
- Type
- OpcClient
- Namespace
- Opc.UaFx.Client
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
- Members
- OpcClient Members
- Also in
- Opc.UaFx.Client
Gets a value that indicates the current state of the client regarding its channel used to communicate with the endpoint defined by ServerAddress and EndpointPolicy setup via Security.
public OpcClientState State { get; }Public ReadOnly Property State As OpcClientStateProperty value
One of the members defined by the OpcClientState enumeration. Which specifies the current state of the client. The initial value of this property is Created. Any subsequent transition of the value of this property will never change the value of this property back to its initial value (= Created).
Remarks
Depending on the current state different actions are either allowed, disallowed or functional on the current OpcClient instance.
A lost connection is detected by a failing keep-alive of the session or by a service call that fails because the channel or the session is gone, for example with BadConnectionClosed or, after the server restarted, BadSessionIdInvalid. Then the client changes to Reconnecting and reconnects if ReconnectInterval is greater than zero, or changes to Disconnected and raises BreakDetected otherwise, both before the failing call returns. This requires UseBreakDetection, which is enabled by default.
While the server cannot be reached at all, a service call waits for the operation timeout before it fails, and the keep-alive detects the break in the meantime.

