OpcClientKeepAlive Members

Namespace: Opc.UaFx.Client
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcClientKeepAlive type exposes the following members.

DefaultInterval

Represents the default interval value that is used by the OpcClientKeepAlive as initial value of the Interval property.

C#

public static readonly int DefaultInterval


Field Value
Int32

Updated

Occurs when a keep alive cycle completed and therefore the ServerState, Time, Exception and Status properties were updated accordingly.

C#

public event EventHandler Updated


Remarks

In general this event is raised whenever a keep alive period elapses (see Interval) or an abnormal connection state is detected.

Exception

Gets the exception information associated with the Status represented by the current OpcClientKeepAlive.

C#

public OpcException Exception { get; }


Property Value

OpcException

An instance of the OpcException class in case there the IsBad is equals true for the Status offered; otherwise a null reference (Nothing in Visual Basic).

Interval

Gets or sets the interval to control the period within the client shall “ping” the server to test (= keep alive) whether the connection is still established and working.

C#

public int Interval { get; set; }


Property Value

Int32

The number of milliseconds used to “ping” / test the connection. The default value is DefaultInterval.



Remarks

This interval controls how much time elapses before a communication error is detected. In case there is no abnormality detected the Updated event is raised each time this period elapses.

IsActive

Gets a value indicating whether the keep alive mechanism is active and works on a healthy and established connection.

C#

public bool IsActive { get; }


Property Value

Boolean

The value true if the keep alive is mechanism is active; otherwise the value false.

Message

Gets a value which describes the most recent outcome of the keep alive mechanism.

C#

public string Message { get; }


Property Value

String

A String which either offeres the textual representation of the Code of the Status (if IsBad of Status is equals false) or the Message (alternatively the Description of the Status) in case there IsBad of Status is equals true.

ServerState

Gets a value indicating the most recent known state of the server.

C#

public OpcServerState ServerState { get; }


Property Value

OpcServerState

One of the members defined by the OpcServerState enumeration.



Remarks

The value of this property is determined during the keep alive progress and represents the value published by the server using the value of the node known under the browse path '/Server/ServerStatus/State'.

Status

Gets the status information associated with the most recent outcome of the keep alive operation.

C#

public OpcStatus Status { get; }


Property Value

OpcStatus

An instance of the OpcStatus class which offers additional information about the outcome of the most recent keep alive operation.

Time

Gets the time at which the server did respond on the most recent sent keep alive message.

C#

public DateTime? Time { get; }


Property Value

Nullable<DateTime>

The DateTime at which the server did respond to the most recent keep alive request or a null reference (Nothing in Visual Basic) if there is no connection established to a server.

OnUpdated(EventArgs)

Raises the Updated event of the OpcClientKeepAlive.

C#

protected virtual void OnUpdated(EventArgs e)


Parameters

e EventArgs

The event data.

ToString()

Returns a string representing the most recent Time and Message offered by the most recent keep alive operation.

C#

public override string ToString()


Returns

String

A string formatted using the CultureInfo.InvariantCulture representing the Time and Message of the current OpcClientKeepAlive.

ToString(IFormatProvider)

Returns a string representing the most recent Time and Message offered by the most recent keep alive operation formatted using the provider specified.

C#

public string ToString(IFormatProvider provider)


Parameters

provider IFormatProvider

The IFormatProvider to use to format the Time.


Returns

String

A string formatted using the provider specified representing the Time and Message of the current OpcClientKeepAlive.