tbeu 7 éve
szülő
commit
983f956003

+ 2 - 2
doc/namespace_compiler.rst

@@ -208,7 +208,7 @@ In its simplest form, an invokation of the namespace compiler will look like thi
 
    $ python ./generate_open62541CCode.py <Opc.Ua.NodeSet2.xml> myNS.xml myNS
 
-The first argument points to the XML definition of the standard-defined namespace 0. Namespace 0 is assumed to be loaded beforehand and provides defintions for data type, reference types, and so. The second argument points to the user-defined information model, whose nodes will be added to the abstract syntax tree. The script will then creates the files ``myNS.c`` and ``myNS.h`` containing the C code necessary to instantiate those namespaces.
+The first argument points to the XML definition of the standard-defined namespace 0. Namespace 0 is assumed to be loaded beforehand and provides definitions for data type, reference types, and so. The second argument points to the user-defined information model, whose nodes will be added to the abstract syntax tree. The script will then creates the files ``myNS.c`` and ``myNS.h`` containing the C code necessary to instantiate those namespaces.
 
 Although it is possible to run the compiler this way, it is highly discouraged. If you care to examine the CMakeLists.txt (toplevel directory), you will find that compiling the stack with ``DUA_ENABLE_GENERATE_NAMESPACE0`` will execute the following command::
 
@@ -268,7 +268,7 @@ A minor list of some of the things that can go wrong:
   * Your file was not found. The namespace compiler will complain, print a help message, and exit.
   * A structure/DataType you created with a value was not encoded. The namespace compiler can currently not handle nested extensionObjects.
   * Nodes are not or wrongly encoded or you get nodeId errors.  The namespace compiler can currently not encode bytestring or guid node id's and external server uris are not supported either.
-  * You get compiler complaints for non-existant variants. Check that you have removed any namespace qualifiers (like "uax:") from the XML file.
+  * You get compiler complaints for non-existent variants. Check that you have removed any namespace qualifiers (like "uax:") from the XML file.
   * You get "invalid reference to addMethodNode" style errors. Make sure ``-DUA_ENABLE_METHODCALLS=On`` is defined.
 
 Creating object instances

+ 1 - 1
doc/protocol.rst

@@ -73,7 +73,7 @@ Session
   in cleartext. Currently defined authentication mechanisms are anonymous login,
   username/password, Kerberos and x509 certificates. The latter requires that
   the request message is accompanied by a signature to prove that the sender is
-  in posession of the private key with which the certificate was created.
+  in possession of the private key with which the certificate was created.
 
   There are two message exchanges required to establish a session:
   *CreateSession* and *ActicateSession*. The ActivateSession service can be used

+ 2 - 2
examples/client.c

