Reference
OpcClientKeepAlive Members
Provides keep-alive options used by a client to monitor an established connection and recover from unexpected disconnection.
Reference
OpcClientKeepAlive Members
- Type
- OpcClientKeepAlive
- Namespace
- Opc.UaFx.Client
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
- Also in
- Opc.UaFx.Client
Fields
DefaultInterval
Represents the default interval value that is used by the OpcClientKeepAlive as initial value of the Interval property.
public static readonly int DefaultIntervalPublic Shared ReadOnly DefaultInterval As IntegerField value
Properties
Exception
Gets the exception information associated with the Status represented by the current OpcClientKeepAlive.
public OpcException Exception { get; }Public ReadOnly Property Exception As OpcExceptionProperty 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).
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.
public int Interval { get; set; }Public Property Interval As IntegerProperty 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.
IsActive
Gets a value indicating whether the keep alive mechanism is active and works on a healthy and established connection.
public bool IsActive { get; }Public ReadOnly Property IsActive As BooleanProperty value
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.
public string Message { get; }Public ReadOnly Property Message As StringProperty 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.
ServerState
Gets a value indicating the most recent known state of the server.
public OpcServerState ServerState { get; }Public ReadOnly Property ServerState As OpcServerStateProperty 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'.
Status
Gets the status information associated with the most recent outcome of the keep alive operation.
public OpcStatus Status { get; }Public ReadOnly Property Status As OpcStatusProperty value
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.
public DateTime? Time { get; }Public ReadOnly Property Time As Date?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.
Methods
OnUpdated
Raises the Updated event of the OpcClientKeepAlive.
protected virtual void OnUpdated(EventArgs e)Protected Overridable Sub OnUpdated(e As EventArgs)Parameters
| Name | Type | Description |
|---|---|---|
e | EventArgs | The event data. |
ToString
| Overload | Description |
|---|---|
| ToString() | Returns a string representing the most recent Time and Message offered by the most recent keep alive operation. |
| ToString( | Returns a string representing the most recent Time and Message offered by the most recent keep alive operation formatted using the provider specified. |
ToString()
Returns a string representing the most recent Time and Message offered by the most recent keep alive operation.
public override string ToString()Public Overrides Function ToString() As StringReturns
A string formatted using the InvariantCulture representing the Time and Message of the current OpcClientKeepAlive.
Overrides
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.
public string ToString(IFormatProvider provider)Public Function ToString(provider As IFormatProvider) As StringParameters
| Name | Type | Description |
|---|---|---|
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.
Events
Updated
Occurs when a keep alive cycle completed and therefore the ServerState, Time, Exception and Status properties were updated accordingly.
public event EventHandler UpdatedPublic Event Updated As EventHandlerEvent type
Remarks
In general this event is raised whenever a keep alive period elapses (see Interval) or an abnormal connection state is detected.

