Browse Source

add changelog entries for the recent changes to the public API

Julius Pfrommer 6 years ago
parent
commit
9c4faf8551

+ 22 - 1
CHANGELOG

@@ -1,6 +1,27 @@
 This changelog reports changes to the public API. Internal refactorings and bug
 This changelog reports changes to the public API. Internal refactorings and bug
 fixes are not reported here.
 fixes are not reported here.
 
 
+2017-08-16 jpfr <julius.pfrommer at web.de>
+
+ * Default Attribute Values for Node Attributes
+
+   The AddNodes service takes a structure with the attributes of the new node as
+   input. We began checking the consistency of the attributes more closely. You
+   can now use constant global definitions with default values as a starting
+   point. For example UA_VariableAttributes_default for adding a variable node.
+
+ * All nodes have a context pointer
+
+   All nodes now carry a context pointer. The context pointer is initially set
+   to a user-defined memory location. The context pointer is passed to all
+   user-visible callbacks involving the node.
+
+ * Global and node-type constructor/destructor
+
+   The constructors are fine-grained mechanisms to control the instantiation and
+   deletion of nodes. Constructors receive the node context pointer and can also
+   replace it.
+
 2017-08-13 Infinity95 <mark.giraud at student.kit.edu>
 2017-08-13 Infinity95 <mark.giraud at student.kit.edu>
 
 
  * New/Delete methods for the server configuration
  * New/Delete methods for the server configuration
@@ -19,7 +40,7 @@ fixes are not reported here.
 
 
    The TCP port in the default configuration is 4840. This is the recommended
    The TCP port in the default configuration is 4840. This is the recommended
    port for OPC UA and now used throughout all examples.
    port for OPC UA and now used throughout all examples.
-   
+
 2017-07-04 jpfr <julius.pfrommer at web.de>
 2017-07-04 jpfr <julius.pfrommer at web.de>
 
 
  * Return partially overlapping ranges
  * Return partially overlapping ranges

+ 5 - 6
examples/server_nodeset.c

@@ -20,25 +20,24 @@ static void stopHandler(int sign) {
 }
 }
 
 
 int main(int argc, char** argv) {
 int main(int argc, char** argv) {
-    signal(SIGINT, stopHandler); /* catches ctrl-c */
+    signal(SIGINT, stopHandler);
+    signal(SIGTERM, stopHandler);
 
 
     /* initialize the server */
     /* initialize the server */
     UA_ServerConfig *config = UA_ServerConfig_new_default();
     UA_ServerConfig *config = UA_ServerConfig_new_default();
     UA_Server *server = UA_Server_new(config);
     UA_Server *server = UA_Server_new(config);
 
 
     /* create nodes from nodeset */
     /* create nodes from nodeset */
-    if (nodeset(server) != UA_STATUSCODE_GOOD) {
+    if(nodeset(server) != UA_STATUSCODE_GOOD) {
         UA_LOG_ERROR(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "Namespace index for generated "
         UA_LOG_ERROR(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "Namespace index for generated "
                      "nodeset does not match. The call to the generated method has to be "
                      "nodeset does not match. The call to the generated method has to be "
                      "before any other namespace add calls.");
                      "before any other namespace add calls.");
         UA_Server_delete(server);
         UA_Server_delete(server);
-        return (int)UA_STATUSCODE_BADUNEXPECTEDERROR;
+        UA_ServerConfig_delete(config);
+        return UA_STATUSCODE_BADUNEXPECTEDERROR;
     }
     }
 
 
-    /* start server */
     UA_StatusCode retval = UA_Server_run(server, &running);
     UA_StatusCode retval = UA_Server_run(server, &running);
-
-    /* ctrl-c received -> clean up */
     UA_Server_delete(server);
     UA_Server_delete(server);
     UA_ServerConfig_delete(config);
     UA_ServerConfig_delete(config);
     return (int)retval;
     return (int)retval;

+ 1 - 1
src/server/ua_services_nodemanagement.c

@@ -250,7 +250,7 @@ fillVariableNodeAttributes(UA_Server *server, UA_Session *session,
     }
     }
 
 
     UA_DataValue_deleteMembers(&value);
     UA_DataValue_deleteMembers(&value);
-    return UA_STATUSCODE_GOOD;
+    return retval;
 }
 }
 
 
 static UA_StatusCode
 static UA_StatusCode

+ 1 - 1
tools/pyUANamespace/open62541_MacroHelper.py

@@ -246,7 +246,7 @@ class open62541_MacroHelper():
     if nodetype != "Method":
     if nodetype != "Method":
       code.append("       , attr, NULL, NULL);")
       code.append("       , attr, NULL, NULL);")
     else:
     else:
-      code.append("       , attr, (UA_MethodCallback) NULL, NULL, " + str(len(inArgVal)) + ", inputArguments,  " + str(len(outArgVal)) + ", outputArguments, NULL);")
+      code.append("       , attr, (UA_MethodCallback) NULL, " + str(len(inArgVal)) + ", inputArguments,  " + str(len(outArgVal)) + ", outputArguments, NULL, NULL);")
       
       
     #Adding a Node with typeDefinition = UA_NODEID_NULL will create a HasTypeDefinition reference to BaseDataType - remove it since 
     #Adding a Node with typeDefinition = UA_NODEID_NULL will create a HasTypeDefinition reference to BaseDataType - remove it since 
     #a real Reference will be add in a later step (a single HasTypeDefinition reference is assumed here)
     #a real Reference will be add in a later step (a single HasTypeDefinition reference is assumed here)