High Performance OPC UA Server SDK  1.2.0.193
ua_writerequest Struct Reference

Asynchronously writes variable values to an OPC UA Server. More...

#include <writerequest.h>

Data Fields

struct ua_writevaluenodes
 List of Nodes and their Attributes to write.
 
int32_t num_nodes
 Number of elements in ua_writerequest::nodes.
 

Related Functions

void ua_writerequest_init (struct ua_writerequest *t)
 Initialize an ua_writerequest struct with a valid value. More...
 
void ua_writerequest_clear (struct ua_writerequest *t)
 Clear all resources alloctated in an ua_writerequest struct. More...
 
int ua_writerequest_compare (const struct ua_writerequest *a, const struct ua_writerequest *b)
 Compare two ua_writerequest structs. More...
 
int ua_writerequest_copy (struct ua_writerequest *dst, const struct ua_writerequest *src)
 Create a copy of a ua_writerequest struct. More...
 
static int ua_writerequest_resize_nodes_array (struct ua_writerequest *val, int32_t new_len)
 Resize the nodes array of a ua_writerequest struct. More...
 

Detailed Description

Asynchronously writes variable values to an OPC UA Server.

This service is used to write values to one or more attributes of one or more Nodes. For constructed attribute values whose elements are indexed, such as an array, this service allows Clients to write the entire set of indexed values as a composite, to write individual elements or to write ranges of elements of the composite.

The values are written to the data source, such as a device, and the service does not return until it writes the values or determines that the value cannot be written. In certain cases, the Server will successfully write to an intermediate system or Server, and will not know whether the data source was updated properly. In these cases, the Server should report a success code that indicates that the write was not verified. In the cases where the Server is able to verify that it has successfully written to the data source, it reports an unconditional success.

The order the operations are processed in the Server is not defined and depends on the different data sources and the internal Server logic. If an attribute and node combination is contained in more than one operation, the order of the processing is undefined. If a Client requires sequential processing, the Client needs separate service calls.

It is possible that the Server may successfully write some attributes, but not others. Rollback is the responsibility of the Client.

If a Server allows writing of attributes with the DataType LocalizedText, the Client can add or overwrite the text for a locale by writing the text with the associated LocaleId. Writing a null string for the text for a locale shall delete the String for that locale. Writing a null string for the locale and a non-null string for the text is setting the text for an invariant locale. Writing a null string for the text and a null string for the locale shall delete the entries for all locales. If a Client attempts to write a locale that is either syntactically invalid or not supported, the Server returns Bad_LocaleNotSupported.

Friends And Related Function Documentation

void ua_writerequest_clear ( struct ua_writerequest t)
related

Clear all resources alloctated in an ua_writerequest struct.

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

int ua_writerequest_compare ( const struct ua_writerequest a,
const struct ua_writerequest b 
)
related

Compare two ua_writerequest structs.

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

int ua_writerequest_copy ( struct ua_writerequest dst,
const struct ua_writerequest src 
)
related

Create a copy of a ua_writerequest struct.

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

Initialize an ua_writerequest 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_writerequest struct can also be passed to ua_writerequest_clear. This function will always succeed as long as an ua_writerequest struct is passed to it.

static int ua_writerequest_resize_nodes_array ( struct ua_writerequest val,
int32_t  new_len 
)
related

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

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