C++ Based OPC UA Client/Server SDK  1.5.3.346
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 (const UaString &sDiscoveryURL, UaApplicationDescriptions &applicationDescriptions)
 Get a list of servers known by the discovery server. More...
 
UaStatus findServers (ServiceSettings &serviceSettings, const UaString &sDiscoveryURL, ClientSecurityInfo &clientSecurityInfo, UaApplicationDescriptions &applicationDescriptions)
 Get 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 (const UaString &sDiscoveryURL, UaEndpointDescriptions &endpointDescriptions)
 Gets a list of endpoints supported by the server. More...
 
UaStatus getEndpoints (ServiceSettings &serviceSettings, const UaString &sDiscoveryURL, ClientSecurityInfo &clientSecurityInfo, UaEndpointDescriptions &endpointDescriptions)
 Gets a list of endpoints supported by the server. More...
 
UaStatus getEndpoints (ServiceSettings &serviceSettings, const UaString &sDiscoveryURL, ClientSecurityInfo &clientSecurityInfo, const UaStringArray &localIds, const UaStringArray &transportProfileUris, UaEndpointDescriptions &endpointDescriptions)
 Gets a list of endpoints supported by the server. More...
 
UaStatus findServersOnNetwork (ServiceSettings &serviceSettings, const UaString &sDiscoveryURL, ClientSecurityInfo &clientSecurityInfo, OpcUa_UInt32 startingRecordId, const UaStringArray &serverCapabilities, OpcUa_UInt32 maxRecordsToReturn, UaDateTime &lastCounterResetTime, UaServerOnNetworks &servers)
 Gets a list of discovery URLs of servers known in the cache of the discovery server. More...
 
UaStatus findServersOnNetwork (ServiceSettings &serviceSettings, const UaString &sDiscoveryURL, ClientSecurityInfo &clientSecurityInfo, OpcUa_UInt32 startingRecordId, UaDateTime &lastCounterResetTime, UaServerOnNetworks &servers)
 Gets a list of discovery URLs of servers known in the cache of the discovery server. More...
 
UaStatus queryDirectory (ServiceSettings &serviceSettings, const UaString &sGdsURL, OpcUa_UInt32 startingRecordId, UaDateTime &lastCounterResetTime, UaServerOnNetworks &servers)
 Get a list of servers known by the Directory in a global discovery server. More...
 
UaStatus queryDirectory (ServiceSettings &serviceSettings, UaSession *pSession, OpcUa_UInt32 startingRecordId, UaDateTime &lastCounterResetTime, UaServerOnNetworks &servers)
 Get a list of servers known by the Directory in a global discovery server. More...
 
UaStatus queryDirectory (ServiceSettings &serviceSettings, UaSession *pSession, OpcUa_UInt32 startingRecordId, OpcUa_UInt32 maxRecordsToReturn, const UaString &applicationName, const UaString &applicationUri, const UaString &productUri, const UaStringArray &serverCapabilities, UaDateTime &lastCounterResetTime, UaServerOnNetworks &servers)
 Get a filtered list of servers known by the Directory in a global discovery server. More...
 
UaStatus queryDirectory (ServiceSettings &serviceSettings, const UaString &sGdsURL, SessionConnectInfo &sessionConnectInfo, SessionSecurityInfo &sessionSecurityInfo, OpcUa_UInt32 startingRecordId, OpcUa_UInt32 maxRecordsToReturn, const UaString &applicationName, const UaString &applicationUri, const UaString &productUri, const UaStringArray &serverCapabilities, UaDateTime &lastCounterResetTime, UaServerOnNetworks &servers)
 Get a filtered list of servers known by the Directory in a global discovery 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 ( const UaString sDiscoveryURL,
UaApplicationDescriptions applicationDescriptions 
)

Get 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]sDiscoveryURLThe URL identifying an OPC UA Discovery Server.
[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,
UaApplicationDescriptions applicationDescriptions 
)

Get 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::findServersOnNetwork ( ServiceSettings serviceSettings,
const UaString sDiscoveryURL,
ClientSecurityInfo clientSecurityInfo,
OpcUa_UInt32  startingRecordId,
const UaStringArray serverCapabilities,
OpcUa_UInt32  maxRecordsToReturn,
UaDateTime lastCounterResetTime,
UaServerOnNetworks servers 
)

Gets a list of discovery URLs of servers known in the cache of the discovery server.

The discovery server is typically a Local Discovery Server with multicast extension (LDS-ME) running on a host with OPC UA servers. It returns the servers in the mDNS cache of the LDS-ME. This cache is created from the servers announcing themselves through mDNS multicast messages in the local network.

