open62541 1.3.12
Open source implementation of OPC UA
Loading...
Searching...
No Matches
nodestore.h File Reference
#include <open62541/util.h>
#include "aa_tree.h"

Go to the source code of this file.

Data Structures

struct  UA_GlobalNodeLifecycle
 
struct  UA_NodeTypeLifecycle
 
struct  UA_ReferenceTypeSet
 
union  UA_NodePointer
 
struct  UA_ReferenceTarget
 
struct  UA_ReferenceTargetTreeElem
 
struct  UA_NodeReferenceKind
 
struct  UA_NodeHead
 
struct  UA_ValueCallback
 
struct  UA_DataSource
 
struct  UA_ExternalValueCallback
 
struct  UA_ValueBackend
 
struct  UA_VariableNode
 
struct  UA_VariableTypeNode
 
struct  UA_MethodNode
 
struct  UA_ObjectNode
 
struct  UA_ObjectTypeNode
 
struct  UA_ReferenceTypeNode
 
struct  UA_DataTypeNode
 
struct  UA_ViewNode
 
union  UA_Node
 
struct  UA_Nodestore
 

Macros

#define UA_REFERENCETYPEINDEX_REFERENCES   0
 
#define UA_REFERENCETYPEINDEX_HASSUBTYPE   1
 
#define UA_REFERENCETYPEINDEX_AGGREGATES   2
 
#define UA_REFERENCETYPEINDEX_HIERARCHICALREFERENCES   3
 
#define UA_REFERENCETYPEINDEX_NONHIERARCHICALREFERENCES   4
 
#define UA_REFERENCETYPEINDEX_HASCHILD   5
 
#define UA_REFERENCETYPEINDEX_ORGANIZES   6
 
#define UA_REFERENCETYPEINDEX_HASEVENTSOURCE   7
 
#define UA_REFERENCETYPEINDEX_HASMODELLINGRULE   8
 
#define UA_REFERENCETYPEINDEX_HASENCODING   9
 
#define UA_REFERENCETYPEINDEX_HASDESCRIPTION   10
 
#define UA_REFERENCETYPEINDEX_HASTYPEDEFINITION   11
 
#define UA_REFERENCETYPEINDEX_GENERATESEVENT   12
 
#define UA_REFERENCETYPEINDEX_HASPROPERTY   13
 
#define UA_REFERENCETYPEINDEX_HASCOMPONENT   14
 
#define UA_REFERENCETYPEINDEX_HASNOTIFIER   15
 
#define UA_REFERENCETYPEINDEX_HASORDEREDCOMPONENT   16
 
#define UA_REFERENCETYPEINDEX_HASINTERFACE   17
 
#define UA_REFERENCETYPESET_MAX   128
 
#define UA_NODE_VARIABLEATTRIBUTES
 

Typedefs

typedef struct UA_MonitoredItem UA_MonitoredItem
 
typedef struct UA_NodeHead UA_NodeHead
 
typedef UA_StatusCode(* UA_MethodCallback) (UA_Server *server, const UA_NodeId *sessionId, void *sessionContext, const UA_NodeId *methodId, void *methodContext, const UA_NodeId *objectId, void *objectContext, size_t inputSize, const UA_Variant *input, size_t outputSize, UA_Variant *output)
 
typedef void(* UA_NodestoreVisitor) (void *visitorCtx, const UA_Node *node)
 

Enumerations

enum  UA_ValueSource
 
enum  UA_ValueBackendType
 

Functions

void UA_NodePointer_clear (UA_NodePointer *np)
 
UA_StatusCode UA_NodePointer_copy (UA_NodePointer in, UA_NodePointer *out)
 
UA_Boolean UA_NodePointer_isLocal (UA_NodePointer np)
 
UA_Order UA_NodePointer_order (UA_NodePointer p1, UA_NodePointer p2)
 
UA_NodePointer UA_NodePointer_fromNodeId (const UA_NodeId *id)
 
UA_NodePointer UA_NodePointer_fromExpandedNodeId (const UA_ExpandedNodeId *id)
 
