|
@@ -670,7 +670,50 @@ typedef struct {
|
|
|
void (*destructor)(UA_Server *server,
|
|
|
const UA_NodeId *sessionId, void *sessionContext,
|
|
|
const UA_NodeId *nodeId, void *nodeContext);
|
|
|
-} UA_GlobalNodeLifecycle;
|
|
|
+
|
|
|
+ /* Can be NULL. Called during recursive node instantiation. While mandatory
|
|
|
+ * child nodes are automatically created if not already present, optional child
|
|
|
+ * nodes are not. This callback can be used to define whether an optional child
|
|
|
+ * node should be created.
|
|
|
+ *
|
|
|
+ * @param server The server executing the callback
|
|
|
+ * @param sessionId The identifier of the session
|
|
|
+ * @param sessionContext Additional data attached to the session in the
|
|
|
+ * access control layer
|
|
|
+ * @param sourceNodeId Source node from the type definition. If the new node
|
|
|
+ * shall be created, it will be a copy of this node.
|
|
|
+ * @param targetParentNodeId Parent of the potential new child node
|
|
|
+ * @param referenceTypeId Identifies the reference type which that the parent
|
|
|
+ * node has to the new node.
|
|
|
+ * @return Return UA_TRUE if the child node shall be instantiatet,
|
|
|
+ * UA_FALSE otherwise. */
|
|
|
+ UA_Boolean (*createOptionalChild)(UA_Server *server,
|
|
|
+ const UA_NodeId *sessionId,
|
|
|
+ void *sessionContext,
|
|
|
+ const UA_NodeId *sourceNodeId,
|
|
|
+ const UA_NodeId *targetParentNodeId,
|
|
|
+ const UA_NodeId *referenceTypeId);
|
|
|
+
|
|
|
+ /* Can be NULL. Called when a node is to be copied during recursive
|
|
|
+ * node instantiation. Allows definition of the NodeId for the new node.
|
|
|
+ * If the callback is set to NULL or the resulting NodeId is UA_NODEID_NULL,
|
|
|
+ * then a random NodeId will be generated.
|
|
|
+ *
|
|
|
+ * @param server The server executing the callback
|
|
|
+ * @param sessionId The identifier of the session
|
|
|
+ * @param sessionContext Additional data attached to the session in the
|
|
|
+ * access control layer
|
|
|
+ * @param sourceNodeId Source node of the copy operation
|
|
|
+ * @param targetParentNodeId Parent node of the new node
|
|
|
+ * @param referenceTypeId Identifies the reference type which that the parent
|
|
|
+ * node has to the new node. */
|
|
|
+ UA_StatusCode (*generateChildNodeId)(UA_Server *server,
|
|
|
+ const UA_NodeId *sessionId, void *sessionContext,
|
|
|
+ const UA_NodeId *sourceNodeId,
|
|
|
+ const UA_NodeId *targetParentNodeId,
|
|
|
+ const UA_NodeId *referenceTypeId,
|
|
|
+ UA_NodeId *targetNodeId);
|
|
|
+ } UA_GlobalNodeLifecycle;
|
|
|
|
|
|
typedef struct {
|
|
|
/* Can be NULL. May replace the nodeContext */
|