High Performance OPC UA Server SDK  1.2.0.193
ua_historyreadrequest Struct Reference

Asynchronously reads historical values or events of one or more nodes. More...

#include <historyreadrequest.h>

Data Fields

struct ua_extensionobject history_read_details
 The details define the types of history reads that can be performed. More...
 
enum ua_timestampstoreturn ts
 An enumeration that specifies the timestamps to be returned for each requested variable value attribute. More...
 
bool release_continuation_points
 A Boolean parameter indicating whether to reset passed continuation points. More...
 
struct ua_historyreadvalueidnodes
 contains the list of items upon which the historical retrieval is to be performed.
 
int32_t num_nodes
 Number of elements in ua_historyreadrequest::nodes.
 

Related Functions

void ua_historyreadrequest_init (struct ua_historyreadrequest *t)
 Initialize an ua_historyreadrequest struct with a valid value. More...
 
void ua_historyreadrequest_clear (struct ua_historyreadrequest *t)
 Clear all resources alloctated in an ua_historyreadrequest struct. More...
 
int ua_historyreadrequest_compare (const struct ua_historyreadrequest *a, const struct ua_historyreadrequest *b)
 Compare two ua_historyreadrequest structs. More...
 
int ua_historyreadrequest_copy (struct ua_historyreadrequest *dst, const struct ua_historyreadrequest *src)
 Create a copy of a ua_historyreadrequest struct. More...
 
static int ua_historyreadrequest_resize_nodes_array (struct ua_historyreadrequest *val, int32_t new_len)
 Resize the nodes array of a ua_historyreadrequest struct. More...
 

Detailed Description

Asynchronously reads historical values or events of one or more nodes.

For constructed attribute values whose elements are indexed, such as an array, this service allows Clients to read the entire set of indexed values as a composite, to read individual elements or to read ranges of elements of the composite. Servers may make historical values available to Clients using this service, although the historical values themselves are not visible in the address space.

The continuationPoint parameter in the HistoryRead is used to mark a point from which to continue the read if not all values could be returned in one response. The value is opaque for the Client and is only used to maintain the state information for the Server to continue from. A Server may use the timestamp of the last returned data item if the timestamp is unique. This can reduce the need in the Server to store state information for the continuation point.

In some cases it may take longer than the Client timeout hint to read the data for all nodes to read. Then the Server may return zero results with a continuation point for the affected nodes before the timeout expires. That allows the Server to resume the data acquisition on the next Client read call.

Friends And Related Function Documentation

void ua_historyreadrequest_clear ( struct ua_historyreadrequest t)
related

Clear all resources alloctated in an ua_historyreadrequest struct.

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

int ua_historyreadrequest_compare ( const struct ua_historyreadrequest a,
const struct ua_historyreadrequest b 
)
related

Compare two ua_historyreadrequest structs.

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

int ua_historyreadrequest_copy ( struct ua_historyreadrequest dst,
const struct ua_historyreadrequest src 
)
related

Create a copy of a ua_historyreadrequest struct.

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

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

static int ua_historyreadrequest_resize_nodes_array ( struct ua_historyreadrequest val,
int32_t  new_len 
)
related

Resize the nodes array of a ua_historyreadrequest 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.

Field Documentation

history_read_details

The details define the types of history reads that can be performed.

The HistoryReadDetails parameter type is an extensible parameter. It may contain one of the following: ua_readeventdetails, ua_readrawmodifieddetails, ua_readprocesseddetails, ua_readattimedetails.

release_continuation_points

A Boolean parameter indicating whether to reset passed continuation points.

It has the following values:

TRUE
passed continuation points shall be reset to free resources in the Server.
FALSE
passed continuation points shall be used to get the next set of historical information.

A Client shall always use the continuation point returned by a HistoryRead response to free the resources for the continuation point in the Server. If the Client does not want to get the next set of historical information, HistoryRead shall be called with this parameter set to TRUE.

ts

An enumeration that specifies the timestamps to be returned for each requested variable value attribute.

Specifying a TimestampsToReturn of NEITHER is not valid. A Server shall return a Bad_InvalidTimestampArgument StatusCode in this case.


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