UA_ExpandedNodeId UA_NodePointer_toExpandedNodeId (UA_NodePointer np)
 
UA_NodeId UA_NodePointer_toNodeId (UA_NodePointer np)
 
UA_EXPORT const UA_ReferenceTargetUA_NodeReferenceKind_iterate (const UA_NodeReferenceKind *rk, const UA_ReferenceTarget *prev)
 
UA_EXPORT UA_StatusCode UA_NodeReferenceKind_switch (UA_NodeReferenceKind *rk)
 
UA_StatusCode UA_Node_setAttributes (UA_Node *node, const void *attributes, const UA_DataType *attributeType)
 
UA_StatusCode UA_Node_copy (const UA_Node *src, UA_Node *dst)
 
UA_EXPORT UA_NodeUA_Node_copy_alloc (const UA_Node *src)
 
UA_StatusCode UA_Node_addReference (UA_Node *node, UA_Byte refTypeIndex, UA_Boolean isForward, const UA_ExpandedNodeId *targetNodeId, UA_UInt32 targetBrowseNameHash)
 
UA_StatusCode UA_Node_deleteReference (UA_Node *node, UA_Byte refTypeIndex, UA_Boolean isForward, const UA_ExpandedNodeId *targetNodeId)
 
void UA_Node_deleteReferencesSubset (UA_Node *node, const UA_ReferenceTypeSet *keepSet)
 
void UA_Node_deleteReferences (UA_Node *node)
 
void UA_Node_clear (UA_Node *node)
 

Macro Definition Documentation

◆ UA_REFERENCETYPEINDEX_REFERENCES

#define UA_REFERENCETYPEINDEX_REFERENCES   0

Definition at line 106 of file nodestore.h.

◆ UA_REFERENCETYPEINDEX_HASSUBTYPE

#define UA_REFERENCETYPEINDEX_HASSUBTYPE   1

Definition at line 107 of file nodestore.h.

◆ UA_REFERENCETYPEINDEX_AGGREGATES

#define UA_REFERENCETYPEINDEX_AGGREGATES   2

Definition at line 108 of file nodestore.h.

◆ UA_REFERENCETYPEINDEX_HIERARCHICALREFERENCES

#define UA_REFERENCETYPEINDEX_HIERARCHICALREFERENCES   3

Definition at line 109 of file nodestore.h.

◆ UA_REFERENCETYPEINDEX_NONHIERARCHICALREFERENCES

#define UA_REFERENCETYPEINDEX_NONHIERARCHICALREFERENCES   4

Definition at line 110 of file nodestore.h.

◆ UA_REFERENCETYPEINDEX_HASCHILD

#define UA_REFERENCETYPEINDEX_HASCHILD   5

Definition at line 111 of file nodestore.h.

◆ UA_REFERENCETYPEINDEX_ORGANIZES

#define UA_REFERENCETYPEINDEX_ORGANIZES   6

Definition at line 112 of file nodestore.h.

◆ UA_REFERENCETYPEINDEX_HASEVENTSOURCE

#define UA_REFERENCETYPEINDEX_HASEVENTSOURCE   7

Definition at line 113 of file nodestore.h.

◆ UA_REFERENCETYPEINDEX_HASMODELLINGRULE

#define UA_REFERENCETYPEINDEX_HASMODELLINGRULE   8

Definition at line 114 of file nodestore.h.

◆ UA_REFERENCETYPEINDEX_HASENCODING

#define UA_REFERENCETYPEINDEX_HASENCODING   9

Definition at line 115 of file nodestore.h.

◆ UA_REFERENCETYPEINDEX_HASDESCRIPTION

#define UA_REFERENCETYPEINDEX_HASDESCRIPTION   10

Definition at line 116 of file nodestore.h.

◆ UA_REFERENCETYPEINDEX_HASTYPEDEFINITION

#define UA_REFERENCETYPEINDEX_HASTYPEDEFINITION   11

Definition at line 117 of file nodestore.h.

◆ UA_REFERENCETYPEINDEX_GENERATESEVENT

