High Performance OPC UA Server SDK  1.2.1.203
ua_datavalue Struct Reference

The value and associated information. More...

#include <datavalue.h>

Public Member Functions

void ua_datavalue_init (struct ua_datavalue *v)
 Initializes v by setting all members to zero.
 
void ua_datavalue_clear (struct ua_datavalue *v)
 Free all resources referenced by v and resets it to it's initialized empty state.
 
int ua_datavalue_compare (const struct ua_datavalue *a, const struct ua_datavalue *b)
 Compares to data values. More...
 
int ua_datavalue_copy (struct ua_datavalue *dst, const struct ua_datavalue *src)
 Creates a deep copy of src. More...
 

Data Fields

struct ua_variant value
 The data value. More...
 
ua_statuscode status
 The StatusCode that defines with the Server’s ability to access/provide the value.
 
ua_datetime server_timestamp
 The serverTimestamp is used to reflect the time that the Server received a Variable value or knew it to be accurate.
 
ua_datetime source_timestamp
 The sourceTimestamp is used to reflect the timestamp that was applied to a Variable value by the data source. More...
 

Detailed Description

The value and associated information.

Member Function Documentation

int ua_datavalue_compare ( const struct ua_datavalue a,
const struct ua_datavalue b 
)

Compares to data values.

The result of this operating can be used for sorting.

Sort criterias by priority:

  1. Values: Uses ua_variant_compare
  2. Status: Uses ua_statuscode_compare
  3. ServerTimeStamp: Uses ua_datetime_compare
  4. SourceTimeStamp: USes ua_datetime_compare
Parameters
aFirst datavalue
bSecond datavalue
Returns
Zero if equal, a value smaller than zero if a is considired to be smaller than b, a value bigger than zero otherwise.
int ua_datavalue_copy ( struct ua_datavalue dst,
const struct ua_datavalue src 
)

Creates a deep copy of src.

Parameters
srcdata value source.
dstdata value destination.
Returns
Zero on success, a negative error code (e.g. UA_EBADNOMEM) on failure.

Field Documentation

source_timestamp

The sourceTimestamp is used to reflect the timestamp that was applied to a Variable value by the data source.

Once a value has been assigned a source timestamp, the source timestamp for that value instance never changes.

value

The data value.

If the StatusCode indicates an error, the value is to be ignored and the Server shall set it to null.


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