High Performance OPC UA Server SDK  1.2.0.193

Access for nodeclass variable specific attributes. More...

Functions

int ua_variable_set_datatype (ua_node_t node, struct ua_nodeid *datatype)
 Set the datatype attribute of a variable node. More...
 
int ua_variable_set_builtindatatype (ua_node_t node, enum ua_variant_type type)
 Set the datatype attribute of a variable node to a builtin variant type. More...
 
int ua_variable_get_datatype (ua_node_t node, struct ua_nodeid *datatype)
 Get the datatype attribute of a variable node. More...
 
int ua_variable_set_access_level (ua_node_t node, uint8_t accesslevel)
 Set the accesslevel attribute of a variable node. More...
 
uint8_t ua_variable_get_access_level (ua_node_t node)
 Get the accesslevel attribute of a variable node. More...
 
int ua_variable_set_user_access_level (ua_node_t node, uint8_t accesslevel)
 
uint8_t ua_variable_get_user_access_level (ua_node_t node)
 
int ua_variable_set_historizing (ua_node_t node, bool historizing)
 Set the historizing attribute of a variable node. More...
 
bool ua_variable_get_historizing (ua_node_t node)
 Get the historizing attribute of a variable node. More...
 
int ua_variable_set_valuerank (ua_node_t node, int32_t valuerank)
 Set the valuerank attribute of a variable node. More...
 
int32_t ua_variable_get_valuerank (ua_node_t node)
 Get the valuerank attribute of a variable node. More...
 
int ua_variable_set_arraydimensions (ua_node_t node, int32_t num_dimensions, uint32_t *dimensions)
 
int ua_variable_get_arraydimensions (ua_node_t node, int32_t *num_dimensions, uint32_t *dimensions)
 
int ua_variable_set_minimum_sampling_interval (ua_node_t node, uint32_t minimum_sampling_interval)
 Set the minimum samplinginterval attribute of a variable node. More...
 
uint32_t ua_variable_get_minimum_sampling_interval (ua_node_t node)
 Get the minimum samplinginterval attribute of a variable node. More...
 
double ua_variable_get_minimum_sampling_interval_dbl (ua_node_t node)
 Get the minimum samplinginterval attribute of a variable node as double. More...
 
int ua_variable_set_store_index (ua_node_t node, uint8_t storeindex)
 Set the store index of a variable node. More...
 
int ua_variable_get_store_index (ua_node_t node, uint8_t *storeindex)
 Get the store index of a variable node. More...
 
int ua_variable_set_value_index (ua_node_t node, unsigned int valueindex)
 Set the valueindex of a variable node. More...
 
int ua_variable_get_value_index (ua_node_t node, unsigned int *valueindex)
 Get the valueindex of a variable node. More...
 
int ua_variable_set_attributes (ua_node_t node, struct ua_nodeid *datatype_id, int32_t valuerank, uint8_t access_level, bool historizing)
 Set the mandatory attributes of a variable node. More...
 
int ua_variable_copy (ua_node_t dst, ua_node_t src)
 Copy the attributes from the variable node src to dst. More...
 
int ua_variable_get_access_level_store_value_index (ua_node_t node, uint8_t *accesslevel, uint8_t *storeindex, unsigned int *valueindex)
 Combines the functionality of ua_variable_get_access_level, ua_variable_get_store_index and ua_variable_get_value_index. More...
 

Detailed Description

Access for nodeclass variable specific attributes.

Function Documentation

int ua_variable_copy ( ua_node_t  dst,
ua_node_t  src 
)

Copy the attributes from the variable node src to dst.

If the value is readonly the valueindex and storeindex are copied, so the src and dst nodes point to the same value. The arraydimension are also not copied as these are not completely implemented yet.

uint8_t ua_variable_get_access_level ( ua_node_t  node)

Get the accesslevel attribute of a variable node.

Parameters
nodeHandle of node to get the accesslevel.
Returns
Accesslevel of the node.
See also
ua_accesslevel
int ua_variable_get_access_level_store_value_index ( ua_node_t  node,
uint8_t *  accesslevel,
uint8_t *  storeindex,
unsigned int *  valueindex 
)

Combines the functionality of ua_variable_get_access_level, ua_variable_get_store_index and ua_variable_get_value_index.

This information is often needed at once and it is much more efficient to get it at once, so this function is a pure performance optimization.

Parameters
nodeNode of class variable to get the attributes.
accesslevelPointer to value where the access level is written to.
storeindexPointer to value where the store index is written to.
valueindexPointer to value where the value index is written to.
Returns
Zero on success or errorcode on failure.
int ua_variable_get_datatype ( ua_node_t  node,
struct ua_nodeid datatype 
)

Get the datatype attribute of a variable node.