#define UA_REFERENCETYPEINDEX_GENERATESEVENT   12

Definition at line 118 of file nodestore.h.

◆ UA_REFERENCETYPEINDEX_HASPROPERTY

#define UA_REFERENCETYPEINDEX_HASPROPERTY   13

Definition at line 119 of file nodestore.h.

◆ UA_REFERENCETYPEINDEX_HASCOMPONENT

#define UA_REFERENCETYPEINDEX_HASCOMPONENT   14

Definition at line 120 of file nodestore.h.

◆ UA_REFERENCETYPEINDEX_HASNOTIFIER

#define UA_REFERENCETYPEINDEX_HASNOTIFIER   15

Definition at line 121 of file nodestore.h.

◆ UA_REFERENCETYPEINDEX_HASORDEREDCOMPONENT

#define UA_REFERENCETYPEINDEX_HASORDEREDCOMPONENT   16

Definition at line 122 of file nodestore.h.

◆ UA_REFERENCETYPEINDEX_HASINTERFACE

#define UA_REFERENCETYPEINDEX_HASINTERFACE   17

Definition at line 123 of file nodestore.h.

◆ UA_REFERENCETYPESET_MAX

#define UA_REFERENCETYPESET_MAX   128

The maximum number of ReferrenceTypes.

Must be a multiple of 32.

Definition at line 126 of file nodestore.h.

◆ UA_NODE_VARIABLEATTRIBUTES

#define UA_NODE_VARIABLEATTRIBUTES
Value:
/* Constraints on possible values */ \
UA_NodeId dataType; \
UA_Int32 valueRank; \
size_t arrayDimensionsSize; \
UA_UInt32 *arrayDimensions; \
\
UA_ValueBackend valueBackend; \
\
/* The current value */ \
UA_ValueSource valueSource; \
union { \
struct { \
UA_DataValue value; \
UA_ValueCallback callback; \
} data; \
UA_DataSource dataSource; \
} value;
UA_ValueSource
Indicates whether a variable contains data inline or whether it points to an external data source.
Definition nodestore.h:300
int32_t UA_Int32
Definition types.h:51
uint32_t UA_UInt32
Definition types.h:56

Definition at line 458 of file nodestore.h.

Typedef Documentation

◆ UA_MonitoredItem

typedef struct UA_MonitoredItem UA_MonitoredItem

Definition at line 28 of file nodestore.h.

◆ UA_NodeHead

typedef struct UA_NodeHead UA_NodeHead

Definition at line 167 of file nodestore.h.

◆ UA_MethodCallback

typedef UA_StatusCode(* UA_MethodCallback) (UA_Server *server, const UA_NodeId *sessionId, void *sessionContext, const UA_NodeId *methodId, void *methodContext, const UA_NodeId *objectId, void *objectContext, size_t inputSize, const UA_Variant *input, size_t outputSize, UA_Variant *output)

Definition at line 505 of file nodestore.h.

◆ UA_NodestoreVisitor

typedef void(* UA_NodestoreVisitor) (void *visitorCtx, const UA_Node *node)

Definition at line 585 of file nodestore.h.

Enumeration Type Documentation

◆ UA_ValueSource

Indicates whether a variable contains data inline or whether it points to an external data source.

Enumerator
UA_VALUESOURCE_DATA 
UA_VALUESOURCE_DATASOURCE 

Definition at line 300 of file nodestore.h.

◆ UA_ValueBackendType

Enumerator
UA_VALUEBACKENDTYPE_NONE 
UA_VALUEBACKENDTYPE_INTERNAL 
UA_VALUEBACKENDTYPE_DATA_SOURCE_CALLBACK 
UA_VALUEBACKENDTYPE_EXTERNAL 

Definition at line 436 of file nodestore.h.

Function Documentation

◆ UA_NodePointer_clear()

void UA_NodePointer_clear ( UA_NodePointer * np)

NodeId and ExpandedNodeId targets are freed.

◆ UA_NodePointer_copy()

UA_StatusCode UA_NodePointer_copy ( UA_NodePointer in,
UA_NodePointer * out )

