High Performance OPC UA Server SDK
1.1.0.158
|
Create/delete/find nodes and access base attributes. More...
Macros | |
#define | UA_NODE_INVALID (ua_node_t)-1 |
Value of an invalid node handle. | |
#define | UA_NODE_ID_TMP_STRING 0x3FFFFFFF |
Typedefs | |
typedef int32_t | ua_node_t |
Handle for a node in the addressspace. | |
Functions | |
ua_node_t | ua_node_create (uint16_t, enum ua_nodeclass type) |
Create a new node from class type in the namespace with index nsidx . More... | |
ua_node_t | ua_node_create_with_attributes (struct ua_nodeid *nodeid, enum ua_nodeclass nodeclass, uint16_t browsename_nsidx, const char *browsename, const char *displayname, ua_node_t typedef_node, ua_node_t parent, ua_node_t reftype_node) |
Create a new node with basic attributes. More... | |
int | ua_node_delete (ua_node_t node) |
Delete a node from the addressspace and clear all attributes. More... | |
enum ua_nodeclass | ua_node_get_nodeclass (ua_node_t node) |
Get the nodeclass of the node . | |
int | ua_node_set_nodeid (ua_node_t node, const struct ua_nodeid *id) |
Sets the nodeid attribute of the given node. More... | |
int | ua_node_get_nodeid (ua_node_t node, struct ua_nodeid *id) |
Returns the nodeid of the given node. More... | |
int | ua_node_set_displayname (ua_node_t node, const char *name) |
Sets the displayname attribute of the given node . More... | |
int | ua_node_set_displayname_n (ua_node_t node, const char *name, size_t len) |
Sets the displayname attribute of the given node . More... | |
const char * | ua_node_get_displayname (ua_node_t node) |
Returns the text part of the displayname attribute. More... | |
int | ua_node_set_browsename (ua_node_t node, const char *name) |
Sets the browsename attribute of the given node . More... | |
int | ua_node_set_browsename_n (ua_node_t node, const char *name, size_t len) |
Sets the browsename attribute of the given node . More... | |
int | ua_node_set_browsename0 (ua_node_t node, const char *name) |
Sets the browsename attribute of the given node . More... | |
int | ua_node_set_browsename0_n (ua_node_t node, const char *name, size_t len) |
Sets the browsename attribute of the given node . More... | |
int | ua_node_set_browsename_ex (ua_node_t node, const struct ua_qualifiedname *qn) |
Sets the browsename attribute of the given node . More... | |
int | ua_node_get_browsename (ua_node_t node, struct ua_qualifiedname *qn) |
Returns the browsename attribute as qualifiedname. More... | |
int | ua_node_set_description (ua_node_t node, const char *text) |
Sets the description attribute of the given node . More... | |
int | ua_node_set_description_n (ua_node_t node, const char *text, size_t len) |
Sets the description attribute of the given node . More... | |
const char * | ua_node_get_description (ua_node_t node) |
Returns the text part of the description attribute. More... | |
int | ua_node_get_dataindex (ua_node_t node) |
ua_node_t | ua_node_create_with_type (uint16_t, enum ua_nodeclass type, ua_node_t type_id) |
Create a node with a typedefinition from any namespace. More... | |
ua_node_t | ua_node_create_with_type0 (uint16_t, enum ua_nodeclass type, uint32_t type_id) |
Create a node with a typedefinition from namespace zero. More... | |
int | ua_node_set_flag (ua_node_t node, uint8_t bit, uint8_t flag) |
Set the flag value in the given node. More... | |
int | ua_node_get_flag (ua_node_t node, uint8_t bit) |
Returns the flag value of the given node. More... | |
int | ua_node_initialize_nodes (void) |
Initialize the well known node handles, this is automatically done in the serverprovider, but must be done manually if the serverprovider is not loaded. | |
ua_node_t | ua_node_find (const struct ua_nodeid *id) |
Finds a node by its NodeId. More... | |
ua_node_t | ua_node_find0 (uint32_t numeric_id) |
Convenience function for finding nodes is OPC.UA namespace 0 based on their numeric nodeid. More... | |
ua_node_t | ua_node_find_numeric (uint16_t nsindex, uint32_t numeric_id) |
Convenience function for finding nodes based on their numeric nodeid. More... | |
ua_node_t | ua_node_find_string (uint16_t nsindex, const char *string_id) |
Convenience function for finding nodes based on their string nodeid. More... | |
Variables | |
ua_node_t | UA_NODE_HASPROPERTY |
ua_node_t | UA_NODE_HASCOMPONENT |
ua_node_t | UA_NODE_HASTYPEDEFINITION |
ua_node_t | UA_NODE_HASSUBTYPE |
ua_node_t | UA_NODE_HASMODELLINGRULE |
ua_node_t | UA_NODE_OBJECTSFOLDER |
ua_node_t | UA_NODE_ORGANIZES |
ua_node_t | UA_NODE_HIERARCHICALREFERENCES |
ua_node_t | UA_NODE_NONHIERARCHICALREFERENCES |
ua_node_t | UA_NODE_FOLDERTYPE |
ua_node_t | UA_NODE_BASEDATAVARIABLETYPE |
ua_node_t | UA_NODE_PROPERTYTYPE |
ua_node_t | UA_NODE_BASEDATATYPE |
ua_node_t | UA_NODE_BASEOBJECTTYPE |
Create/delete/find nodes and access base attributes.
ua_node_t ua_node_create | ( | uint16_t | nsidx, |
enum ua_nodeclass | type | ||
) |
Create a new node from class type
in the namespace with index nsidx
.
The attributes of the new node are not set and must be initialized with the corresponding setter.
ua_node_t ua_node_create_with_attributes | ( | struct ua_nodeid * | nodeid, |
enum ua_nodeclass | nodeclass, | ||
uint16_t | browsename_nsidx, | ||
const char * | browsename, | ||
const char * | displayname, | ||
ua_node_t | typedef_node, | ||
ua_node_t | parent, | ||
ua_node_t | reftype_node | ||
) |
Create a new node with basic attributes.
Create a new node in the addressspace and set the mandatory base attributes. Optionally add a HasTypeDefinition reference and a reference from the the parent node to this node.
nodeid | Nodeid of the new node (mandatory). |
nodeclass | Nodeclass of the new node (mandatory). |
browsename_nsidx | Namespaceindex of the browsename of the new node (mandatory). |
browsename | Browsename of the new node (mandatory). |
displayname | Displayname of the new node, if NULL the browsename will be used. |
typedef_node | Target for the HasTypeDefinition reference of the new node. If UA_NODE_INVALID no HasTypeDefinition reference is created. |
parent | Parent node to create a reference from, if UA_NODE_INVALID no reference to the parent is created. |
reftype_node | Type of the reference from the parent, if UA_NODE_INVALID no reference to the parent is created. |
ua_node_t ua_node_create_with_type | ( | uint16_t | nsidx, |
enum ua_nodeclass | type, | ||
ua_node_t | type_id | ||
) |
Create a node with a typedefinition from any namespace.
This will create a new node and add a reference to the typedefinition node.
nsidx | index of the namespace to create the node in |
type | class of the new node |
type_id | node handle of the typedefinition node |
ua_node_t ua_node_create_with_type0 | ( | uint16_t | nsidx, |
enum ua_nodeclass | type, | ||
uint32_t | type_id | ||
) |
Create a node with a typedefinition from namespace zero.
nsidx | index of the namespace to create the node in |
type | class of the new node |
type_id | numeric identifier of the typedefinition node from namespace zero. |
int ua_node_delete | ( | ua_node_t | node | ) |
Delete a node from the addressspace and clear all attributes.
References to and from the node are NOT deleted.
node | Node to delete |
Finds a node by its NodeId.
id | The NodeId to search for. |
ua_node_t ua_node_find0 | ( | uint32_t | numeric_id | ) |
Convenience function for finding nodes is OPC.UA namespace 0 based on their numeric nodeid.
numeric_id | Numeric NodeId. You can use the defines from identifiers.h for this. |
ua_node_t ua_node_find_numeric | ( | uint16_t | nsindex, |
uint32_t | numeric_id | ||
) |
Convenience function for finding nodes based on their numeric nodeid.
ua_node_t ua_node_find_string | ( | uint16_t | nsindex, |
const char * | string_id | ||
) |
Convenience function for finding nodes based on their string nodeid.
int ua_node_get_browsename | ( | ua_node_t | node, |
struct ua_qualifiedname * | qn | ||
) |
Returns the browsename attribute as qualifiedname.
node | the node handle |
qn | the variable which receives the operation result |
const char* ua_node_get_description | ( | ua_node_t | node | ) |
Returns the text part of the description attribute.
node | the node handle |
const char* ua_node_get_displayname | ( | ua_node_t | node | ) |
Returns the text part of the displayname attribute.
node | the node handle |
int ua_node_get_flag | ( | ua_node_t | node, |
uint8_t | bit | ||
) |
Returns the flag value of the given node.
node | the node handle |
bit | the bit index. Only bits 6-7 are allowed to be used by the application. Bits 0-5 are reserved for the SDK and are described in node.h. |
Returns the nodeid of the given node.
node | The node handle. |
id | NodeId result |
int ua_node_set_browsename | ( | ua_node_t | node, |
const char * | name | ||
) |
Sets the browsename attribute of the given node
.
This function will use the node's namespace index also for the qualifiedname.
node | the node handle |
name | the text part of the browsename (qualifiedname) |
int ua_node_set_browsename0 | ( | ua_node_t | node, |
const char * | name | ||
) |
Sets the browsename attribute of the given node
.
This function is provided for convenience is used to set qualifiednames which are defined in NS 0.
node | the node handle |
name | the browsname as qualifiedname |
int ua_node_set_browsename0_n | ( | ua_node_t | node, |
const char * | name, | ||
size_t | len | ||
) |
Sets the browsename attribute of the given node
.
This function is provided for convenience is used to set qualifiednames which are defined in NS 0.
node | the node handle |
name | the browsname as qualifiedname |
len | length of name |
int ua_node_set_browsename_ex | ( | ua_node_t | node, |
const struct ua_qualifiedname * | qn | ||
) |
Sets the browsename attribute of the given node
.
node | the node handle |
name | the browsname as qualifiedname |
int ua_node_set_browsename_n | ( | ua_node_t | node, |
const char * | name, | ||
size_t | len | ||
) |
Sets the browsename attribute of the given node
.
This function will use the node's namespace index also for the qualifiedname.
node | the node handle |
name | the text part of the browsename (qualifiedname) |
len | length of name |
int ua_node_set_description | ( | ua_node_t | node, |
const char * | text | ||
) |
Sets the description attribute of the given node
.
node | the node handle |
text | the text part of the description |
int ua_node_set_description_n | ( | ua_node_t | node, |
const char * | text, | ||
size_t | len | ||
) |
Sets the description attribute of the given node
.
node | the node handle |
text | the text part of the description |
len | length of text |
int ua_node_set_displayname | ( | ua_node_t | node, |
const char * | name | ||
) |
Sets the displayname attribute of the given node
.
node | the node handle |
name | the text part of the displayname |
int ua_node_set_displayname_n | ( | ua_node_t | node, |
const char * | name, | ||
size_t | len | ||
) |
Sets the displayname attribute of the given node
.
node | the node handle |
name | the text part of the displayname |
len | length of name |
int ua_node_set_flag | ( | ua_node_t | node, |
uint8_t | bit, | ||
uint8_t | flag | ||
) |
Set the flag value in the given node.
node | the node handle |
bit | the bit index. Only bits 6-7 are allowed to be used by the application. Bits 0-5 are reserved for the SDK. |
flag | the flag value. This may be 0 (false) or 1 (true). |
Sets the nodeid attribute of the given node.
This also causes the node to be indexed in a hashtable. By settings an empty nodeid the node will get removed from the hashtable.
node | The node handle. |
id | New node id. |