@@ -165,11 +165,11 @@ int main(int argc, char *argv[]) {
     retval = UA_Client_call(client, UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER),
                             UA_NODEID_NUMERIC(1, 62541), 1, &input, &outputSize, &output);
     if(retval == UA_STATUSCODE_GOOD) {
-        printf("Method call was successfull, and %lu returned values available.\n",
+        printf("Method call was successful, and %lu returned values available.\n",
                (unsigned long)outputSize);
         UA_Array_delete(output, outputSize, &UA_TYPES[UA_TYPES_VARIANT]);
     } else {
-        printf("Method call was unsuccessfull, and %x returned values available.\n", retval);
+        printf("Method call was unsuccessful, and %x returned values available.\n", retval);
     }
     UA_Variant_deleteMembers(&input);
 #endif

+ 1 - 1
examples/tutorial_server_datasource.c

@@ -10,7 +10,7 @@
  * near the physical process and clients consuming the data at runtime. In the
  * previous tutorial, we saw how to add variables to an OPC UA information
  * model. This tutorial shows how to connect a variable to runtime information,
- * for example from measurements of a physical process. For simplicty, we take
+ * for example from measurements of a physical process. For simplicity, we take
  * the system clock as the underlying "process".
  *
  * The following code snippets are each concerned with a different way of

+ 1 - 1
examples/tutorial_server_firststeps.c

@@ -71,7 +71,7 @@ int main(void) {
  * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  *
  * *open62541* provides a flexible framework for building OPC UA servers and
- * clients. The goals is to have a core library that accomodates for all use
+ * clients. The goals is to have a core library that accommodates for all use
  * cases and runs on all platforms. Users can then adjust the library to fit
  * their use case via configuration and by developing (platform-specific)
  * plugins. The core library is based on C99 only and does not even require

+ 5 - 5
include/ua_plugin_securitypolicy.h

@@ -110,12 +110,12 @@ typedef struct {
 } UA_SecurityPolicyCryptoModule;
 
 typedef struct {
-    /* Generates a thumprint for the specified certificate.
+    /* Generates a thumbprint for the specified certificate.
      *
      * @param securityPolicy the securityPolicy the function is invoked on.
      * @param certificate the certificate to make a thumbprint of.
      * @param thumbprint an output buffer for the resulting thumbprint. Always
-     *                   has the length specified in the thumprintLenght in the
+     *                   has the length specified in the thumbprintLength in the
      *                   asymmetricModule. */
     UA_StatusCode (*makeCertificateThumbprint)(const UA_SecurityPolicy *securityPolicy,
                                                const UA_ByteString *certificate,
@@ -129,7 +129,7 @@ typedef struct {
      * @param certificateThumbprint the certificate thumbprint to compare to the
      *                              one stored in the context.
      * @return if the thumbprints match UA_STATUSCODE_GOOD is returned. If they
-     *         don't match or an error occured an error code is returned. */
+     *         don't match or an error occurred an error code is returned. */
     UA_StatusCode (*compareCertificateThumbprint)(const UA_SecurityPolicy *securityPolicy,
                                                   const UA_ByteString *certificateThumbprint)
         UA_FUNC_ATTR_WARN_UNUSED_RESULT;
@@ -172,7 +172,7 @@ typedef struct {
 typedef struct {
     /* This method creates a new context data object.
      *
-     * The caller needs to call delete on the recieved object to free allocated
+     * The caller needs to call delete on the received object to free allocated
      * memory. Memory is only allocated if the function succeeds so there is no
      * need to manually free the memory pointed to by *channelContext or to
      * call delete in case of failure.
@@ -249,7 +249,7 @@ typedef struct {
      *                       certificate to compare to.
      * @param certificate the certificate to compare to the one stored in the context.
      * @return if the certificates match UA_STATUSCODE_GOOD is returned. If they
-     *         don't match or an errror occured an error code is returned. */
+     *         don't match or an errror occurred an error code is returned. */
     UA_StatusCode (*compareCertificate)(const void *channelContext,
                                         const UA_ByteString *certificate)
         UA_FUNC_ATTR_WARN_UNUSED_RESULT;

+ 3 - 3
include/ua_server.h

@@ -92,7 +92,7 @@ UA_Server_changeRepeatedCallbackInterval(UA_Server *server, UA_UInt64 callbackId
  *
  * @param server The server object.
  * @param callbackId The id of the callback that shall be removed.
- * @return Upon sucess, UA_STATUSCODE_GOOD is returned.
+ * @return Upon success, UA_STATUSCODE_GOOD is returned.
  *         An error code otherwise. */
 UA_StatusCode UA_EXPORT
 UA_Server_removeRepeatedCallback(UA_Server *server, UA_UInt64 callbackId);
@@ -764,7 +764,7 @@ UA_Server_call(UA_Server *server, const UA_CallMethodRequest *request);
  * reference it later. When passing numeric NodeIds with a numeric identifier 0,
  * the stack evaluates this as "select a random unassigned numeric NodeId in
  * that namespace". To find out which NodeId was actually assigned to the new
- * node, you may pass a pointer `outNewNodeId`, which will (after a successfull
+ * node, you may pass a pointer `outNewNodeId`, which will (after a successful
  * node insertion) contain the nodeId of the new node. You may also pass a
  * ``NULL`` pointer if this result is not needed.
  *
@@ -1003,7 +1003,7 @@ UA_UInt16 UA_EXPORT UA_Server_addNamespace(UA_Server *server, const char* name);
  *
  * UA_Job API
  * ^^^^^^^^^^
- * UA_Job was replaced since it unneccessarily exposed server internals to the
+ * UA_Job was replaced since it unnecessarily exposed server internals to the
  * end-user. Please use plain UA_ServerCallbacks instead. The following UA_Job
  * definition contains just the fraction of the original struct that was useful
  * to end-users. */

+ 2 - 2
include/ua_types.h

@@ -659,7 +659,7 @@ UA_Variant_setRangeCopy(UA_Variant *v, const void *array,
  *
  * ExtensionObjects may contain scalars of any data type. Even those that are
  * unknown to the receiver. See the section on :ref:`generic-types` on how types
- * are described. If the received data type is unkown, the encoded string and
+ * are described. If the received data type is unknown, the encoded string and
  * target NodeId is stored instead of the decoded value. */
 typedef enum {
     UA_EXTENSIONOBJECT_ENCODED_NOBODY     = 0,
@@ -762,7 +762,7 @@ typedef struct {
                                      types */
     UA_Byte   padding;            /* How much padding is there before this
                                      member element? For arrays this is the
-                                     padding before the size_t lenght member.
+                                     padding before the size_t length member.
                                      (No padding between size_t and the
                                      following ptr.) */
     UA_Boolean namespaceZero : 1; /* The type of the member is defined in

+ 2 - 2
src/client/ua_client_highlevel_subscriptions.c

@@ -156,7 +156,7 @@ UA_Client_Subscriptions_addMonitoredEvent(UA_Client *client, const UA_UInt32 sub
     request.itemsToCreateSize = 1;
     UA_CreateMonitoredItemsResponse response = UA_Client_Service_createMonitoredItems(client, request);
 
-    // slight misuse of retval here to check if the deletion was successfull.
+    // slight misuse of retval here to check if the deletion was successful.
     UA_StatusCode retval;
     if(response.resultsSize == 0)
         retval = response.responseHeader.serviceResult;
@@ -230,7 +230,7 @@ UA_Client_Subscriptions_addMonitoredItem(UA_Client *client, UA_UInt32 subscripti
     request.itemsToCreateSize = 1;
     UA_CreateMonitoredItemsResponse response = UA_Client_Service_createMonitoredItems(client, request);
 
-    // slight misuse of retval here to check if the addition was successfull.
+    // slight misuse of retval here to check if the addition was successful.
     UA_StatusCode retval = response.responseHeader.serviceResult;
     if(retval == UA_STATUSCODE_GOOD) {
         if(response.resultsSize == 1)

+ 1 - 1
src/server/ua_server_binary.c

@@ -320,7 +320,7 @@ processOPN(UA_Server *server, UA_SecureChannel *channel,
     retval |= UA_NodeId_decodeBinary(msg, &offset, &requestType);
     retval |= UA_OpenSecureChannelRequest_decodeBinary(msg, &offset, &openSecureChannelRequest);
 
-    /* Error occured */
+    /* Error occurred */
     if(retval != UA_STATUSCODE_GOOD ||
        requestType.identifier.numeric != UA_TYPES[UA_TYPES_OPENSECURECHANNELREQUEST].binaryEncodingId) {
         UA_NodeId_deleteMembers(&requestType);

+ 1 - 1
src/server/ua_services_view.c

@@ -249,7 +249,7 @@ Service_Browse_single(UA_Server *server, UA_Session *session,
 
     UA_Nodestore_release(server, node);
 
-    /* Exit early if an error occured */
+    /* Exit early if an error occurred */
     if(result->statusCode != UA_STATUSCODE_GOOD)
         return;
 

+ 3 - 3
src/ua_securechannel.h

@@ -59,7 +59,7 @@ struct UA_SecureChannel {
 
     /* Asymmetric encryption info */
     UA_ByteString remoteCertificate;
-    UA_Byte remoteCertificateThumbprint[20]; /* The thumprint of the remote certificate */
+    UA_Byte remoteCertificateThumbprint[20]; /* The thumbprint of the remote certificate */
 
     /* Symmetric encryption info */
     UA_ByteString remoteNonce;
@@ -118,10 +118,10 @@ typedef UA_StatusCode
  * callback function is called with the complete message body if the message is
  * complete.
  *
- * Symmetric calback is ERR, MSG, CLO only
+ * Symmetric callback is ERR, MSG, CLO only
  * Asymmetric callback is OPN only
  *
- * @param channel the channel the chunks were recieved on.
+ * @param channel the channel the chunks were received on.
  * @param chunks the memory region where the chunks are stored.
  * @param callback the callback function that gets called with the complete
  *                 message body, once a final chunk is processed.

+ 1 - 1
tests/fuzz/corpus_generator.c

@@ -564,7 +564,7 @@ int main(void) {
     teardown_server();
 
     if(retval != UA_STATUSCODE_GOOD) {
-        printf("\n--------- AN ERROR OCCURED ----------\nStatus = %s\n", UA_StatusCode_name(retval));
+        printf("\n--------- AN ERROR OCCURRED ----------\nStatus = %s\n", UA_StatusCode_name(retval));
         exit(1);
     } else {
         printf("\n--------- SUCCESS -------\nThe corpus is stored in %s", UA_CORPUS_OUTPUT_DIR);

+ 2 - 2
tests/server/check_nodestore.c

@@ -182,7 +182,7 @@ START_TEST(iterateOverExpandedNamespaceShallNotVisitEmptyNodes) {
 }
 END_TEST
 
-START_TEST(failToFindNonExistantNodeInUA_NodeStoreWithSeveralEntries) {
+START_TEST(failToFindNonExistentNodeInUA_NodeStoreWithSeveralEntries) {
     UA_Node* n1 = createNode(0,2253);
     ns.insertNode(ns.context, n1, NULL);
     UA_Node* n2 = createNode(0,2255);
@@ -272,7 +272,7 @@ static Suite * namespace_suite (void) {
     tcase_add_test (tc_find, findNodeInUA_NodeStoreWithSingleEntry);
     tcase_add_test (tc_find, findNodeInUA_NodeStoreWithSeveralEntries);
     tcase_add_test (tc_find, findNodeInExpandedNamespace);
-    tcase_add_test (tc_find, failToFindNonExistantNodeInUA_NodeStoreWithSeveralEntries);
+    tcase_add_test (tc_find, failToFindNonExistentNodeInUA_NodeStoreWithSeveralEntries);
     tcase_add_test (tc_find, failToFindNodeInOtherUA_NodeStore);
     suite_add_tcase (s, tc_find);
 

+ 1 - 1
tests/testing-plugins/testing_networklayers.h

@@ -14,7 +14,7 @@ extern "C" {
 /** @brief Create the TCP networklayer and listen to the specified port
  *
  * @param verificationBuffer the send function will write the data that is sent to this buffer, so that it is
- *                           possible to check what the send function recieved.
+ *                           possible to check what the send function received.
  */
 UA_Connection createDummyConnection(UA_ByteString *verificationBuffer);
 

+ 2 - 2
tools/certs/localhost.cnf

@@ -57,7 +57,7 @@ crl		= $dir/crl.pem 		# The current CRL
 private_key	= $dir/ca.key 		# The private key
 RANDFILE	= $dir/.rand		# private random number file
 
-x509_extensions	= usr_cert		# The extentions to add to the cert
+x509_extensions	= usr_cert		# The extensions to add to the cert
 
 # Comment out the following two lines for the "traditional"
 # (and highly broken) format.
@@ -109,7 +109,7 @@ default_bits		= 2048
 default_keyfile 	= privkey.pem
 distinguished_name	= req_distinguished_name
 attributes		= req_attributes
-x509_extensions	= v3_ca	# The extentions to add to the self signed cert
+x509_extensions	= v3_ca	# The extensions to add to the self signed cert
 
 # Passwords for private keys if not present they will be prompted for
 # input_password = secret

+ 2 - 2
tools/nodeset_compiler/README.md

@@ -5,7 +5,7 @@ pyUANamespace is a collection of python 2 scripts that can parse OPC UA XML Name
 
 ### Documentation
 
-The pyUANamespace implementation has been contributed by a research project of the chair for Process Control Systems Engineering of the TU Dresden. It was not strictly speaking created as a C generator, but could be easily modified to fullfill this role for open62541.
+The pyUANamespace implementation has been contributed by a research project of the chair for Process Control Systems Engineering of the TU Dresden. It was not strictly speaking created as a C generator, but could be easily modified to fulfill this role for open62541.
 
 ## Functionality in open62541
 
@@ -56,7 +56,7 @@ $ python generate_open62541CCode.py -i ignorelist.txt /path/to/NodeSet.xml /path
 
 Given the blacklist example, the nodes `ns=1;id=2323` and `ns=0;id=11122` will not be part of the header, but other nodes may attempt to create references to them or use them as dataTypes.
 
-# Supressing attributes
+# Suppressing attributes
 
 Most of OPC UA Namespaces depend heavily on strings. These can bloat up memory usage in applications where memory is a critical resource. The compiler can be instructed to suppress allocation for certain attributes, which will be initialized to sensible defaults or NULL pointers where applicable.
 

+ 2 - 2
tools/nodeset_compiler/backend_open62541.py

@@ -160,7 +160,7 @@ def reorderNodesMinDependencies(nodeset):
 # Generate C Code #
 ###################
 
-def generateOpen62541Code(nodeset, outfilename, supressGenerationOfAttribute=[], generate_ns0=False, internal_headers=False, typesArray=[], max_string_length=0):
+def generateOpen62541Code(nodeset, outfilename, suppressGenerationOfAttribute=[], generate_ns0=False, internal_headers=False, typesArray=[], max_string_length=0):
     outfilebase = basename(outfilename)
     # Printing functions
     outfileh = codecs.open(outfilename + ".h", r"w+", encoding='utf-8')
@@ -227,7 +227,7 @@ extern UA_StatusCode %s(UA_Server *server);
         if not node.hidden:
             writec("\n/* " + str(node.displayName) + " - " + str(node.id) + " */")
             writec("\nstatic UA_StatusCode function_" + outfilebase + "_" + str(functionNumber) + "(UA_Server *server, UA_UInt16* ns){\n")
-            code = generateNodeCode(node, supressGenerationOfAttribute, generate_ns0, parentrefs, nodeset, max_string_length)
+            code = generateNodeCode(node, suppressGenerationOfAttribute, generate_ns0, parentrefs, nodeset, max_string_length)
             if code is None:
                 writec("/* Ignored. No parent */")
                 nodeset.hide_node(node.id)

+ 2 - 2
tools/nodeset_compiler/backend_open62541_nodes.py

@@ -246,7 +246,7 @@ def generateExtensionObjectSubtypeCode(node, parent, nodeset, recursionDepth=0,
     code.append(
         "if(UA_ByteString_allocBuffer(&" + instanceName + "->content.encoded.body, 65000) != UA_STATUSCODE_GOOD) {}")
 
-    # Encode each value as a bytestring seperately.
+    # Encode each value as a bytestring separately.
     code.append("UA_Byte *pos" + instanceName + " = " + instanceName + "->content.encoded.body.data;")
     code.append("const UA_Byte *end" + instanceName + " = &" + instanceName + "->content.encoded.body.data[65000];")
     encFieldIdx = 0
@@ -453,7 +453,7 @@ def generateSubtypeOfDefinitionCode(node):
             return generateNodeIdCode(ref.target)
     return "UA_NODEID_NULL"
 
-def generateNodeCode(node, supressGenerationOfAttribute, generate_ns0, parentrefs, nodeset, max_string_length):
+def generateNodeCode(node, suppressGenerationOfAttribute, generate_ns0, parentrefs, nodeset, max_string_length):
     code = []
     code.append("UA_StatusCode retVal = UA_STATUSCODE_GOOD;")
 

+ 1 - 1
tools/nodeset_compiler/nodes.py

@@ -434,7 +434,7 @@ class DataTypeNode(Node):
             of this DataType.
 
             The function will parse the XML <Definition> of the dataType and extract
-            "Name"-"Type" tuples. If successfull, buildEncoding will return a nested
+            "Name"-"Type" tuples. If successful, buildEncoding will return a nested
             list of the following format:
 
             [['Alias1', ['Alias2', ['BuiltinType']]], [Alias2, ['BuiltinType']], ...]

+ 1 - 1
tools/schema/Opc.Ua.NodeSet2.Minimal.xml

@@ -340,7 +340,7 @@
   </UAReferenceType>
   <UAReferenceType NodeId="i=40" BrowseName="HasTypeDefinition">
     <DisplayName>HasTypeDefinition</DisplayName>
-    <Description>The type for references from a instance node its type defintion node.</Description>
+    <Description>The type for references from a instance node its type definition node.</Description>
     <References>
       <Reference ReferenceType="HasSubtype" IsForward="false">i=32</Reference>
     </References>