High Performance OPC UA Server SDK  1.2.0.193
ua_optionset Struct Reference

This abstract DataType is the base DataType for all DataTypes representing a bit mask. More...

#include <optionset.h>

Data Fields

struct ua_bytestring value
 Array of bytes representing the bits in the option set. More...
 
struct ua_bytestring valid_bits
 Array of bytes with same size as value representing the valid bits in the value parameter. More...
 

Related Functions

void ua_optionset_init (struct ua_optionset *t)
 Initialize an ua_optionset struct with a valid value. More...
 
void ua_optionset_clear (struct ua_optionset *t)
 Clear all resources alloctated in an ua_optionset struct. More...
 
int ua_optionset_compare (const struct ua_optionset *a, const struct ua_optionset *b)
 Compare two ua_optionset structs. More...
 
int ua_optionset_copy (struct ua_optionset *dst, const struct ua_optionset *src)
 Create a copy of a ua_optionset struct. More...
 

Detailed Description

This abstract DataType is the base DataType for all DataTypes representing a bit mask.

All OptionSet DataTypes representing bit masks shall inherit from this DataType.

The DataType Nodes representing concrete subtypes of the OptionSet shall have an OptionSetValues Property.

Friends And Related Function Documentation

void ua_optionset_clear ( struct ua_optionset t)
related

Clear all resources alloctated in an ua_optionset struct.

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

int ua_optionset_compare ( const struct ua_optionset a,
const struct ua_optionset b 
)
related

Compare two ua_optionset structs.

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

int ua_optionset_copy ( struct ua_optionset dst,
const struct ua_optionset src 
)
related

Create a copy of a ua_optionset struct.

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

Initialize an ua_optionset 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_optionset struct can also be passed to ua_optionset_compare, ua_optionset_copy and ua_optionset_clear. This function will always succeed as long as an ua_optionset struct is passed to it.

Field Documentation

valid_bits

Array of bytes with same size as value representing the valid bits in the value parameter.

When the Server returns the value to the Client, the ValidBits provides information of which bits in the bit mask have a meaning. When the Client passes the value to the Server, the ValidBits defines which bits should be written. Only those bits defined in ValidBits are changed in the bit mask, all others stay the same.

value

Array of bytes representing the bits in the option set.

The length of the ByteString depends on the number of bits.


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