High Performance OPC UA Server SDK  1.2.0.193
ua_readprocesseddetails Struct Reference

Selects a set of aggregate values from the history database by specifying a time domain for one or more variables. More...

#include <readprocesseddetails.h>

Data Fields

ua_datetime start_time
 The beginning of the period to read.
 
ua_datetime end_time
 The end of the period to read.
 
double processing_interval
 The interval between returned aggregate values. More...
 
struct ua_nodeidaggregate_type
 The NodeId of the HistoryAggregate object that indicates the list of aggregates to be used when retrieving processed history.
 
int32_t num_aggregate_type
 Number of elements in ua_readprocesseddetails::aggregate_type.
 
struct ua_aggregateconfiguration aggregate_configuration
 Allows a Client to override aggregate configuration settings ona per call basis.
 

Related Functions

void ua_readprocesseddetails_init (struct ua_readprocesseddetails *t)
 Initialize an ua_readprocesseddetails struct with a valid value. More...
 
void ua_readprocesseddetails_clear (struct ua_readprocesseddetails *t)
 Clear all resources alloctated in an ua_readprocesseddetails struct. More...
 
int ua_readprocesseddetails_compare (const struct ua_readprocesseddetails *a, const struct ua_readprocesseddetails *b)
 Compare two ua_readprocesseddetails structs. More...
 
int ua_readprocesseddetails_copy (struct ua_readprocesseddetails *dst, const struct ua_readprocesseddetails *src)
 Create a copy of a ua_readprocesseddetails struct. More...
 
static int ua_readprocesseddetails_resize_aggregate_type_array (struct ua_readprocesseddetails *val, int32_t new_len)
 Resize the aggregate_type array of a ua_readprocesseddetails struct. More...
 

Detailed Description

Selects a set of aggregate values from the history database by specifying a time domain for one or more variables.

This structure is used to compute aggregate values, qualities, and timestamps from data in the history database for the specified time domain for one or more HistoricalDataNodes. The time domain is divided into intervals of duration ProcessingInterval. The specified AggregateType is calculated for each interval beginning with startTime by using the data within the next ProcessingInterval.

For example, this function can provide hourly statistics such as maximum, minimum, and average for each item during the specified time domain if ProcessingInterval is 1 hour.

The domain of the request is defined by startTime, endTime, and ProcessingInterval. All three must be specified. If endTime is less than startTime, the data shall be returned in reverse order with later data coming first. If startTime and endTime are the same, the server shall return Bad_InvalidArgument, as there is no meaningful way to interpret such a case.

The aggregateType[] parameter allows a Client to request multiple aggregate calculations per requested NodeId. If multiple aggregates are requested, a corresponding number of entries are required in the NodesToRead array.

For example, requesting Min aggregate for NodeId FIC101, FIC102 and both Min and Max aggregates for NodeId FIC103 would require NodeId FIC103 to appear twice in the NodesToRead array request parameter.

aggregateType[] NodesToRead[]
Min FIC101
Min FIC102
Min FIC103
Max FIC103

If the array of aggregates does not match the array of NodesToRead, the Server shall return a StatusCode of Bad_AggregateListMismatch. The aggregateConfiguration parameter allows a Client to override the aggregate configuration settings supplied by the AggregateConfiguration object on a per call basis. If the Server does not support the ability to override the aggregate configuration settings, it shall return a StatusCode of Bad_AggregateConfigurationRejected. If the aggregate is not valid for the node, the StatusCode shall be Bad_AggregateNotSupported.

The values used in computing the aggregate for each interval shall include any value that falls exactly on the timestamp at beginning of the interval, but shall not include any value that falls directly on the timestamp ending the interval. Thus, each value shall be included only once in the calculation. If the time domain is in reverse order, we consider the later timestamp to be the one beginning the subinterval, and the earlier timestamp to be the one ending it. Note that this means that simply swapping the start and end times will not result in getting the same values back in reverse order, as the interval being requested in the two cases are not the same.

If an aggregate is taking a long time to calculate, the Server can return partial results with a continuation point. This might be done if the calculation is going to take more time than the Client timeout hint. In some cases it may take longer than the Client timeout hint to calculate even one Aggregate result. Then the server may return zero results with a continuation point that allows the server to resume the calculation on the next Client read call.

Friends And Related Function Documentation

void ua_readprocesseddetails_clear ( struct ua_readprocesseddetails t)
related

Clear all resources alloctated in an ua_readprocesseddetails struct.

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

int ua_readprocesseddetails_compare ( const struct ua_readprocesseddetails a,
const struct ua_readprocesseddetails b 
)
related

Compare two ua_readprocesseddetails structs.

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

int ua_readprocesseddetails_copy ( struct ua_readprocesseddetails dst,
const struct ua_readprocesseddetails src 
)
related

Create a copy of a ua_readprocesseddetails struct.

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

Initialize an ua_readprocesseddetails 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_readprocesseddetails struct can also be passed to ua_readprocesseddetails_compare, ua_readprocesseddetails_copy and ua_readprocesseddetails_clear. This function will always succeed as long as an ua_readprocesseddetails struct is passed to it.

static int ua_readprocesseddetails_resize_aggregate_type_array ( struct ua_readprocesseddetails val,
int32_t  new_len 
)
related

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

Field Documentation

processing_interval

The interval between returned aggregate values.

The value 0 indicates that there is no ProcessingInterval defined.


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