High Performance OPC UA Server SDK  1.2.0.193
ua_readeventdetails Struct Reference

Selects a set of events from the history database by specifying a filter and a time domain for one or more objects or views. More...

#include <readeventdetails.h>

Data Fields

uint32_t num_values_per_node
 The maximum number of values returned for any node over the time range. More...
 
ua_datetime start_time
 The beginning of the period to read. More...
 
ua_datetime end_time
 The end of the period to read. More...
 
struct ua_eventfilter filter
 A filter used by the Server to determine which HistoricalEventNode should be included. More...
 

Related Functions

void ua_readeventdetails_init (struct ua_readeventdetails *t)
 Initialize an ua_readeventdetails struct with a valid value. More...
 
void ua_readeventdetails_clear (struct ua_readeventdetails *t)
 Clear all resources alloctated in an ua_readeventdetails struct. More...
 
int ua_readeventdetails_compare (const struct ua_readeventdetails *a, const struct ua_readeventdetails *b)
 Compare two ua_readeventdetails structs. More...
 
int ua_readeventdetails_copy (struct ua_readeventdetails *dst, const struct ua_readeventdetails *src)
 Create a copy of a ua_readeventdetails struct. More...
 

Detailed Description

Selects a set of events from the history database by specifying a filter and a time domain for one or more objects or views.

The ReadEventDetails structure is used to read the events from the history database for the specified time domain for one or more HistoricalEventNodes. The events are filtered based on the filter structure provided. This filter includes the event fields that are to be returned.

The startTime and endTime are used to filter on the Time field for events.

The time domain of the request is defined by startTime, endTime, and numValuesPerNode; at least two of these must be specified. If endTime is less than startTime, or endTime and numValuesPerNode alone are specified, the data will be returned in reverse order with later/newer data provided first, as if time was flowing backward. If all three are specified, the call shall return up to numValuesPerNode results, going from startTime to endTime, in either ascending or descending order, depending on the relative values of startTime and endTime. If numValuesPerNode is 0, all of the values in the range are returned. The default value is used to indicate that startTime, endTime, or numValuesPerNode is not specified.

It is specifically allowed for the startTime and the endTime to be identical. This allows the Client to request the event at a single instance in time. If startTime and endTime are identical, time is presumed to be flowing forward. If no data exists at the time specified, the server must return the Good_NoData StatusCode.

If a startTime, endTime, and numValuesPerNode are all provided, and if more than numValuesPerNode events exist within that time range for a given node, then only numValuesPerNode events per node are returned along with a continuationPoint. When a continuationPoint is returned, a Client wanting the next numValuesPerNode values should call HistoryRead again with the continuationPoint.

For an interval in which no data exists, the corresponding StatusCode shall be Good_NoData.

The filter parameter is used to determine which historical events and their corresponding fields are returned. It is possible that the fields of an EventType are available for real time updating, but not available from the historian. In this case, a StatusCode value will be returned for any event field that cannot be returned. The value of the StatusCode must be Bad_NoData.

If the requested timestamp format is not supported for a node, the operation shall return the Bad_TimestampNotSupported StatusCode. When reading events, this only applies to Event fields that are of type DataValue.

Friends And Related Function Documentation

void ua_readeventdetails_clear ( struct ua_readeventdetails t)
related

Clear all resources alloctated in an ua_readeventdetails struct.

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

int ua_readeventdetails_compare ( const struct ua_readeventdetails a,
const struct ua_readeventdetails b 
)
related

Compare two ua_readeventdetails structs.

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

int ua_readeventdetails_copy ( struct ua_readeventdetails dst,
const struct ua_readeventdetails src 
)
related

Create a copy of a ua_readeventdetails struct.

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

Initialize an ua_readeventdetails 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_readeventdetails struct can also be passed to ua_readeventdetails_compare, ua_readeventdetails_copy and ua_readeventdetails_clear. This function will always succeed as long as an ua_readeventdetails struct is passed to it.

Field Documentation

end_time

The end of the period to read.

The default value of DateTime.MinValue indicates that the endTime is Unspecified.

filter

A filter used by the Server to determine which HistoricalEventNode should be included.

This parameter must be specified and at least one EventField is required. The EventFilter parameter type is an extensible parameter type. It is defined and used in the same manner as defined for monitored data items. This filter also specifies the EventFields that are to be returned as part of the request.

num_values_per_node

The maximum number of values returned for any node over the time range.

If only one time is specified, the time range must extend to return this number of values. The default value of 0 indicates that there is no maximum.

start_time

The beginning of the period to read.

The default value of DateTime.MinValue indicates that the startTime is Unspecified.


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