Browse Source

Merge branch 'master' of https://github.com/acplt/open62541

ichrispa 9 years ago
parent
commit
04f24a5205

+ 1 - 1
examples/server_simple.c

@@ -31,7 +31,7 @@ static void stopHandler(int sign) {
 static UA_ByteString loadCertificate(void) {
 static UA_ByteString loadCertificate(void) {
     UA_ByteString certificate = UA_STRING_NULL;
     UA_ByteString certificate = UA_STRING_NULL;
 	FILE *fp = NULL;
 	FILE *fp = NULL;
-	//FIXME: a potiential bug of locating the certificate, we need to get the path from the server's config
+	//FIXME: a potential bug of locating the certificate, we need to get the path from the server's config
 	fp=fopen("server_cert.der", "rb");
 	fp=fopen("server_cert.der", "rb");
 
 
 	if(!fp) {
 	if(!fp) {

+ 1 - 1
include/ua_config.h.in

@@ -1,7 +1,7 @@
 #ifndef UA_CONFIG_H_
 #ifndef UA_CONFIG_H_
 #define UA_CONFIG_H_
 #define UA_CONFIG_H_
 
 
-/* Buid options and configuration (set by cmake) */
+/* Build options and configuration (set by cmake) */
 
 
 #define UA_LOGLEVEL ${UA_LOGLEVEL}
 #define UA_LOGLEVEL ${UA_LOGLEVEL}
 #cmakedefine UA_MULTITHREADING
 #cmakedefine UA_MULTITHREADING

+ 5 - 6
include/ua_server.h

@@ -65,7 +65,7 @@ UA_Logger UA_EXPORT UA_Server_getLogger(UA_Server *server);
  *
  *
  * @param nThreads The number of worker threads. Is ignored if MULTITHREADING is not activated.
  * @param nThreads The number of worker threads. Is ignored if MULTITHREADING is not activated.
  *
  *
- * @param running Points to a booloean value on the heap. When running is set to false, the worker
+ * @param running Points to a boolean value on the heap. When running is set to false, the worker
  * threads and the main loop close and the server is shut down.
  * threads and the main loop close and the server is shut down.
  *
  *
  * @return Indicates whether the server shut down cleanly
  * @return Indicates whether the server shut down cleanly
@@ -153,7 +153,7 @@ UA_StatusCode UA_EXPORT
 UA_Server_AddMonodirectionalReference(UA_Server *server, UA_NodeId sourceNodeId, UA_ExpandedNodeId targetNodeId, 
 UA_Server_AddMonodirectionalReference(UA_Server *server, UA_NodeId sourceNodeId, UA_ExpandedNodeId targetNodeId, 
                                       UA_NodeId referenceTypeId, UA_Boolean isforward);
                                       UA_NodeId referenceTypeId, UA_Boolean isforward);
 
 
-/** Jobs describe work that is ececuted once or repeatedly. */
+/** Jobs describe work that is executed once or repeatedly. */
 typedef struct {
 typedef struct {
     enum {
     enum {
         UA_JOBTYPE_NOTHING,
         UA_JOBTYPE_NOTHING,
@@ -188,7 +188,7 @@ typedef struct {
  * @param jobId Set to the guid of the repeated job. This can be used to cancel the job later on. If
  * @param jobId Set to the guid of the repeated job. This can be used to cancel the job later on. If
  *        the pointer is null, the guid is not set.
  *        the pointer is null, the guid is not set.
  *
  *
- * @return Upon sucess, UA_STATUSCODE_GOOD is returned. An error code otherwise.
+ * @return Upon success, UA_STATUSCODE_GOOD is returned. An error code otherwise.
  */
  */
 UA_StatusCode UA_EXPORT UA_Server_addRepeatedJob(UA_Server *server, UA_Job job, UA_UInt32 interval,
 UA_StatusCode UA_EXPORT UA_Server_addRepeatedJob(UA_Server *server, UA_Job job, UA_UInt32 interval,
                                                  UA_Guid *jobId);
                                                  UA_Guid *jobId);
@@ -231,8 +231,7 @@ typedef struct {
      *
      *
      * @param timeout The timeout during which an event must arrive in microseconds
      * @param timeout The timeout during which an event must arrive in microseconds
      
      
-     * @return The size of the jobs array. If the result is negative, an error has
-     * occured.
+     * @return The size of the jobs array. If the result is negative, an error has occurred.
      */
      */
     UA_Int32 (*getJobs)(void *nlhandle, UA_Job **jobs, UA_UInt16 timeout);
     UA_Int32 (*getJobs)(void *nlhandle, UA_Job **jobs, UA_UInt16 timeout);
 
 
@@ -243,7 +242,7 @@ typedef struct {
      * @param jobs When the returned integer is positive, jobs points to an array of UA_Job of the
      * @param jobs When the returned integer is positive, jobs points to an array of UA_Job of the
      * returned size.
      * returned size.
      *
      *
-     * @return The size of the jobs array. If the result is negative, an error has occured.
+     * @return The size of the jobs array. If the result is negative, an error has occurred.
      */
      */
     UA_Int32 (*stop)(void *nlhandle, UA_Job **jobs);
     UA_Int32 (*stop)(void *nlhandle, UA_Job **jobs);
 
 

+ 3 - 3
include/ua_statuscodes.h

@@ -77,7 +77,7 @@ enum UA_StatusCode {
 	UA_STATUSCODE_BADSTRUCTUREMISSING = 0x80460000, // A mandatory structured parameter was missing or null.
 	UA_STATUSCODE_BADSTRUCTUREMISSING = 0x80460000, // A mandatory structured parameter was missing or null.
 	UA_STATUSCODE_BADEVENTFILTERINVALID = 0x80470000, // The event filter is not valid.
 	UA_STATUSCODE_BADEVENTFILTERINVALID = 0x80470000, // The event filter is not valid.
 	UA_STATUSCODE_BADCONTENTFILTERINVALID = 0x80480000, // The content filter is not valid.
 	UA_STATUSCODE_BADCONTENTFILTERINVALID = 0x80480000, // The content filter is not valid.
-	UA_STATUSCODE_BADFILTEROPERATORINVALID = 0x80c10000, // An unregognized operator was provided in a filter.
+	UA_STATUSCODE_BADFILTEROPERATORINVALID = 0x80c10000, // An unrecognized operator was provided in a filter.
 	UA_STATUSCODE_BADFILTEROPERATORUNSUPPORTED = 0x80c20000, // A valid operator was provided, but the server does not provide support for this filter operator.
 	UA_STATUSCODE_BADFILTEROPERATORUNSUPPORTED = 0x80c20000, // A valid operator was provided, but the server does not provide support for this filter operator.
 	UA_STATUSCODE_BADFILTEROPERANDCOUNTMISMATCH = 0x80c30000, // The number of operands provided for the filter operator was less then expected for the operand provided.
 	UA_STATUSCODE_BADFILTEROPERANDCOUNTMISMATCH = 0x80c30000, // The number of operands provided for the filter operator was less then expected for the operand provided.
 	UA_STATUSCODE_BADFILTEROPERANDINVALID = 0x80490000, // The operand used in a content filter is not valid.
 	UA_STATUSCODE_BADFILTEROPERANDINVALID = 0x80490000, // The operand used in a content filter is not valid.
@@ -100,7 +100,7 @@ enum UA_StatusCode {
 	UA_STATUSCODE_BADAPPLICATIONSIGNATUREINVALID = 0x80580000, // The signature generated with the client certificate is missing or invalid.
 	UA_STATUSCODE_BADAPPLICATIONSIGNATUREINVALID = 0x80580000, // The signature generated with the client certificate is missing or invalid.
 	UA_STATUSCODE_BADNOVALIDCERTIFICATES = 0x80590000, // The client did not provide at least one software certificate that is valid and meets the profile requirements for the server.
 	UA_STATUSCODE_BADNOVALIDCERTIFICATES = 0x80590000, // The client did not provide at least one software certificate that is valid and meets the profile requirements for the server.
 	UA_STATUSCODE_BADIDENTITYCHANGENOTSUPPORTED = 0x80c60000, // The Server does not support changing the user identity assigned to the session.
 	UA_STATUSCODE_BADIDENTITYCHANGENOTSUPPORTED = 0x80c60000, // The Server does not support changing the user identity assigned to the session.
-	UA_STATUSCODE_BADREQUESTCANCELLEDBYREQUEST = 0x805a0000, // The request was cancelled by the client with the Cancel service.
+	UA_STATUSCODE_BADREQUESTCANCELLEDBYREQUEST = 0x805a0000, // The request was canceled by the client with the Cancel service.
 	UA_STATUSCODE_BADPARENTNODEIDINVALID = 0x805b0000, // The parent node id does not to refer to a valid node.
 	UA_STATUSCODE_BADPARENTNODEIDINVALID = 0x805b0000, // The parent node id does not to refer to a valid node.
 	UA_STATUSCODE_BADREFERENCENOTALLOWED = 0x805c0000, // The reference could not be created because it violates constraints imposed by the data model.
 	UA_STATUSCODE_BADREFERENCENOTALLOWED = 0x805c0000, // The reference could not be created because it violates constraints imposed by the data model.
 	UA_STATUSCODE_BADNODEIDREJECTED = 0x805d0000, // The requested node id was reject because it was either invalid or server does not allow node ids to be specified by the client.
 	UA_STATUSCODE_BADNODEIDREJECTED = 0x805d0000, // The requested node id was reject because it was either invalid or server does not allow node ids to be specified by the client.
@@ -201,7 +201,7 @@ enum UA_StatusCode {
 	UA_STATUSCODE_BADAGGREGATENOTSUPPORTED = 0x80d50000, // The requested Aggregate is not support by the server.
 	UA_STATUSCODE_BADAGGREGATENOTSUPPORTED = 0x80d50000, // The requested Aggregate is not support by the server.
 	UA_STATUSCODE_BADAGGREGATEINVALIDINPUTS = 0x80d60000, // The aggregate value could not be derived due to invalid data inputs.
 	UA_STATUSCODE_BADAGGREGATEINVALIDINPUTS = 0x80d60000, // The aggregate value could not be derived due to invalid data inputs.
 	UA_STATUSCODE_BADAGGREGATECONFIGURATIONREJECTED = 0x80da0000, // The aggregate configuration is not valid for specified node.
 	UA_STATUSCODE_BADAGGREGATECONFIGURATIONREJECTED = 0x80da0000, // The aggregate configuration is not valid for specified node.
-	UA_STATUSCODE_GOODDATAIGNORED = 0x00d90000, // The request pecifies fields which are not valid for the EventType or cannot be saved by the historian.
+	UA_STATUSCODE_GOODDATAIGNORED = 0x00d90000, // The request specifies fields which are not valid for the EventType or cannot be saved by the historian.
 	UA_STATUSCODE_GOODCOMMUNICATIONEVENT = 0x00a70000, // The communication layer has raised an event.
 	UA_STATUSCODE_GOODCOMMUNICATIONEVENT = 0x00a70000, // The communication layer has raised an event.
 	UA_STATUSCODE_GOODSHUTDOWNEVENT = 0x00a80000, // The system is shutting down.
 	UA_STATUSCODE_GOODSHUTDOWNEVENT = 0x00a80000, // The system is shutting down.
 	UA_STATUSCODE_GOODCALLAGAIN = 0x00a90000, // The operation is not finished and needs to be called again.
 	UA_STATUSCODE_GOODCALLAGAIN = 0x00a90000, // The operation is not finished and needs to be called again.

+ 1 - 1
include/ua_types.h

@@ -604,7 +604,7 @@ void UA_EXPORT * UA_Array_new(const UA_DataType *dataType, UA_Int32 noElements);
 /**
 /**
  * Allocates and copies an array. dst is set to (void*)0 if not enough memory is available.
  * Allocates and copies an array. dst is set to (void*)0 if not enough memory is available.
  *
  *
- * @param src The memory location of the souce array
+ * @param src The memory location of the source array
  * @param dst The memory location where the pointer to the destination array is written
  * @param dst The memory location where the pointer to the destination array is written
  * @param dataType The datatype of the array members
  * @param dataType The datatype of the array members
  * @param noElements The size of the array
  * @param noElements The size of the array

+ 2 - 2
src/server/ua_server_worker.c

@@ -163,7 +163,7 @@ struct IdentifiedJob {
 
 
 /**
 /**
  * The RepeatedJobs structure contains an array of jobs that are either executed with the same
  * The RepeatedJobs structure contains an array of jobs that are either executed with the same
- * repetition inverval. The linked list is sorted, so we can stop traversing when the first element
+ * repetition interval. The linked list is sorted, so we can stop traversing when the first element
  * has nextTime > now.
  * has nextTime > now.
  */
  */
 struct RepeatedJobs {
 struct RepeatedJobs {
@@ -535,7 +535,7 @@ UA_StatusCode UA_Server_run_startup(UA_Server *server, UA_UInt16 nThreads, UA_Bo
 #endif
 #endif
 
 
     /* Start the networklayers */
     /* Start the networklayers */
-    for(size_t i = 0; i <server->networkLayersSize; i++)
+    for(size_t i = 0; i < server->networkLayersSize; i++)
         server->networkLayers[i].start(server->networkLayers[i].nlHandle, &server->logger);
         server->networkLayers[i].start(server->networkLayers[i].nlHandle, &server->logger);
 
 
     return UA_STATUSCODE_GOOD;
     return UA_STATUSCODE_GOOD;

+ 1 - 1
src/server/ua_services.h

@@ -141,7 +141,7 @@ void Service_Browse(UA_Server *server, UA_Session *session, const UA_BrowseReque
 
 
 /**
 /**
  * Used to request the next set of Browse or BrowseNext response information
  * Used to request the next set of Browse or BrowseNext response information
- * that is too large to be sent in a single response. “Too large” in this
+ * that is too large to be sent in a single response. "Too large" in this
  * context means that the Server is not able to return a larger response or that
  * context means that the Server is not able to return a larger response or that
  * the number of results to return exceeds the maximum number of results to
  * the number of results to return exceeds the maximum number of results to
  * return that was specified by the Client in the original Browse request.
  * return that was specified by the Client in the original Browse request.

+ 2 - 2
tools/generate_datatypes.py

@@ -453,13 +453,13 @@ if args.ns0_types_xml:
     if sys.version_info[0] < 3:
     if sys.version_info[0] < 3:
         OrderedDict(existing_types.items() + parseTypeDefinitions(args.ns0_types_xml[0], existing_types).items())
         OrderedDict(existing_types.items() + parseTypeDefinitions(args.ns0_types_xml[0], existing_types).items())
     else:
     else:
-        OrderedDict(existing_types.items() | parseTypeDefinitions(args.ns0_types_xml[0], existing_types).items())
+        OrderedDict(list(existing_types.items()) + list(parseTypeDefinitions(args.ns0_types_xml[0], existing_types).items()))
 types = parseTypeDefinitions(args.types_xml, existing_types)
 types = parseTypeDefinitions(args.types_xml, existing_types)
 if args.namespace_id == 0:
 if args.namespace_id == 0:
     if sys.version_info[0] < 3:
     if sys.version_info[0] < 3:
         types = OrderedDict(existing_types.items() + types.items())
         types = OrderedDict(existing_types.items() + types.items())
     else:
     else:
-        types = OrderedDict(existing_types.items() | types.items())
+        types = OrderedDict(list(existing_types.items()) + list(types.items()))
 
 
 typedescriptions = {}
 typedescriptions = {}
 if args.typedescriptions:
 if args.typedescriptions: