High Performance OPC UA Server SDK
1.1.0.158
|
Create/delete/iterate through references. More...
Macros | |
#define | UA_REF_INVALID (ua_ref_t)-1 |
Value of an invalid reference handle. | |
#define | UA_REF_BEFORE_LIST (ua_ref_t)-2 |
#define | UA_NSIDX_INVALID (uint16_t)-1 |
#define | ua_node_foreach(ref, node) for (ref = ua_node_first_reference(node); ref != UA_REF_INVALID; ref = (ref == UA_REF_BEFORE_LIST) ? ua_node_first_reference(node) : ua_node_next_reference(ref)) |
Foreach loop for iterating over all forward references of a node. | |
#define | ua_node_foreach_inv(ref, node) for (ref = ua_node_first_inv_reference(node); ref != UA_REF_INVALID; ref = (ref == UA_REF_BEFORE_LIST) ? ua_node_first_inv_reference(node) : ua_node_next_inv_reference(ref)) |
Foreach loop for iterating over all inverse references of a node. | |
Typedefs | |
typedef int32_t | ua_ref_t |
Handle for a reference in the addressspace. | |
Functions | |
ua_ref_t | ua_node_first_reference (ua_node_t node) |
Get the first reference of a node. More... | |
ua_ref_t | ua_node_next_reference (ua_ref_t ref) |
Get the next reference of a node. More... | |
ua_ref_t | ua_node_first_inv_reference (ua_node_t node) |
Get the first inverse reference of a node. More... | |
ua_ref_t | ua_node_next_inv_reference (ua_ref_t ref) |
Get the next inverse reference of a node. More... | |
unsigned int | ua_node_forward_ref_count (ua_node_t node) |
Get the number of forward references for a node. More... | |
unsigned int | ua_node_inverse_ref_count (ua_node_t node) |
Get the number of inverse references for a node. More... | |
ua_ref_t | ua_reference_add (ua_node_t src, ua_node_t dst, ua_node_t reftype) |
Adds a new reference to the given src node. More... | |
ua_ref_t | ua_reference_add0 (ua_node_t src, ua_node_t dst, uint32_t reftypeid) |
Convenience function for adding a reference with reftype from NS0. More... | |
int | ua_reference_remove (ua_ref_t ref, ua_ref_t *prev_ref, ua_ref_t *prev_inv_ref) |
Remove a reference from the addressspace. More... | |
ua_node_t | ua_reference_target (ua_ref_t ref) |
Get the target node of a reference. More... | |
ua_node_t | ua_reference_source (ua_ref_t ref) |
Get the source node of a reference. More... | |
ua_node_t | ua_reference_type (ua_ref_t ref) |
Get the type node of a reference. More... | |
Create/delete/iterate through references.
Get the first inverse reference of a node.
Get the first reference of a node.
You can iterate through all references of a node by combining this function with ua_node_next_reference. Or use ua_node_foreach.
node | Handle to get reference from. |
unsigned int ua_node_forward_ref_count | ( | ua_node_t | node | ) |
Get the number of forward references for a node.
node | handle of node |
unsigned int ua_node_inverse_ref_count | ( | ua_node_t | node | ) |
Get the number of inverse references for a node.
node | handle of node |
Get the next inverse reference of a node.
Get the next reference of a node.
ref | handle to current reference |
Adds a new reference to the given src node.
src | source node handle |
dst | destination node handle |
reftype | reference type node handle Note, the reference is added to the reference pool in the same namespace as the source node. So the source node 'owns' the reference. |
Convenience function for adding a reference with reftype from NS0.
Remove a reference from the addressspace.
ref | reference handle of reference to remove |
prev_ref | returns the previous forward reference on success. The reason for this is to make it possible to remove references while iterating of the forward references list. It is not allowed to call ua_node_next_reference() on a deleted reference. By returning the previous reference the ua_node_next_reference() will work and returns the next valid reference, skipping the deleted one. The parameter is optional, it is allowed the pass NULL, if the previous reference is not needed. Note, if the first reference was deleted *prev_ref will be set to UA_REF_BEFORE_LIST. If the function return a non-zero return value, the value of *prev_ref is undefined. |
pref_inv_ref | the same as prev_ref for reverse references. This allows to call ua_node_next_inv_reference with UA_REF_BEFORE_LIST. |
Get the source node of a reference.
ref | Handle of the reference. |
Get the target node of a reference.
ref | Handle of the reference. |