High Performance OPC UA Server SDK  1.2.0.193
ua_updatestructuredatadetails Struct Reference

This function inserts, replaces or removes structured history data or annotations into the history database at the specified timestamps for one or more HistoricalDataNodes. More...

#include <updatestructuredatadetails.h>

Data Fields

struct ua_nodeid node_id
 NodeId of the object to be updated.
 
enum ua_performupdatetype perform_insert_replace
 Determines which action of insert, replace, update, or remove is performed. More...
 
struct ua_datavalueupdate_values
 New values to be inserted, replaced, or removed.
 
int32_t num_update_values
 Number of elements in ua_updatestructuredatadetails::update_values.
 

Related Functions

void ua_updatestructuredatadetails_init (struct ua_updatestructuredatadetails *t)
 Initialize an ua_updatestructuredatadetails struct with a valid value. More...
 
void ua_updatestructuredatadetails_clear (struct ua_updatestructuredatadetails *t)
 Clear all resources alloctated in an ua_updatestructuredatadetails struct. More...
 
int ua_updatestructuredatadetails_compare (const struct ua_updatestructuredatadetails *a, const struct ua_updatestructuredatadetails *b)
 Compare two ua_updatestructuredatadetails structs. More...
 
int ua_updatestructuredatadetails_copy (struct ua_updatestructuredatadetails *dst, const struct ua_updatestructuredatadetails *src)
 Create a copy of a ua_updatestructuredatadetails struct. More...
 
static int ua_updatestructuredatadetails_resize_update_values_array (struct ua_updatestructuredatadetails *val, int32_t new_len)
 Resize the update_values array of a ua_updatestructuredatadetails struct. More...
 

Detailed Description

This function inserts, replaces or removes structured history data or annotations into the history database at the specified timestamps for one or more HistoricalDataNodes.

Structured history data provides metadata describing an entry in the history database. The server shall define what uniqueness means for each structured history data structure type. For example, a server may only allow one annotation per timestamp, which means the timestamp is the unique key for the structure. Another server may allow for multiple annotations to exist per user, so a combination of a username, timestamp, and message may be used as the unique key for the structure. In the following sections the terms “Structured Histroy Data exists” and “at the specificed parameters” means a matching entry has been found at the specified timestamp using the Server’s criteria for uniqueness.

In the case where the Client wishes to replace a parameter that is part of the uniqueness criteria, the resulting StatusCode would be Bad_NoEntryExists. The Client must remove the existing structure and then insert the new structure.

Insert functionality
Setting performInsertReplace = INSERT_1 inserts structured history data, such as annotations, into the history database at the specified parameters for one or more properties of HistoricalDataNodes.

If a structured history data entry already exists at the specified parameters, the StatusCode shall indicate Bad_EntryExists.

Replace functionality
Setting performInsertReplace = REPLACE_2 replaces structured history data such as annotations in the history database at the specified parameters for one or more properties of HistoricalDataNodes.

If a structured history data entry does not already exist at the specified parameters, the StatusCode shall indicate Bad_NoEntryExists.

Update functionality
Setting performInsertReplace = UPDATE_3 inserts or replaces structured history data such as annotations in the history database at the specified parameters for one or more properties of HistoricalDataNodes.

If a structure history data entry already exists at the specified paramters, it is deleted and the value provided by the Client is inserted. If no existing entry exists, the new entry is inserted.

If an existing entry was replaced successfully, the StatusCode shall be Good_EntryReplaced. If a new entry was created, the StatusCode shall be Good_EntryInserted. If the server cannot determine whether it replaced or inserted an entry, the StatusCode shall be Good.

Remove functionality
Setting performInsertReplace = REMOVE_4 removes structured history data such as annotations from the history database at the specified parameters for one or more properties of HistoricalDataNodes.

If a structure history data entry exists at the specified parameters, it is deleted. If structured history data does not already exist at the specified parameters, the StatusCode shall indicate Bad_NoEntryExists.

Friends And Related Function Documentation

void ua_updatestructuredatadetails_clear ( struct ua_updatestructuredatadetails t)
related

Clear all resources alloctated in an ua_updatestructuredatadetails struct.

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

int ua_updatestructuredatadetails_compare ( const struct ua_updatestructuredatadetails a,
const struct ua_updatestructuredatadetails b 
)
related

Compare two ua_updatestructuredatadetails structs.

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

int ua_updatestructuredatadetails_copy ( struct ua_updatestructuredatadetails dst,
const struct ua_updatestructuredatadetails src 
)
related

Create a copy of a ua_updatestructuredatadetails struct.

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

Initialize an ua_updatestructuredatadetails 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_updatestructuredatadetails struct can also be passed to ua_updatestructuredatadetails_compare, ua_updatestructuredatadetails_copy and ua_updatestructuredatadetails_clear. This function will always succeed as long as an ua_updatestructuredatadetails struct is passed to it.

static int ua_updatestructuredatadetails_resize_update_values_array ( struct ua_updatestructuredatadetails val,
int32_t  new_len 
)
related

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

Field Documentation

perform_insert_replace

Determines which action of insert, replace, update, or remove is performed.

Possible values are INSERT_1, REPLACE_2, UPDATE_3, or REMOVE_4.


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