Reference
OpcClientApplication Members
Provides a base class for applications which host a client of the type T and connect it to the server when the application is run.
Reference
OpcClientApplication<T> Members
- Type
- OpcClientApplication<T>
- Namespace
- Opc.UaFx.Client
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
- Also in
- Opc.UaFx.Client
Inherits members from OpcApplication.
Constructors
OpcClientApplication
| Overload | Description |
|---|---|
| Opc | Initializes a new instance of the OpcT. |
| Opc | Initializes a new instance of the Opcclient specified. |
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| Invalid | An application has already been created on the current thread and has not yet been exited ( |
OpcClientApplication()
Initializes a new instance of the OpcClientApplication<T> class which hosts a new instance of the type T.
public OpcClientApplication()Public Sub New()OpcClientApplication(T)
Initializes a new instance of the OpcClientApplication<T> class using the client specified.
public OpcClientApplication(T client)Public Sub New(client As T)Parameters
| Name | Type | Description |
|---|---|---|
client | T | The client to host. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The client is a null reference ( |
Properties
Client
Gets the client hosted by the application.
public T Client { get; }Public ReadOnly Property Client As TProperty value
T
The instance of the type T hosted by the application.
Configuration
Gets the configuration of the Client.
public override OpcApplicationConfiguration Configuration { get; }Public Overrides ReadOnly Property Configuration As OpcApplicationConfigurationProperty value
The Configuration of the Client.
Overrides
Methods
ExitCore
Disconnects the Client from the server and raises the Exiting and Exited events.
protected override void ExitCore()Protected Overrides Sub ExitCore()Overrides
Remarks
The method disconnects the Client and raises the events only if the State of the Client is Connecting, Connected, Reconnecting or Reconnected. While the client connects, the method waits until connecting has completed. In a non-interactive environment (see UserInteractive) the method ends a waiting Run in any state, e.g. also if the client has been disconnected because reconnecting failed.
LoadConfigurationCore
Loads the client configuration from the configuration section with the configSectionName specified and assigns it to the Client.
protected override void LoadConfigurationCore(string configSectionName)Protected Overrides Sub LoadConfigurationCore(configSectionName As String)Parameters
| Name | Type | Description |
|---|---|---|
config | String | The name of the configuration section or a null reference (T. |
Overrides
RunCore
Connects the Client to the server and waits until the application exits.
protected override int RunCore()Protected Overrides Function RunCore() As IntegerReturns
The ExitCode.
Exceptions
| Exception | Condition |
|---|---|
| Invalid | The Client is connecting or connected to the server. |
Overrides
Remarks
The method connects the client only in the state Created or Disconnected; in any other state it returns at once. In an interactive environment (see UserInteractive) the method reports the result on the console, waits for a key and exits the application. Otherwise the method returns at once if connecting failed, without passing on the exception, and else waits until the application is exited.

