High Performance OPC UA Server SDK
1.2.0.193
|
Asynchronously registers nodes to create shortcuts in the server. More...
#include <registernodesrequest.h>
Data Fields | |
struct ua_nodeid * | nodes |
A list of NodeIds to register that the client has retrieved through browsing, querying or in some other manner. | |
int32_t | num_nodes |
Number of elements in ua_registernodesrequest::nodes. | |
Related Functions | |
void | ua_registernodesrequest_init (struct ua_registernodesrequest *t) |
Initialize an ua_registernodesrequest struct with a valid value. More... | |
void | ua_registernodesrequest_clear (struct ua_registernodesrequest *t) |
Clear all resources alloctated in an ua_registernodesrequest struct. More... | |
int | ua_registernodesrequest_compare (const struct ua_registernodesrequest *a, const struct ua_registernodesrequest *b) |
Compare two ua_registernodesrequest structs. More... | |
int | ua_registernodesrequest_copy (struct ua_registernodesrequest *dst, const struct ua_registernodesrequest *src) |
Create a copy of a ua_registernodesrequest struct. More... | |
static int | ua_registernodesrequest_resize_nodes_array (struct ua_registernodesrequest *val, int32_t new_len) |
Resize the nodes array of a ua_registernodesrequest struct. More... | |
Asynchronously registers nodes to create shortcuts in the server.
This service allows clients to optimize the cyclic access to nodes, for example for writing variable values or for calling methods. There are two levels of optimization.
The first level is to reduce the amount of data on the wire for addressing information. Since NodeIds are used for addressing in nodes and can be very long, a more optimized addressing method is desirable for cyclic use of nodes. Classic OPC provided the concept to create handles for items by adding them to a group. RegisterNodes provides a similar concept to create handles for nodes by returning a numeric NodeId that can be used in all functions accessing information from the server. The transport of numeric NodeIds is very efficient in the OPC UA binary protocol.
The second level of optimization is possible inside the server. Since the client is telling the server that it wants to use the node more frequently by registering the Node, the server is able to prepare everything that is possible to optimize the access to the node.
The handles returned by the server are only valid during the lifetime of the session that was used to register the nodes. Clients must call ua_unregisternodesrequest if the node is no longer used, to free the resources used in the server for the optimization. This method should not be used to optimize the cyclic read of data, since OPC UA provides a much more optimized mechanism to subscribe for data changes.
Clients do not have to use the service and servers can simply implement the service only returning the same list of NodeIds that was passed in if there is no need to optimize the access.
|
related |
Clear all resources alloctated in an ua_registernodesrequest struct.
Frees allocated memory like arrays and resets numeric values. The ua_registernodesrequest struct itself is not freed and must be freed by the caller if required. This function always succeeds for a valid ua_registernodesrequest struct, that was validly decoded or initilized by ua_registernodesrequest_init.
|
related |
Compare two ua_registernodesrequest structs.
Compares the content of the ua_registernodesrequest struct a
to the content of the ua_registernodesrequest 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_registernodesrequest structs, so it is well suited to not only determine equality, but also sort multiple instances of this struct.
|
related |
Create a copy of a ua_registernodesrequest struct.
Copy all fields from struct ua_registernodesrequest 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.
|
related |
Initialize an ua_registernodesrequest 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_registernodesrequest struct can also be passed to ua_registernodesrequest_clear. This function will always succeed as long as an ua_registernodesrequest struct is passed to it.
|
related |
Resize the nodes array of a ua_registernodesrequest 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.
new_len | New length of the nodes array in number of members. |