Makes a deep copy.

◆ UA_NodePointer_isLocal()

UA_Boolean UA_NodePointer_isLocal ( UA_NodePointer np)

Test if an ExpandedNodeId or a local NodeId.

◆ UA_NodePointer_order()

UA_Order UA_NodePointer_order ( UA_NodePointer p1,
UA_NodePointer p2 )

◆ UA_NodePointer_fromNodeId()

UA_NodePointer UA_NodePointer_fromNodeId ( const UA_NodeId * id)

Cannot fail.

The resulting NodePointer can point to the memory from the NodeId. Make a deep copy if required.

◆ UA_NodePointer_fromExpandedNodeId()

UA_NodePointer UA_NodePointer_fromExpandedNodeId ( const UA_ExpandedNodeId * id)

Cannot fail.

The resulting NodePointer can point to the memory from the ExpandedNodeId. Make a deep copy if required.

◆ UA_NodePointer_toExpandedNodeId()

UA_ExpandedNodeId UA_NodePointer_toExpandedNodeId ( UA_NodePointer np)

Can point to the memory from the NodePointer.

◆ UA_NodePointer_toNodeId()

UA_NodeId UA_NodePointer_toNodeId ( UA_NodePointer np)

Can point to the memory from the NodePointer.

Discards the ServerIndex and NamespaceUri of a potential ExpandedNodeId inside the NodePointer. Test before if the NodePointer is local.

◆ UA_NodeReferenceKind_iterate()

UA_EXPORT const UA_ReferenceTarget * UA_NodeReferenceKind_iterate ( const UA_NodeReferenceKind * rk,
const UA_ReferenceTarget * prev )

Iterate over the references.

Assumes that "prev" points to a NodeReferenceKind. If prev == NULL, the first element is returned. At the end of the iteration, NULL is returned.

Do not continue the iteration after the rk was modified.

◆ UA_NodeReferenceKind_switch()

UA_EXPORT UA_StatusCode UA_NodeReferenceKind_switch ( UA_NodeReferenceKind * rk)

Switch between array and tree representation.

Does nothing upon error (e.g. out-of-memory).

◆ UA_Node_setAttributes()

UA_StatusCode UA_Node_setAttributes ( UA_Node * node,
const void * attributes,
const UA_DataType * attributeType )

Attributes must be of a matching type (VariableAttributes, ObjectAttributes, and so on).

The attributes are copied. Note that the attributes structs do not contain NodeId, NodeClass and BrowseName. The NodeClass of the node needs to be correctly set before calling this method. UA_Node_clear is called on the node when an error occurs internally.

◆ UA_Node_copy()

UA_StatusCode UA_Node_copy ( const UA_Node * src,
UA_Node * dst )

Reset the destination node and copy the content of the source.

◆ UA_Node_copy_alloc()

UA_EXPORT UA_Node * UA_Node_copy_alloc ( const UA_Node * src)

Allocate new node and copy the values from src.

◆ UA_Node_addReference()

UA_StatusCode UA_Node_addReference ( UA_Node * node,
UA_Byte refTypeIndex,
UA_Boolean isForward,
const UA_ExpandedNodeId * targetNodeId,
UA_UInt32 targetBrowseNameHash )

Add a single reference to the node.

◆ UA_Node_deleteReference()

UA_StatusCode UA_Node_deleteReference ( UA_Node * node,
UA_Byte refTypeIndex,
UA_Boolean isForward,
const UA_ExpandedNodeId * targetNodeId )

Delete a single reference from the node.

◆ UA_Node_deleteReferencesSubset()

void UA_Node_deleteReferencesSubset ( UA_Node * node,
const UA_ReferenceTypeSet * keepSet )

Deletes references from the node which are not matching any type in the given array.

Could be used to e.g. delete all the references, except 'HASMODELINGRULE'

◆ UA_Node_deleteReferences()

void UA_Node_deleteReferences ( UA_Node * node)

Delete all references of the node.

◆ UA_Node_clear()

void UA_Node_clear ( UA_Node * node)

Remove all malloc'ed members of the node and reset.