OPC Studio User's Guide and Reference
DiscoverNetworkServers(IEnumerable<String>) Method



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA Namespace > EasyUAClientCore Class > DiscoverNetworkServers Method : DiscoverNetworkServers(IEnumerable<String>) Method
List of Server capability filters. Only records with all the specified server capabilities are returned.

The value of this parameter cannot be null (Nothing in Visual Basic).

Discovers available OPC-UA servers on the network and returns information about them, using the default discovery host, and specifying the capabilities that the servers must have.
Syntax
'Declaration
 
<NotNullAttribute()>
Public Overloads Function DiscoverNetworkServers( _
   ByVal serverCapabilityFilter As IEnumerable(Of String) _
) As UADiscoveryElementCollection
'Usage
 
Dim instance As EasyUAClientCore
Dim serverCapabilityFilter As IEnumerable(Of String)
Dim value As UADiscoveryElementCollection
 
value = instance.DiscoverNetworkServers(serverCapabilityFilter)
[NotNull()]
public UADiscoveryElementCollection DiscoverNetworkServers( 
   IEnumerable<string> serverCapabilityFilter
)
[NotNull()]
public:
UADiscoveryElementCollection^ DiscoverNetworkServers( 
   IEnumerable<String^>^ serverCapabilityFilter
) 

Parameters

serverCapabilityFilter
List of Server capability filters. Only records with all the specified server capabilities are returned.

The value of this parameter cannot be null (Nothing in Visual Basic).

Return Value

Returns a collection of application elements (usually servers, OpcLabs.EasyOpc.UA.Discovery.UADiscoveryElement).

This method never returns null (Nothing in Visual Basic).

The individual elements of the returned value are never null (Nothing in Visual Basic).

Remarks

This method uses the so-called Local Discovery Server (LDS). You can influence how the discovery works using the properties in SharedParameters. The name of the machine that runs the discovery is determined by OpcLabs.EasyOpc.UA.Engine.EasyUAClientInstanceParameters.DiscoveryHost in InstanceParameters, and defaults to "localhost".

Invokes the FindServersOnNetwork service.

See also in Knowledge Base: Technical note-OPC UA Discovery in QuickOPC.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also