High Performance OPC UA Server SDK  1.2.0.193

Addressspace helper and diagnostic functions. More...

Typedefs

typedef int(* ua_addressspace_traversal_cb )(ua_node_t node, unsigned int depth, void *cb_data)
 function pointer that must be provided as callback for traversal
 

Enumerations

enum  ua_addressspace_validate_value { ua_addressspace_validate_value_none, ua_addressspace_validate_value_read, ua_addressspace_validate_value_write }
 Enum to determine how to validate value attribute. More...
 

Functions

ua_ref_t ua_reference_find_with_type (ua_node_t node, ua_node_t reftype)
 Search a node for a reference with a certain type. More...
 
ua_ref_t ua_reference_find_inv_with_type (ua_node_t node, ua_node_t reftype)
 Search a node for a inverse reference with a certain type. More...
 
bool ua_node_is_subtypeof (ua_node_t type, ua_node_t basetype)
 Test if one node is a subtype of another node. More...
 
ua_node_t ua_node_get_typedefinition (ua_node_t node)
 Get the typedefinition node of node. More...
 
int ua_addressspace_validate (unsigned int max_recursion_depth, enum ua_addressspace_validate_value validate_value)
 Start at the rootfolder node and browse recursively through the addressspace following all hierachical forward references. More...
 
int ua_addressspace_traverse (ua_node_t node, unsigned int max_recursion_depth, ua_addressspace_traversal_cb fct, void *cb_data)
 Function for browse recursion. More...
 

Detailed Description

Addressspace helper and diagnostic functions.

Enumeration Type Documentation

Enum to determine how to validate value attribute.

Enumerator
ua_addressspace_validate_value_none 

Do not validate value at all.

ua_addressspace_validate_value_read 

Read value attributes.

ua_addressspace_validate_value_write 

Read and write value attributes.

Function Documentation

int ua_addressspace_traverse ( ua_node_t  node,
unsigned int  max_recursion_depth,
ua_addressspace_traversal_cb  fct,
void *  cb_data 
)

Function for browse recursion.

Returns
Number of browsed nodes on success or negative errorcode on failure.
int ua_addressspace_validate ( unsigned int  max_recursion_depth,
enum ua_addressspace_validate_value  validate_value 
)

Start at the rootfolder node and browse recursively through the addressspace following all hierachical forward references.

For every node that is encountered, some attributes are read and checked for validity (like browsename/displayname must have length > 0). The value attribute is validated according to validate_value.

In case of an error the browsepath to the erroneous is written at trace level error and a negative errorcode is returned. On success the number of browsed nodes is returned.

ua_node_t ua_node_get_typedefinition ( ua_node_t  node)

Get the typedefinition node of node.

Parameters
nodeHandle of node to get typedefinition from.
Returns
Handle to typedefinition node, or UA_NODE_INVALID if the node has no typedefinition.
bool ua_node_is_subtypeof ( ua_node_t  type,
ua_node_t  basetype 
)

Test if one node is a subtype of another node.

A node is a subtype if it is referenced over one or more levels with HASSUBTYPE references by its basetype. Every node is also a subtype of itself.

Parameters
typeHandle of the possible subtype node.
basetypeHandle of the basetype node.
Returns
True if the type node is a subtype of the basetype node.
ua_ref_t ua_reference_find_inv_with_type ( ua_node_t  node,
ua_node_t  reftype 
)

Search a node for a inverse reference with a certain type.

Parameters
nodeHandle of node to search.
reftypehandle of the type node of the reference to find.
Returns
Handle of the found reference, or UA_REF_INVALID if none exists.
ua_ref_t ua_reference_find_with_type ( ua_node_t  node,
ua_node_t  reftype 
)

Search a node for a reference with a certain type.

Parameters
nodeHandle of node to search.
reftypehandle of the type node of the reference to find.
Returns
Handle of the found reference, or UA_REF_INVALID if none exists.