The DiscoveryUrls contained in the returned ServerOnNetworks 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]startingRecordIdOnly records with an identifier greater than this number will be returned. Specify 0 to start with the first record in the database.
[in]serverCapabilitiesThe Servers returned shall support all of the server capabilities specified. If no server capabilities are provided this filter is not used.
[in]maxRecordsToReturnThe maximum number of records to return in the response. 0 indicates that there is no limit.
[out]lastCounterResetTimeThe last time the counters were reset.
[out]serversA list of Servers which meet the filter criteria. The ServerOnNetwork structure contains the following information:
  • RecordId: A unique identifier for the record. This can be used to fetch the next batch of servers in a subsequent call.
  • ServerName: The name of the Server. This is typically the ApplicationName for the Server.
  • DiscoveryUrl: The URL of the discovery Endpoint.
  • ServerCapabilities: The list of server capabilities supported by the Server.
UaStatus UaClientSdk::UaDiscovery::findServersOnNetwork ( ServiceSettings serviceSettings,
const UaString sDiscoveryURL,
ClientSecurityInfo clientSecurityInfo,
OpcUa_UInt32  startingRecordId,
UaDateTime lastCounterResetTime,
UaServerOnNetworks servers 
)

Gets a list of discovery URLs of servers known in the cache of the discovery server.

The discovery server is typically a Local Discovery Server with multicast extension (LDS-ME) running on a host with OPC UA servers. It returns the servers in the mDNS cache of the LDS-ME. This cache is created from the servers announcing themselves through mDNS multicast messages in the local network.

The DiscoveryUrls contained in the returned ServerOnNetworks 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]startingRecordIdOnly records with an identifier greater than this number will be returned. Specify 0 to start with the first record in the database.
[out]lastCounterResetTimeThe last time the counters were reset.
[out]serversA list of Servers which meet the filter criteria. The ServerOnNetwork structure contains the following information:
  • RecordId: A unique identifier for the record. This can be used to fetch the next batch of servers in a subsequent call.
  • ServerName: The name of the Server. This is typically the ApplicationName for the Server.
  • DiscoveryUrl: The URL of the discovery Endpoint.
  • ServerCapabilities: The list of server capabilities supported by the Server.
