UA Server SDK C++ Bundle  1.4.1.271
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
UaClientSdk::UaDiscovery Class Reference

The UaDiscovery class manages a UA Client side discovery functionality. More...

#include <uadiscovery.h>

Public Member Functions

 UaDiscovery ()
 Creates a UaDiscovery client object.
 
 ~UaDiscovery ()
 Destroys the UaDiscovery object.
 
UaStatus findServers (ServiceSettings &serviceSettings, const UaString &sDiscoveryURL, ClientSecurityInfo &clientSecurityInfo, UaApplicationDescriptions &applicationDescriptions)
 Gets a list of servers known by the discovery server. More...
 
UaStatus findServers (ServiceSettings &serviceSettings, const UaString &sDiscoveryURL, ClientSecurityInfo &clientSecurityInfo, const UaStringArray &localIds, const UaStringArray &serverUris, UaApplicationDescriptions &applicationDescriptions)
 Gets a list of servers known by the discovery server. More...
 
UaStatus getEndpoints (ServiceSettings &serviceSettings, const UaString &sDiscoveryURL, ClientSecurityInfo &clientSecurityInfo, UaEndpointDescriptions &endpointDescriptions)
 Gets a list of endpoints supported by the server. More...
 

Detailed Description

The UaDiscovery class manages a UA Client side discovery functionality.

Discovery is a two-step approach. In the first step, the available servers are discovered and in the second step the selected server is asked for its available Endpoints, describing combinations of protocols and security settings available to connect to the server.

Member Function Documentation

UaStatus UaClientSdk::UaDiscovery::findServers ( ServiceSettings serviceSettings,
const UaString sDiscoveryURL,
ClientSecurityInfo clientSecurityInfo,
UaApplicationDescriptions &  applicationDescriptions 
)

Gets a list of servers known by the discovery server.

The discovery server is typically a Local Discovery Server (LDS) running on a host with OPC UA servers. It returns the servers available on this host.

The DiscoveryUrls contained in the returned ApplicationDescriptions can be used to call getEndpoints for the server of interest to get all information necessary to connect to this server.

Parameters
[in,out]serviceSettingsThe general service settings like timeout. See ServiceSettings for more details.
[in]sDiscoveryURLThe URL identifying an OPC UA Discovery Server.
[in]clientSecurityInfoThe client defined security settings. See ClientSecurityInfo for more information.
[out]applicationDescriptionsArray of OpcUa_ApplicationDescription with the following information.
  • ApplicationUri: The globally unique identifier for the application instance.
  • ProductUri: The globally unique identifier for the product.
  • ApplicationName: A localized descriptive name for the application.
  • ApplicationType: The type of application. Possible values are SERVER, CLIENT, CLIENTANDSERVER, and DISCOVERYSERVER.
  • DiscoveryUrls: A list of URLs for the discovery Endpoints provided by the application. Empty for type CLIENT.
UaStatus UaClientSdk::UaDiscovery::findServers ( ServiceSettings serviceSettings,
const UaString sDiscoveryURL,
ClientSecurityInfo clientSecurityInfo,
const UaStringArray &  localIds,
const UaStringArray &  serverUris,
UaApplicationDescriptions &  applicationDescriptions 
)

Gets a list of servers known by the discovery server.

The discovery server is typically a Local Discovery Server (LDS) running on a host with OPC UA servers. It returns the servers available on this host.

The DiscoveryUrls contained in the returned ApplicationDescriptions can be used to call getEndpoints for the server of interest to get all information necessary to connect to this server.

Parameters
[in,out]serviceSettingsThe general service settings like timeout. See ServiceSettings for more details.
[in]sDiscoveryURLThe URL identifying an OPC UA Discovery Server.
[in]clientSecurityInfoThe client defined security settings. See ClientSecurityInfo for more information.
[in]localIdsList of locales to use. The server should return the ServerName using one of locales specified. If the server supports more than one of the requested locales, then the server will use the locale that appears first in this list. If the server does not support any of the requested locales, it chooses an appropriate default locale. The server chooses an appropriate default locale if this list is empty.
[in]serverUrisList of servers to return. All known servers are returned if the list is empty.
[out]applicationDescriptionsArray of OpcUa_ApplicationDescription with the following information
  • ApplicationUri: The globally unique identifier for the application instance.
  • ProductUri: The globally unique identifier for the product.
  • ApplicationName: A localized descriptive name for the application.
  • ApplicationType: The type of application. Possible values are SERVER, CLIENT, CLIENTANDSERVER and DISCOVERYSERVER.
  • DiscoveryUrls: A list of URLs for the discovery Endpoints provided by the application. Empty for type CLIENT.
UaStatus UaClientSdk::UaDiscovery::getEndpoints ( ServiceSettings serviceSettings,
const UaString sDiscoveryURL,
ClientSecurityInfo clientSecurityInfo,
UaEndpointDescriptions &  endpointDescriptions 
)

Gets a list of endpoints supported by the server.

The discovery URL used to connect to the server and to get the endpoints is typically returned from findServers or other discovery methods like findServersOnNetwork or queryServersOnDirectory.

The EndpointDescriptions returned from the server provide all information like EnpointUrl, security settings and types of user authentication necessary to connect to the server.

Parameters
[in,out]serviceSettingsThe general service settings like timeout. See ServiceSettings for more details.
[in]sDiscoveryURLThe discovery URL of an OPC UA Server.
[in]clientSecurityInfoThe client defined security settings. See ClientSecurityInfo for more info.
[out]endpointDescriptionsArray of OpcUa_EndpointDescription with the following information
  • EndpointUrl: The URL used to connect to this Endpoint.
  • ServerCertificate: The application instance certificate issued to the Server.
  • SecurityMode: The type of security to apply to the messages. Possible values are None, Sign, and SignAndEncrypt.
  • SecurityPolicyUri: The URI for SecurityPolicy to use when securing messages. See ClientSecurityInfo::sSecurityPolicy for more details.
  • UserIdentityTokens: The user identity tokens that the Server will accept.
  • TransportProfileUri: The URI of the Transport Profile supported by the Endpoint.
  • SecurityLevel: A numeric value that indicates how secure the EndpointDescription is compared to other EndpointDescriptions for the same Server. A higher value indicates better security.

The documentation for this class was generated from the following files: