Namespace: Opc.UaFx.Client
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcClientKeepAlive type exposes the following members.
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
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.
Gets the exception information associated with the Status represented by the current OpcClientKeepAlive.
C#
public OpcException Exception { get; }
Property Value
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).
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
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.
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
The value true if the keep alive is mechanism is active; otherwise the value false.
Gets a value which describes the most recent outcome of the keep alive mechanism.
C#
public string Message { get; }
Property Value
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.
Gets a value indicating the most recent known state of the server.
C#
public OpcServerState ServerState { get; }
Property Value
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'.
Gets the time at which the server did respond on the most recent sent keep alive message.
C#
public DateTime? Time { get; }
Property Value
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.
Raises the Updated event of the OpcClientKeepAlive.
C#
protected virtual void OnUpdated(EventArgs e)
Parameters
The event data.
Returns a string representing the most recent Time and Message offered by the most recent keep alive operation.
C#
public override string ToString()
Returns
A string formatted using the CultureInfo.InvariantCulture representing the Time and Message of the current OpcClientKeepAlive.
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
A string formatted using the provider
specified representing the Time and Message of the current OpcClientKeepAlive.