UaStatus UaClientSdk::UaDiscovery::getEndpoints ( const UaString sDiscoveryURL,
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 queryDirectory.

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]sDiscoveryURLThe discovery URL of an OPC UA Server.
[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.
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 queryDirectory.

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.
UaStatus UaClientSdk::UaDiscovery::getEndpoints ( ServiceSettings serviceSettings,
const UaString sDiscoveryURL,
ClientSecurityInfo clientSecurityInfo,
const UaStringArray localIds,
const UaStringArray transportProfileUris,
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.
[in]localIdsList of locales to use. Specifies the locale to use when returning human readable strings.
[in]transportProfileUrisList of Transport Profile that the returned Endpoints shall support. All Endpoints are returned if the list is empty. The transport profile URIs are defined as part of the OPC UA profiles. A complete list can be found at http://opcfoundation.org/profilereporting/ in the Transport Category. Commonly used profiles are
[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.
UaStatus UaClientSdk::UaDiscovery::queryDirectory ( ServiceSettings serviceSettings,
const UaString sGdsURL,
OpcUa_UInt32  startingRecordId,
UaDateTime lastCounterResetTime,
UaServerOnNetworks servers 
)

Get a list of servers known by the Directory in a global discovery server.

Used to access the method QueryServers of the Directory object in a Global Discovery Server (GDS). The method is defined by the DirectoryType in the GDS information model.

The URL used to connected to the GDS must be passed in. Any Client is able to call the method on the GDS, however, the set of results returned may be restricted based on the Client’s user credentials. One of the overloads taking a UaSession or full security configuration must be used if user credentials are necessary.

It may be necessary to call this method several times to get all results from the GDS. The behaviour can be controlled with the parameters startingRecordId and maxRecordsToReturn. The ServerOnNetwork structure returned in the parameter servers contains the RecordId of the returned server. It can be used to calculate the startingRecordId for the next call to queryDirectory. If the returned value in lastCounterResetTime is after the first call to queryDirectory, it may make sense to start over from beginning since the list of registered servers was changed. The startingRecordId for the first call is 0.

This overload function does not apply any filters.

Parameters
[in,out]serviceSettingsThe general service settings like timeout. See ServiceSettings for more details.
[in]sGdsURLThe URL identifying an OPC UA GDS Directory Server.
[in]startingRecordIdOnly records with an identifier greater than this number will be returned. Specify 0 to start with the first record in the database.
[out]lastCounterResetTimeThe last time the counters were reset.
[out]serversA list of Servers which meet the filter criteria. The ServerOnNetwork structure contains the following information:
  • RecordId: A unique identifier for the record. This can be used to fetch the next batch of servers in a subsequent call.
  • ServerName: The name of the Server. This is typically the ApplicationName for the Server.
  • DiscoveryUrl: The URL of the discovery Endpoint.
  • ServerCapabilities: The list of server capabilities supported by the Server.
UaStatus UaClientSdk::UaDiscovery::queryDirectory ( ServiceSettings serviceSettings,
UaSession pSession,
OpcUa_UInt32  startingRecordId,
UaDateTime lastCounterResetTime,
UaServerOnNetworks servers 
)

Get a list of servers known by the Directory in a global discovery server.

Used to access the method QueryServers of the Directory object in a Global Discovery Server (GDS). The method is defined by the DirectoryType in the GDS information model.

A UaSession connected to the GDS must be passed in. Any Client is able to call the method on the GDS, however, the set of results returned may be restricted based on the Client’s user credentials. Therefore it may be required to configure the UaSession object with the right user token.

It may be necessary to call this method several times to get all results from the GDS. The behaviour can be controlled with the parameters startingRecordId and maxRecordsToReturn. The ServerOnNetwork structure returned in the parameter servers contains the RecordId of the returned server. It can be used to calculate the startingRecordId for the next call to queryDirectory. If the returned value in lastCounterResetTime is after the first call to queryDirectory, it may make sense to start over from beginning since the list of registered servers was changed. The startingRecordId for the first call is 0.

This overload function does not apply any filters.

Parameters
[in,out]serviceSettingsThe general service settings like timeout. See ServiceSettings for more details.
[in]pSessionSession object used to call the QueryServers method on the GDS. The session must be connected.
[in]startingRecordIdOnly records with an identifier greater than this number will be returned. Specify 0 to start with the first record in the database.
[out]lastCounterResetTimeThe last time the counters were reset.
[out]serversA list of Servers which meet the filter criteria. The ServerOnNetwork structure contains the following information:
  • RecordId: A unique identifier for the record. This can be used to fetch the next batch of servers in a subsequent call.
  • ServerName: The name of the Server. This is typically the ApplicationName for the Server.
  • DiscoveryUrl: The URL of the discovery Endpoint.
  • ServerCapabilities: The list of server capabilities supported by the Server.
UaStatus UaClientSdk::UaDiscovery::queryDirectory ( ServiceSettings serviceSettings,
UaSession pSession,
OpcUa_UInt32  startingRecordId,
OpcUa_UInt32  maxRecordsToReturn,
const UaString applicationName,
const UaString applicationUri,
const UaString productUri,
const UaStringArray serverCapabilities,
UaDateTime lastCounterResetTime,
UaServerOnNetworks servers 
)

Get a filtered list of servers known by the Directory in a global discovery server.

Used to access the method QueryServers of the Directory object in a Global Discovery Server (GDS). The method is defined by the DirectoryType in the GDS information model.

A UaSession connected to the GDS must be passed in. Any Client is able to call the method on the GDS, however, the set of results returned may be restricted based on the Client’s user credentials. Therefore it may be required to configure the UaSession object with the right user token.

It may be necessary to call this method several times to get all results from the GDS. The behaviour can be controlled with the parameters startingRecordId and maxRecordsToReturn. The ServerOnNetwork structure returned in the parameter servers contains the RecordId of the returned server. It can be used to calculate the startingRecordId for the next call to queryDirectory. If the returned value in lastCounterResetTime is after the first call to queryDirectory, it may make sense to start over from beginning since the list of registered servers was changed. The startingRecordId for the first call is 0.

The results can be filtered with the parameters applicationName, applicationUri, productUri and serverCapabilities. Filters are combined in an AND operation. The serverCapabilities parameter is an array and a Server will pass this filter if it supports all of the specified capabilities. The other filter parameters are strings where the syntax of the LIKE FilterOperator can be used. See UaString::like() for more details.

Parameters
[in,out]serviceSettingsThe general service settings like timeout. See ServiceSettings for more details.
[in]pSessionSession object used to call the QueryServers method on the GDS. The session must be connected.
[in]startingRecordIdOnly records with an identifier greater than this number will be returned. Specify 0 to start with the first record in the database.
[in]maxRecordsToReturnThe maximum number of records to return in the response. 0 indicates that there is no limit.
[in]applicationNameThe ApplicationName of the Applications to return. Supports the syntax used by the LIKE FilterOperator. See UaString::like() for more details. Not used as filter if an empty string is specified. The filter is only applied to the default ApplicationName.
[in]applicationUriThe ApplicationUri of the Servers to return. Supports the syntax used by the LIKE FilterOperator. See UaString::like() for more details. Not used as filter if an empty string is specified.
[in]productUriThe ProductUri of the Servers to return. Supports the syntax used by the LIKE FilterOperator. See UaString::like() for more details. Not used as filter if an empty string is specified.
[in]serverCapabilitiesThe Servers returned shall support all of the server capabilities specified. If no server capabilities are provided this filter is not used.
[out]lastCounterResetTimeThe last time the counters were reset.
[out]serversA list of Servers which meet the filter criteria. The ServerOnNetwork structure contains the following information:
  • RecordId: A unique identifier for the record. This can be used to fetch the next batch of servers in a subsequent call.
  • ServerName: The name of the Server. This is typically the ApplicationName for the Server.
  • DiscoveryUrl: The URL of the discovery Endpoint.
  • ServerCapabilities: The list of server capabilities supported by the Server.
UaStatus UaClientSdk::UaDiscovery::queryDirectory ( ServiceSettings serviceSettings,
const UaString sGdsURL,
SessionConnectInfo sessionConnectInfo,
SessionSecurityInfo sessionSecurityInfo,
OpcUa_UInt32  startingRecordId,
OpcUa_UInt32  maxRecordsToReturn,
const UaString applicationName,
const UaString applicationUri,
const UaString productUri,
const UaStringArray serverCapabilities,
UaDateTime lastCounterResetTime,
UaServerOnNetworks servers 
)

Get a filtered list of servers known by the Directory in a global discovery server.

Used to access the method QueryServers of the Directory object in a Global Discovery Server (GDS). The method is defined by the DirectoryType in the GDS information model.

The necessary information to connected to the GDS must be passed in. Any Client is able to call the method on the GDS, however, the set of results returned may be restricted based on the Client’s user credentials. Therefore it may be required to configure the sessionSecurityInfo with the right user token.

It may be necessary to call this method several times to get all results from the GDS. The behaviour can be controlled with the parameters startingRecordId and maxRecordsToReturn. The ServerOnNetwork structure returned in the parameter servers contains the RecordId of the returned server. It can be used to calculate the startingRecordId for the next call to queryDirectory. If the returned value in lastCounterResetTime is after the first call to queryDirectory, it may make sense to start over from beginning since the list of registered servers was changed. The startingRecordId for the first call is 0.

The results can be filtered with the parameters applicationName, applicationUri, productUri and serverCapabilities. Filters are combined in an AND operation. The serverCapabilities parameter is an array and a Server will pass this filter if it supports all of the specified capabilities. The other filter parameters are strings where the syntax of the LIKE FilterOperator can be used. See UaString::like() for more details.

Parameters
[in,out]serviceSettingsThe general service settings like timeout. See ServiceSettings for more details.
[in]sGdsURLThe URL identifying an OPC UA GDS Directory Server.
[in,out]sessionConnectInfoThe client defined session connect settings. See SessionConnectInfo for more info.
[in,out]sessionSecurityInfoThe client defined session security settings. See SessionSecurityInfo for more info.
[in]startingRecordIdOnly records with an identifier greater than this number will be returned. Specify 0 to start with the first record in the database.
[in]maxRecordsToReturnThe maximum number of records to return in the response. 0 indicates that there is no limit.
[in]applicationNameThe ApplicationName of the Applications to return. Supports the syntax used by the LIKE FilterOperator. See UaString::like() for more details. Not used if an empty string is specified. The filter is only applied to the default ApplicationName.
[in]applicationUriThe ApplicationUri of the Servers to return. Supports the syntax used by the LIKE FilterOperator. See UaString::like() for more details. Not used if an empty string is specified.
[in]productUriThe ProductUri of the Servers to return. Supports the syntax used by the LIKE FilterOperator. See UaString::like() for more details. Not used if an empty string is specified.
[in]serverCapabilitiesThe Servers returned shall support all of the server capabilities specified. If no server capabilities are provided this filter is not used.
[out]lastCounterResetTimeThe last time the counters were reset.
[out]serversA list of Servers which meet the filter criteria. The ServerOnNetwork structure contains the following information:
  • RecordId: A unique identifier for the record. This can be used to fetch the next batch of servers in a subsequent call.
  • ServerName: The name of the Server. This is typically the ApplicationName for the Server.
  • DiscoveryUrl: The URL of the discovery Endpoint.
  • ServerCapabilities: The list of server capabilities supported by the Server.

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