Parameters
nodeHandle of node to get datatype.
datatypeNodeid representing the datatype of the node.
Returns
Zero on success or errorcode on failure
bool ua_variable_get_historizing ( ua_node_t  node)

Get the historizing attribute of a variable node.

Parameters
nodeHandle of node to get the historizing attribute.
Returns
True if historizing is enabled for the node, false otherwise.
uint32_t ua_variable_get_minimum_sampling_interval ( ua_node_t  node)

Get the minimum samplinginterval attribute of a variable node.

Parameters
nodeHandle of node to get the the attribute.
Returns
Minimum samplinginterval
double ua_variable_get_minimum_sampling_interval_dbl ( ua_node_t  node)

Get the minimum samplinginterval attribute of a variable node as double.

Parameters
nodeHandle of node to get the the attribute.
Returns
Minimum samplinginterval
int ua_variable_get_store_index ( ua_node_t  node,
uint8_t *  storeindex 
)

Get the store index of a variable node.

Parameters
nodeHandle of node to get store index.
storeindexPointer to value where the store index is written to.
Returns
Zero on success or errorcode on failure
int ua_variable_get_value_index ( ua_node_t  node,
unsigned int *  valueindex 
)

Get the valueindex of a variable node.

Parameters
nodeHandle of node to get valueindex.
valueindexPointer to value where the valueindex is written to.
Returns
Zero on success or errorcode on failure
int32_t ua_variable_get_valuerank ( ua_node_t  node)

Get the valuerank attribute of a variable node.

Parameters
nodeHandle of node to get the valuerank
Returns
Valuerank of the node.
See also
ua_valuerank
int ua_variable_set_access_level ( ua_node_t  node,
uint8_t  accesslevel 
)

Set the accesslevel attribute of a variable node.

Parameters
nodeHandle of node to set accesslevel.
accesslevelAccesslevel to set. Multiple accesslevels can be combined with the bitwise OR operator.
Returns
Zero on success or errorcode on failure
See also
ua_accesslevel
int ua_variable_set_attributes ( ua_node_t  node,
struct ua_nodeid datatype_id,
int32_t  valuerank,
uint8_t  access_level,
bool  historizing 
)

Set the mandatory attributes of a variable node.

Parameters
nodeNode of class variable to set the attributes.
datatype_idNodeid of the datatype of the variable node.
valuerankValuerank of the variable node.
access_levelAccesslevel of the variable node.
historizingTrue if the variable supports history access.
Returns
0 on success or errorcode on failure.
int ua_variable_set_builtindatatype ( ua_node_t  node,
enum ua_variant_type  type 
)

Set the datatype attribute of a variable node to a builtin variant type.

Parameters
nodeHandle of node to set the datatype.
typeVariant type to set as datatype.
Returns
Zero on success or errorcode on failure
int ua_variable_set_datatype ( ua_node_t  node,
struct ua_nodeid datatype 
)

Set the datatype attribute of a variable node.

Parameters
nodeHandle of node to set the datatype.
datatypeNodeid to set as datatype. The node must exist in the server addressspace.
Returns
Zero on success or errorcode on failure
int ua_variable_set_historizing ( ua_node_t  node,
bool  historizing 
)

Set the historizing attribute of a variable node.

Parameters
nodeHandle of node to set historizing attribute.
historizingTrue if historizing is enabled for the node, false otherwise.
Returns
Zero on success or errorcode on failure
int ua_variable_set_minimum_sampling_interval ( ua_node_t  node,
uint32_t  minimum_sampling_interval 
)

Set the minimum samplinginterval attribute of a variable node.

Parameters
nodeHandle of node to set the the attribute.
minimum_sampling_intervalMinimum samplinginterval to set.
Returns
Zero on success or errorcode on failure
int ua_variable_set_store_index ( ua_node_t  node,
uint8_t  storeindex 
)

Set the store index of a variable node.

The storeindex may only be set values for which a store was registered with ua_globalstore_register_store.

Parameters
nodeHandle of node to set store index.
storeindexStore index to set.
Returns
Zero on success or errorcode on failure
int ua_variable_set_value_index ( ua_node_t  node,
unsigned int  valueindex 
)

Set the valueindex of a variable node.

The valueindex may be used in combination with a valuestore or freely by the user for an arbitrary index

Parameters
nodeHandle of node to set valueindex.
valueindexValue for the valueindex.
Returns
Zero on success or errorcode on failure
int ua_variable_set_valuerank ( ua_node_t  node,
int32_t  valuerank 
)

Set the valuerank attribute of a variable node.

Parameters
nodeHandle of node to set the valuerank
valuerankValuerank to set.
Returns
Zero on success or errorcode on failure
See also
ua_valuerank