OPC Studio User's Guide and Reference
DiscoverNetworkServers() Method



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA Namespace > EasyUAClientCore Class > DiscoverNetworkServers Method : DiscoverNetworkServers() Method
Discovers available OPC-UA servers on the network and returns information about them, using the default discovery host.
Syntax
'Declaration
 
<ElementsNotNullAttribute()>
<NotNullAttribute()>
Public Overloads Function DiscoverNetworkServers() As UADiscoveryElementCollection
'Usage
 
Dim instance As EasyUAClientCore
Dim value As UADiscoveryElementCollection
 
value = instance.DiscoverNetworkServers()
[ElementsNotNull()]
[NotNull()]
public UADiscoveryElementCollection DiscoverNetworkServers()
[ElementsNotNull()]
[NotNull()]
public:
UADiscoveryElementCollection^ DiscoverNetworkServers(); 

Return Value

Returns a collection of application elements (usually servers, OpcLabs.EasyOpc.UA.Discovery.UADiscoveryElement).
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.EasyUAInstanceParameters.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