Przeglądaj źródła

Add a flag to every node whether the constructor has been called

Julius Pfrommer 6 lat temu
rodzic
commit
f887f53caf
2 zmienionych plików z 3 dodań i 1 usunięć
  1. 2 1
      include/ua_plugin_nodestore.h
  2. 1 0
      src/server/ua_nodes.c

+ 2 - 1
include/ua_plugin_nodestore.h

@@ -85,7 +85,8 @@ typedef struct {
     UA_NodeReferenceKind *references;           \
                                                 \
     /* Members specific to open62541 */         \
-    void *context;
+    void *context;                              \
+    UA_Boolean constructed; /* Constructors were called */
 
 typedef struct {
     UA_NODE_BASEATTRIBUTES

+ 1 - 0
src/server/ua_nodes.c

@@ -155,6 +155,7 @@ UA_Node_copy(const UA_Node *src, UA_Node *dst) {
     retval |= UA_LocalizedText_copy(&src->description, &dst->description);
     dst->writeMask = src->writeMask;
     dst->context = src->context;
+    dst->constructed = src->constructed;
     if(retval != UA_STATUSCODE_GOOD) {
         UA_Node_deleteMembers(dst);
         return retval;