High Performance OPC UA Server SDK  1.2.0.193
ua_findserversrequest Struct Reference

Asynchronous call to return the Servers known to a Server or Discovery Server. More...

#include <findserversrequest.h>

Data Fields

struct ua_string endpoint_url
 The network address that the Client used to access the Discovery Endpoint. More...
 
struct ua_stringlocale_ids
 List of locales to use. More...
 
int32_t num_locale_ids
 Number of elements in ua_findserversrequest::locale_ids.
 
struct ua_stringserver_uris
 List of servers to return. More...
 
int32_t num_server_uris
 Number of elements in ua_findserversrequest::server_uris.
 

Related Functions

void ua_findserversrequest_init (struct ua_findserversrequest *t)
 Initialize an ua_findserversrequest struct with a valid value. More...
 
void ua_findserversrequest_clear (struct ua_findserversrequest *t)
 Clear all resources alloctated in an ua_findserversrequest struct. More...
 
int ua_findserversrequest_compare (const struct ua_findserversrequest *a, const struct ua_findserversrequest *b)
 Compare two ua_findserversrequest structs. More...
 
int ua_findserversrequest_copy (struct ua_findserversrequest *dst, const struct ua_findserversrequest *src)
 Create a copy of a ua_findserversrequest struct. More...
 
static int ua_findserversrequest_resize_locale_ids_array (struct ua_findserversrequest *val, int32_t new_len)
 Resize the locale_ids array of a ua_findserversrequest struct. More...
 
static int ua_findserversrequest_resize_server_uris_array (struct ua_findserversrequest *val, int32_t new_len)
 Resize the server_uris array of a ua_findserversrequest struct. More...
 

Detailed Description

Asynchronous call to return the Servers known to a Server or Discovery Server.

The Client may reduce the number of results returned by specifying filter criteria. A Discovery Server returns an empty list if no Servers match the criteria specified by the client.

Every Server shall provide a Discovery Endpoint that supports this Service. The Server shall always return a record that describes itself, however in some cases more than one record may be returned. Gateway Servers shall return a record for each Server that they provide access to plus (optionally) a record that allows the Gateway Server to be accessed as an ordinary OPC UA Server. Non-transparent redundant Servers shall provide a record for each Server in the redundant set.

Every Server shall have a globally unique identifier called the ServerUri. This identifier should be a fully qualified domain name; however, it may be a GUID or similar construct that ensures global uniqueness. The ServerUri returned by this Service shall be the same value that appears in index 0 of the ServerArray property (see Part 5 of the OPC UA Specification). The ServerUri is returned as the applicationUri field in the ua_applicationdescription.

Every Server shall also have a human readable identifier, called the ServerName, which is not necessarily globally unique. This identifier may be available in multiple locales.

A Server may have multiple HostNames. For this reason, the Client shall pass the URL it used to connect to the Endpoint to this Service. The implementation of this Service shall use this information to return responses that are accessible to the Client via the provided URL.

This Service shall not require any message security but it may require transport layer security.

Some Servers may be accessed via a Gateway Server and shall have a value specified for gatewayServerUri in their ua_applicationdescription. The discoveryUrls provided in ApplicationDescription shall belong to the Gateway Server. Some Discovery Servers may return multiple records for the same Server if that Server can be accessed via multiple paths.

This Service can be used without security and it is therefore vulnerable to Denial Of Service (DOS) attacks. A Server should minimize the amount of processing required to send the response for this Service. This can be achieved by preparing the result in advance. The Server should also add a short delay before starting processing of a request during high traffic conditions.

The DiscoveryUrl returned by this Service is ambiguous if there are multiple TransportProfiles (e.g. UA XML or UA Binary encoding) associated with the URL scheme. Clients that support multiple TransportProfiles should attempt to use alternate TransportProfiles if the first choice does not succeed.

Friends And Related Function Documentation

void ua_findserversrequest_clear ( struct ua_findserversrequest t)
related

Clear all resources alloctated in an ua_findserversrequest struct.

Frees allocated memory like arrays and resets numeric values. The ua_findserversrequest struct itself is not freed and must be freed by the caller if required. This function always succeeds for a valid ua_findserversrequest struct, that was validly decoded or initilized by ua_findserversrequest_init.

int ua_findserversrequest_compare ( const struct ua_findserversrequest a,
const struct ua_findserversrequest b 
)
related

Compare two ua_findserversrequest structs.

Compares the content of the ua_findserversrequest struct a to the content of the ua_findserversrequest struct b. If a is smaller than b, an integer less than zero is returned, if a is bigger than b, an integer greater than zero is returned. If both structs are equal zero is returned.

This function creates a total order on ua_findserversrequest structs, so it is well suited to not only determine equality, but also sort multiple instances of this struct.

int ua_findserversrequest_copy ( struct ua_findserversrequest dst,
const struct ua_findserversrequest src 
)
related

Create a copy of a ua_findserversrequest struct.

Copy all fields from struct ua_findserversrequest src to dst. Creates a deep copy so all content is recusively copied and both src and dst can be used and must be freed separately.

dst is not cleared before the copy operation, so it must not have any allocated data. It may or may not be initilized by the caller before copy.

Returns
Zero on success or ua_statuscode on failure.
void ua_findserversrequest_init ( struct ua_findserversrequest t)
related

Initialize an ua_findserversrequest struct with a valid value.

After initialization the fields of the struct are set to valid and consistent values and can safley be accessed. An initialized ua_findserversrequest struct can also be passed to ua_findserversrequest_clear. This function will always succeed as long as an ua_findserversrequest struct is passed to it.

static int ua_findserversrequest_resize_locale_ids_array ( struct ua_findserversrequest val,
int32_t  new_len 
)
related

Resize the locale_ids array of a ua_findserversrequest struct.

Depending on new_len and the current size of the array, the array will be created, increased, decreased or deleted. In case array members are removed these are cleared properly, new array members are initialized with zero.

Parameters
new_lenNew length of the locale_ids array in number of members.
Returns
Zero on success or ua_statuscode on failure.
static int ua_findserversrequest_resize_server_uris_array ( struct ua_findserversrequest val,
int32_t  new_len 
)
related

Resize the server_uris array of a ua_findserversrequest struct.

Depending on new_len and the current size of the array, the array will be created, increased, decreased or deleted. In case array members are removed these are cleared properly, new array members are initialized with zero.

Parameters
new_lenNew length of the server_uris array in number of members.
Returns
Zero on success or ua_statuscode on failure.

Field Documentation

endpoint_url

The network address that the Client used to access the Discovery Endpoint.

The Server uses this information for diagnostics and to determine what URLs to return in the response.

The Server should return a suitable default URL if it does not recognize the HostName in the URL.

locale_ids

List of locales to use.

The server should return the applicationName in the ua_applicationdescription using one of locales specified. If the server supports more than one of the requested locales, the server shall 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.

server_uris

List of servers to return.

All known servers are returned if the list is empty.

A serverUri matches the applicationUri from the ua_applicationdescription.


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