High Performance OPC UA Server SDK  1.1.0.158
ua_registeredserver Struct Reference

The server to register. More...

#include <registeredserver.h>

Data Fields

struct ua_string server_uri
 The globally unique identifier for the Server instance. More...
 
struct ua_string product_uri
 The globally unique identifier for the Server product.
 
struct ua_localizedtextserver_names
 A list of localized descriptive names for the Server. More...
 
int32_t num_server_names
 Number of elements in ua_registeredserver::server_names.
 
enum ua_applicationtype server_type
 The type of application. More...
 
struct ua_string gateway_server_uri
 The URI of the Gateway Server associated with the DiscoveryUrls. More...
 
struct ua_stringdiscovery_urls
 A list of Discovery Endpoints for the Server. More...
 
int32_t num_discovery_urls
 Number of elements in ua_registeredserver::discovery_urls.
 
struct ua_string semaphore_file_path
 The path to the semaphore file used to identify an automatically-launched server instance. More...
 
bool is_online
 True if the Server is currently able to accept connections from Clients. More...
 

Related Functions

void ua_registeredserver_init (struct ua_registeredserver *t)
 Initialize an ua_registeredserver struct with a valid value. More...
 
void ua_registeredserver_clear (struct ua_registeredserver *t)
 Clear all resources alloctated in an ua_registeredserver struct. More...
 
int ua_registeredserver_compare (const struct ua_registeredserver *a, const struct ua_registeredserver *b)
 Compare two ua_registeredserver structs. More...
 
int ua_registeredserver_copy (struct ua_registeredserver *dst, const struct ua_registeredserver *src)
 Create a copy of a ua_registeredserver struct. More...
 
static int ua_registeredserver_resize_server_names_array (struct ua_registeredserver *val, int32_t new_len)
 Resize the server_names array of a ua_registeredserver struct. More...
 
static int ua_registeredserver_resize_discovery_urls_array (struct ua_registeredserver *val, int32_t new_len)
 Resize the discovery_urls array of a ua_registeredserver struct. More...
 

Detailed Description

The server to register.

Friends And Related Function Documentation

void ua_registeredserver_clear ( struct ua_registeredserver t)
related

Clear all resources alloctated in an ua_registeredserver struct.

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

int ua_registeredserver_compare ( const struct ua_registeredserver a,
const struct ua_registeredserver b 
)
related

Compare two ua_registeredserver structs.

Compares the content of the ua_registeredserver struct a to the content of the ua_registeredserver 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_registeredserver structs, so it is well suited to not only determine equality, but also sort multiple instances of this struct.

int ua_registeredserver_copy ( struct ua_registeredserver dst,
const struct ua_registeredserver src 
)
related

Create a copy of a ua_registeredserver struct.

Copy all fields from struct ua_registeredserver 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_registeredserver_init ( struct ua_registeredserver t)
related

Initialize an ua_registeredserver 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_registeredserver struct can also be passed to ua_registeredserver_compare, ua_registeredserver_copy and ua_registeredserver_clear. This function will always succeed as long as an ua_registeredserver struct is passed to it.

static int ua_registeredserver_resize_discovery_urls_array ( struct ua_registeredserver val,
int32_t  new_len 
)
related

Resize the discovery_urls array of a ua_registeredserver 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 discovery_urls array in number of members.
Returns
Zero on success or ua_statuscode on failure.
static int ua_registeredserver_resize_server_names_array ( struct ua_registeredserver val,
int32_t  new_len 
)
related

Resize the server_names array of a ua_registeredserver 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_names array in number of members.
Returns
Zero on success or ua_statuscode on failure.

Field Documentation

discovery_urls

A list of Discovery Endpoints for the Server.

The list shall have at least one valid entry.

gateway_server_uri

The URI of the Gateway Server associated with the DiscoveryUrls.

This value is only specified by Gateway Servers that wish to register the Servers that they provide access to.

For Servers that do not act as a Gateway Server this parameter shall be null.

is_online

True if the Server is currently able to accept connections from Clients.

The DiscoveryServer shall return ApplicationDescriptions to the Client.

The Server is expected to periodically re-register with the DiscoveryServer.

False if the Server is currently unable to accept connections from Clients. The DiscoveryServer shall NOT return ApplicationDescriptions to the Client.

This parameter is ignored if a semaphoreFilePath is provided.

semaphore_file_path

The path to the semaphore file used to identify an automatically-launched server instance.

Manually-launched servers will not use this parameter.

If a Semaphore file is provided, the IsOnline flag is ignored.

If a Semaphore file is provided and exists, the LocalDiscoveryServer shall save the registration information in a persistent data store that it reads whenever the LocalDiscoveryServer starts.

If a Semaphore file is specified but does not exist, the Discovery Server shall remove the registration from any persistent data store.

If the Server has registered with a semaphoreFilePath, the DiscoveryServer shall check that this file exists before returning the ApplicationDescription to the client.

If the Server did not register with a semaphoreFilePath (it is null or empty), then the DiscoveryServer does not attempt to verify the existence of the file before returning the ApplicationDescription to the client.

server_names

A list of localized descriptive names for the Server.

The list shall have at least one valid entry.

server_type

The type of application.

The value “Client” (The application is a Client) is not allowed. The Service result shall be Bad_InvalidArgument in this case.

server_uri

The globally unique identifier for the Server instance.

The serverUri matches the applicationUri from the ApplicationDescription.


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