Reference
OpcClassicDiscoveryClient Members
Represents a client which discovers the OPC Classic servers registered on a host.
Reference
OpcClassicDiscoveryClient Members
- Type
- OpcClassicDiscoveryClient
- Namespace
- Opc.UaFx.Client.Classic
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
Constructors
OpcClassicDiscoveryClient
| Overload | Description |
|---|---|
| Opc | Initializes a new instance of the Opc |
| Opc | Initializes a new instance of the Opchost specified. |
| Opc | Initializes a new instance of the Opchost and hostIdentity specified. |
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| OpcException | Connecting to the host failed; for more details see exception details. |
OpcClassicDiscoveryClient()
Initializes a new instance of the OpcClassicDiscoveryClient class which discovers the servers on the local host.
public OpcClassicDiscoveryClient()Public Sub New()OpcClassicDiscoveryClient(string)
Initializes a new instance of the OpcClassicDiscoveryClient class using the host specified.
public OpcClassicDiscoveryClient(string host)Public Sub New(host As String)Parameters
| Name | Type | Description |
|---|---|---|
host | String | The name or address of the host whose servers are to be discovered. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The host is an empty string. |
| Argument | The host is a null reference ( |
OpcClassicDiscoveryClient(string, OpcClassicIdentity)
Initializes a new instance of the OpcClassicDiscoveryClient class using the host and hostIdentity specified.
public OpcClassicDiscoveryClient(string host, OpcClassicIdentity hostIdentity)Public Sub New(host As String, hostIdentity As OpcClassicIdentity)Parameters
| Name | Type | Description |
|---|---|---|
host | String | The name or address of the host whose servers are to be discovered. |
hostIdentity | Opc | The Opc |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The host is an empty string. |
| Argument | The host is a null reference ( |
Properties
Host
Gets the name or address of the host whose servers are discovered.
public string Host { get; }Public ReadOnly Property Host As StringProperty value
The host specified when the OpcClassicDiscoveryClient was created; "localhost" if none was specified.
HostIdentity
Gets the identity used to connect to the host.
public OpcClassicIdentity HostIdentity { get; }Public ReadOnly Property HostIdentity As OpcClassicIdentityProperty value
The OpcClassicIdentity specified when the OpcClassicDiscoveryClient was created or a null reference (Nothing in Visual Basic) if the client connects without an explicit identity.
Methods
Close
Closes the connection to the host.
public OpcStatus Close()Public Function Close() As OpcStatusReturns
An OpcStatus with the code Good if the connection has been closed; otherwise with the code Bad.
Remarks
The method does not throw an exception in case closing the connection fails.
DiscoverEndpoints
Discovers the endpoints of the servers on the host for all OPC Classic interfaces known.
public OpcClassicEndpointDescriptionCollection DiscoverEndpoints()Public Function DiscoverEndpoints() As OpcClassicEndpointDescriptionCollectionReturns
OpcClassicEndpointDescriptionCollection
An OpcClassicEndpointDescriptionCollection with one description per server. The Interfaces of a description provide the interfaces the server has been discovered with.
Exceptions
| Exception | Condition |
|---|---|
| OpcException | Discovering the servers failed; for more details see exception details. |
DiscoverServers
| Overload | Description |
|---|---|
| DiscoverServers() | Discovers the servers on the host which implement the OPC Classic specification AE 1. |
| DiscoverServers( | Discovers the servers on the host which implement one of the interface specified. |
| DiscoverServers( | Discovers the servers on the host which implement one of the interface specified. |
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| OpcException | Discovering the servers failed; for more details see exception details. |
DiscoverServers()
Discovers the servers on the host which implement the OPC Classic specification AE 1.0, DA 1.0, DA 2.0, DA 3.0 or HDA 1.0.
public OpcClassicApplicationDescriptionCollection DiscoverServers()Public Function DiscoverServers() As OpcClassicApplicationDescriptionCollectionReturns
OpcClassicApplicationDescriptionCollection
An OpcClassicApplicationDescriptionCollection with a description of each server discovered.
DiscoverServers(IEnumerable<OpcClassicInterface>)
Discovers the servers on the host which implement one of the interfaceSpecifications specified.
public OpcClassicApplicationDescriptionCollection DiscoverServers(
IEnumerable<OpcClassicInterface> interfaceSpecifications)Public Function DiscoverServers(
interfaceSpecifications As IEnumerable(Of OpcClassicInterface)) As OpcClassicApplicationDescriptionCollectionParameters
| Name | Type | Description |
|---|---|---|
interface | IEnumerable<Opc | A sequence of the Opc |
Returns
OpcClassicApplicationDescriptionCollection
An OpcClassicApplicationDescriptionCollection with a description of each server discovered.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The interface sequence or one of its items is a null reference ( |
Remarks
In case the interfaceSpecifications sequence is empty, the servers which implement the OPC Classic specification AE 1.0, DA 1.0, DA 2.0, DA 3.0 or HDA 1.0 are discovered. A server whose URI does not state a valid class identifier is not included in the result.
DiscoverServers(params OpcClassicInterface[])
Discovers the servers on the host which implement one of the interfaceSpecifications specified.
public OpcClassicApplicationDescriptionCollection DiscoverServers(
params OpcClassicInterface[] interfaceSpecifications)Public Function DiscoverServers(
ParamArray interfaceSpecifications As OpcClassicInterface()) As OpcClassicApplicationDescriptionCollectionParameters
| Name | Type | Description |
|---|---|---|
interface | params Opc | An array of the Opc |
Returns
OpcClassicApplicationDescriptionCollection
An OpcClassicApplicationDescriptionCollection with a description of each server discovered.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The interface array or one of its items is a null reference ( |
Remarks
In case the interfaceSpecifications array is empty, the servers which implement the OPC Classic specification AE 1.0, DA 1.0, DA 2.0, DA 3.0 or HDA 1.0 are discovered. A server whose URI does not state a valid class identifier is not included in the result.
Dispose
| Overload | Description |
|---|---|
| Dispose() | Releases all resources used by the Opc |
| Dispose( | Releases the unmanaged resources used by the Opc |
Dispose()
Releases all resources used by the OpcClassicDiscoveryClient.
public void Dispose()Public Sub Dispose()Implements
Dispose(bool)
Releases the unmanaged resources used by the OpcClassicDiscoveryClient and optionally releases the managed resources.
protected virtual void Dispose(bool disposing)Protected Overridable Sub Dispose(disposing As Boolean)Parameters
| Name | Type | Description |
|---|---|---|
disposing | Boolean | The value true to release both managed and unmanaged resources; otherwise the value false to release only unmanaged resources. |

