QuickOPC User's Guide and Reference
Discover Method (EasyUAClient)



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA Namespace > EasyUAClient Class : Discover Method
Specifies a discovery query.
Discovers available OPC-UA applications or endpoints and returns information about them, using the specified discovery query.
Syntax
'Declaration
 
Public Function Discover( _
   ByVal discoveryQuery As UADiscoveryQuery _
) As UADiscoveryElementCollection
'Usage
 
Dim instance As EasyUAClient
Dim discoveryQuery As UADiscoveryQuery
Dim value As UADiscoveryElementCollection
 
value = instance.Discover(discoveryQuery)

Parameters

discoveryQuery
Specifies a discovery query.

Return Value

Returns a collection of application elements (usually servers, OpcLabs.EasyOpc.UA.Discovery.UADiscoveryElement).
Exceptions
ExceptionDescription
A null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.
The OPC UA operation has failed.
Remarks

This is a generic method that allows for different types of discovery queries. In most cases, it is more practical to use an (extension) method that is already tailored to a concrete type of query, e.g. IEasyUAClientExtension.DiscoverLocalApplications, IEasyUAClientExtension.DiscoverLocalServers, or IEasyUAClientExtension.FindLocalApplications.

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 2012 R2, Windows Server 2016; .NET: Linux, macOS, Microsoft Windows

See Also