Skip to content

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 ​

3 overloads

OverloadDescription
OpcClassicDiscoveryClient()Initializes a new instance of the OpcClassicDiscoveryClient class which discovers the servers on the local host.
OpcClassicDiscoveryClient(string)Initializes a new instance of the OpcClassicDiscoveryClient class using the host specified.
OpcClassicDiscoveryClient(string, OpcClassicIdentity)since v2.12Initializes a new instance of the OpcClassicDiscoveryClient class using the host and hostIdentity specified.

Exceptions (all overloads)

ExceptionCondition
OpcExceptionConnecting 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.

csharp
public OpcClassicDiscoveryClient()
vbnet
Public Sub New()

OpcClassicDiscoveryClient(string) ​

Initializes a new instance of the OpcClassicDiscoveryClient class using the host specified.

csharp
public OpcClassicDiscoveryClient(string host)
vbnet
Public Sub New(host As String)

Parameters

NameTypeDescription
hostStringThe name or address of the host whose servers are to be discovered.

Exceptions

ExceptionCondition
ArgumentExceptionThe host is an empty string.
ArgumentNullExceptionThe host is a null reference (Nothing in Visual Basic).

OpcClassicDiscoveryClient(string, OpcClassicIdentity) ​

since v2.12

Initializes a new instance of the OpcClassicDiscoveryClient class using the host and hostIdentity specified.

csharp
public OpcClassicDiscoveryClient(string host, OpcClassicIdentity hostIdentity)
vbnet
Public Sub New(host As String, hostIdentity As OpcClassicIdentity)

Parameters

NameTypeDescription
hostStringThe name or address of the host whose servers are to be discovered.
hostIdentityOpcClassicIdentityThe OpcClassicIdentity to use to connect to the host or a null reference (Nothing in Visual Basic) to connect without an explicit identity.

Exceptions

ExceptionCondition
ArgumentExceptionThe host is an empty string.
ArgumentNullExceptionThe host is a null reference (Nothing in Visual Basic).

Properties ​

Host ​

Gets the name or address of the host whose servers are discovered.

csharp
public string Host { get; }
vbnet
Public ReadOnly Property Host As String

Property value

String

The host specified when the OpcClassicDiscoveryClient was created; "localhost" if none was specified.

HostIdentity ​

since v2.12

Gets the identity used to connect to the host.

csharp
public OpcClassicIdentity HostIdentity { get; }
vbnet
Public ReadOnly Property HostIdentity As OpcClassicIdentity

Property value

OpcClassicIdentity

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.

csharp
public OpcStatus Close()
vbnet
Public Function Close() As OpcStatus

Returns

OpcStatus

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.

csharp
public OpcClassicEndpointDescriptionCollection DiscoverEndpoints()
vbnet
Public Function DiscoverEndpoints() As OpcClassicEndpointDescriptionCollection

Returns

OpcClassicEndpointDescriptionCollection

An OpcClassicEndpointDescriptionCollection with one description per server. The Interfaces of a description provide the interfaces the server has been discovered with.

Exceptions

ExceptionCondition
OpcExceptionDiscovering the servers failed; for more details see exception details.

DiscoverServers ​

3 overloads

OverloadDescription
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.
DiscoverServers(IEnumerable<OpcClassicInterface>)Discovers the servers on the host which implement one of the interfaceSpecifications specified.
DiscoverServers(params OpcClassicInterface[])Discovers the servers on the host which implement one of the interfaceSpecifications specified.

Exceptions (all overloads)

ExceptionCondition
OpcExceptionDiscovering 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.

csharp
public OpcClassicApplicationDescriptionCollection DiscoverServers()
vbnet
Public Function DiscoverServers() As OpcClassicApplicationDescriptionCollection

Returns

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.

csharp
public OpcClassicApplicationDescriptionCollection DiscoverServers(
    IEnumerable<OpcClassicInterface> interfaceSpecifications)
vbnet
Public Function DiscoverServers(
    interfaceSpecifications As IEnumerable(Of OpcClassicInterface)) As OpcClassicApplicationDescriptionCollection

Parameters

NameTypeDescription
interfaceSpecificationsIEnumerable<OpcClassicInterface>A sequence of the OpcClassicInterface instances of the interfaces the servers have to implement.

Returns

OpcClassicApplicationDescriptionCollection

An OpcClassicApplicationDescriptionCollection with a description of each server discovered.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe interfaceSpecifications sequence or one of its items is a null reference (Nothing in Visual Basic).

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.

csharp
public OpcClassicApplicationDescriptionCollection DiscoverServers(
    params OpcClassicInterface[] interfaceSpecifications)
vbnet
Public Function DiscoverServers(
    ParamArray interfaceSpecifications As OpcClassicInterface()) As OpcClassicApplicationDescriptionCollection

Parameters

NameTypeDescription
interfaceSpecificationsparams OpcClassicInterface[]An array of the OpcClassicInterface instances of the interfaces the servers have to implement.

Returns

OpcClassicApplicationDescriptionCollection

An OpcClassicApplicationDescriptionCollection with a description of each server discovered.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe interfaceSpecifications array or one of its items is a null reference (Nothing in Visual Basic).

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 ​

2 overloads

OverloadDescription
Dispose()Releases all resources used by the OpcClassicDiscoveryClient.
Dispose(bool)protected · virtualReleases the unmanaged resources used by the OpcClassicDiscoveryClient and optionally releases the managed resources.

Dispose() ​

Releases all resources used by the OpcClassicDiscoveryClient.

csharp
public void Dispose()
vbnet
Public Sub Dispose()

Implements

Dispose()

Dispose(bool) ​

protected · virtual

Releases the unmanaged resources used by the OpcClassicDiscoveryClient and optionally releases the managed resources.

csharp
protected virtual void Dispose(bool disposing)
vbnet
Protected Overridable Sub Dispose(disposing As Boolean)

Parameters

NameTypeDescription
disposingBooleanThe value true to release both managed and unmanaged resources; otherwise the value false to release only unmanaged resources.