Browse Source

Additional header cleanup and consistent name of ns generated files

Stefan Profanter 5 years ago
parent
commit
63f3653ff1
100 changed files with 298 additions and 270 deletions
  1. 28 27
      CMakeLists.txt
  2. 2 0
      arch/posix/ua_clock.c
  3. 5 3
      arch/ua_network_tcp.c
  4. 1 1
      arch/ua_network_tcp.h
  5. 1 0
      arch/win32/ua_clock.c
  6. 1 1
      deps/itoa.h
  7. 1 1
      examples/access_control/client_access_control.c
  8. 2 2
      examples/access_control/server_access_control.c
  9. 2 2
      examples/client.c
  10. 3 3
      examples/client_async.c
  11. 2 1
      examples/client_connect_loop.c
  12. 1 1
      examples/client_historical.c
  13. 1 1
      examples/client_subscription_loop.c
  14. 2 2
      examples/common.h
  15. 3 2
      examples/custom_datatype/client_types_custom.c
  16. 3 2
      examples/custom_datatype/server_types_custom.c
  17. 1 1
      examples/discovery/client_find_servers.c
  18. 2 2
      examples/discovery/server_multicast.c
  19. 2 2
      examples/discovery/server_register.c
  20. 5 4
      examples/encryption/client_encryption.c
  21. 5 4
      examples/encryption/server_basic128rsa15.c
  22. 5 4
      examples/encryption/server_basic256sha256.c
  23. 6 6
      examples/nodeset/server_nodeset.c
  24. 8 8
      examples/nodeset/server_nodeset_plcopen.c
  25. 8 8
      examples/nodeset/server_nodeset_powerlink.c
  26. 6 6
      examples/nodeset/server_testnodeset.c
  27. 8 6
      examples/pubsub/pubsub_subscribe_standalone.c
  28. 2 2
      examples/pubsub/tutorial_pubsub_connection.c
  29. 3 3
      examples/pubsub/tutorial_pubsub_publish.c
  30. 8 8
      examples/pubsub/tutorial_pubsub_subscribe.c
  31. 3 3
      examples/server_ctt.c
  32. 1 1
      examples/server_inheritance.c
  33. 1 1
      examples/server_instantiation.c
  34. 1 1
      examples/server_mainloop.c
  35. 1 1
      examples/server_repeated_job.c
  36. 3 3
      examples/tutorial_client_events.c
  37. 1 1
      examples/tutorial_client_firststeps.c
  38. 1 1
      examples/tutorial_datatypes.c
  39. 1 1
      examples/tutorial_server_datasource.c
  40. 1 1
      examples/tutorial_server_events.c
  41. 1 1
      examples/tutorial_server_firststeps.c
  42. 5 6
      examples/tutorial_server_historicaldata.c
  43. 2 2
      examples/tutorial_server_method.c
  44. 2 2
      examples/tutorial_server_monitoreditems.c
  45. 1 1
      examples/tutorial_server_object.c
  46. 1 1
      examples/tutorial_server_variable.c
  47. 1 1
      examples/tutorial_server_variabletype.c
  48. 2 2
      include/open62541/client.h
  49. 1 1
      include/open62541/client_highlevel.h
  50. 1 1
      include/open62541/constants.h
  51. 2 2
      include/open62541/plugin/accesscontrol.h
  52. 4 3
      include/open62541/plugin/log.h
  53. 20 20
      include/open62541/plugin/network.h
  54. 1 1
      include/open62541/plugin/nodestore.h
  55. 1 1
      include/open62541/plugin/pki.h
  56. 1 1
      include/open62541/plugin/pubsub.h
  57. 3 3
      include/open62541/plugin/securitypolicy.h
  58. 4 4
      include/open62541/server.h
  59. 3 3
      include/open62541/server_config.h
  60. 2 2
      include/open62541/server_pubsub.h
  61. 1 1
      include/open62541/types.h
  62. 2 1
      plugins/historydata/ua_historydatabackend_memory.c
  63. 4 2
      plugins/historydata/ua_historydatagathering_default.c
  64. 3 2
      plugins/historydata/ua_historydatabase_default.c
  65. 1 1
      plugins/include/open62541/client_config_default.h
  66. 2 2
      plugins/include/open62541/plugin/accesscontrol_default.h
  67. 0 0
      plugins/include/open62541/plugin/historydata/history_data_backend.h
  68. 1 1
      plugins/historydata/ua_historydatabackend_memory.h
  69. 1 1
      plugins/historydata/ua_plugin_history_data_gathering.h
  70. 1 1
      plugins/historydata/ua_historydatagathering_default.h
  71. 2 1
      plugins/include/open62541/plugin/historydatabase_default.h
  72. 1 1
      plugins/include/open62541/plugin/log_stdout.h
  73. 1 1
      plugins/include/open62541/plugin/nodestore_default.h
  74. 1 1
      plugins/include/open62541/plugin/pki_default.h
  75. 1 1
      plugins/include/open62541/plugin/securitypolicy_default.h
  76. 2 2
      plugins/include/open62541/server_config_default.h
  77. 7 11
      plugins/securityPolicies/ua_securitypolicy_basic128rsa15.c
  78. 9 7
      plugins/securityPolicies/ua_securitypolicy_basic256.c
  79. 7 12
      plugins/securityPolicies/ua_securitypolicy_basic256sha256.c
  80. 9 7
      plugins/securityPolicies/ua_securitypolicy_mbedtls_common.c
  81. 1 1
      plugins/securityPolicies/ua_securitypolicy_mbedtls_common.h
  82. 1 1
      plugins/securityPolicies/ua_securitypolicy_none.c
  83. 4 3
      plugins/ua_config_default.c
  84. 3 2
      plugins/ua_log_stdout.c
  85. 1 0
      plugins/ua_nodestore_default.c
  86. 1 1
      plugins/ua_pki_default.c
  87. 5 7
      plugins/ua_pubsub_ethernet.c
  88. 3 3
      plugins/ua_pubsub_udp.c
  89. 2 1
      src/client/ua_client.c
  90. 3 2
      src/client/ua_client_connect.c
  91. 3 2
      src/client/ua_client_connect_async.c
  92. 2 1
      src/client/ua_client_highlevel.c
  93. 2 2
      src/client/ua_client_internal.h
  94. 2 1
      src/client/ua_client_subscriptions.c
  95. 4 0
      src/pubsub/ua_pubsub.c
  96. 2 1
      src/pubsub/ua_pubsub.h
  97. 1 0
      src/pubsub/ua_pubsub_manager.h
  98. 2 1
      src/pubsub/ua_pubsub_networkmessage_json.c
  99. 1 0
      src/server/ua_discovery_manager.h
  100. 0 0
      src/server/ua_securechannel_manager.c

+ 28 - 27
CMakeLists.txt

@@ -518,6 +518,13 @@ else()
     list(APPEND exported_headers ${PROJECT_SOURCE_DIR}/arch/${UA_ARCHITECTURE}/ua_architecture.h)
 endif()
 
+
+if(UA_ENABLE_HISTORIZING)
+    # Historizing needs to be included before server_config.h
+    set(historizing_exported_headers
+         ${PROJECT_SOURCE_DIR}/include/open62541/plugin/historydatabase.h)
+endif()
+
 set(exported_headers ${exported_headers}
                      ${PROJECT_SOURCE_DIR}/deps/ms_stdint.h
                      ${PROJECT_SOURCE_DIR}/arch/ua_architecture_definitions.h
@@ -529,7 +536,6 @@ set(exported_headers ${exported_headers}
                      ${PROJECT_BINARY_DIR}/src_generated/open62541/types_generated_handling.h
                      ${PROJECT_SOURCE_DIR}/include/open62541/util.h
                      ${PROJECT_SOURCE_DIR}/include/open62541/server.h
-                     ${PROJECT_SOURCE_DIR}/include/open62541/plugin/historydatabase.h
                      ${PROJECT_SOURCE_DIR}/include/open62541/plugin/log.h
                      ${PROJECT_SOURCE_DIR}/include/open62541/plugin/network.h
                      ${PROJECT_SOURCE_DIR}/include/open62541/plugin/accesscontrol.h
@@ -538,6 +544,7 @@ set(exported_headers ${exported_headers}
                      ${PROJECT_SOURCE_DIR}/include/open62541/server_pubsub.h
                      ${PROJECT_SOURCE_DIR}/include/open62541/plugin/pubsub.h
                      ${PROJECT_SOURCE_DIR}/include/open62541/plugin/nodestore.h
+                     ${historizing_exported_headers}
                      ${PROJECT_SOURCE_DIR}/include/open62541/server_config.h
                      ${PROJECT_SOURCE_DIR}/include/open62541/client_config.h
                      ${PROJECT_SOURCE_DIR}/include/open62541/client.h
@@ -621,7 +628,6 @@ set(lib_sources ${PROJECT_SOURCE_DIR}/src/ua_types.c
                 ${PROJECT_SOURCE_DIR}/deps/base64.c)
 
 set(default_plugin_headers ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/accesscontrol_default.h
-                           ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/historydatabase_default.h
                            ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/pki_default.h
                            ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/log_stdout.h
                            ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/nodestore_default.h
@@ -639,8 +645,8 @@ set(default_plugin_sources ${PROJECT_SOURCE_DIR}/plugins/ua_log_stdout.c
 )
 
 if(UA_GENERATED_NAMESPACE_ZERO)
-    list(APPEND internal_headers ${PROJECT_BINARY_DIR}/src_generated/open62541/ua_namespace0.h)
-    list(APPEND lib_sources ${PROJECT_BINARY_DIR}/src_generated/open62541/ua_namespace0.c)
+    list(APPEND internal_headers ${PROJECT_BINARY_DIR}/src_generated/open62541/namespace0_generated.h)
+    list(APPEND lib_sources ${PROJECT_BINARY_DIR}/src_generated/open62541/namespace0_generated.c)
 endif()
 
 list(APPEND default_plugin_headers
@@ -652,14 +658,19 @@ list(APPEND default_plugin_sources
      ${PROJECT_SOURCE_DIR}/plugins/securityPolicies/ua_securitypolicy_basic256sha256.c)
 
 if(UA_ENABLE_HISTORIZING)
+
+    list(APPEND default_plugin_headers
+         ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/historydata/history_data_backend.h
+         ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/historydata/history_data_gathering.h
+         ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/historydata/history_database_default.h
+         ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/historydata/history_data_gathering_default.h
+         ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/historydata/history_data_backend_memory.h
+         )
     list(APPEND default_plugin_sources
-         ${PROJECT_SOURCE_DIR}/plugins/historydata/ua_historydatabackend_memory.h
-         ${PROJECT_SOURCE_DIR}/plugins/historydata/ua_historydatagathering_default.h
-         ${PROJECT_SOURCE_DIR}/plugins/historydata/ua_plugin_history_data_backend.h
-         ${PROJECT_SOURCE_DIR}/plugins/historydata/ua_plugin_history_data_gathering.h
-         ${PROJECT_SOURCE_DIR}/plugins/historydata/ua_historydatabackend_memory.c
-         ${PROJECT_SOURCE_DIR}/plugins/historydata/ua_historydatagathering_default.c
-         ${PROJECT_SOURCE_DIR}/plugins/historydata/ua_historydatabase_default.c)
+         ${PROJECT_SOURCE_DIR}/plugins/historydata/ua_history_data_backend_memory.c
+         ${PROJECT_SOURCE_DIR}/plugins/historydata/ua_history_data_gathering_default.c
+         ${PROJECT_SOURCE_DIR}/plugins/historydata/ua_history_database_default.c
+         )
 endif()
 
 if(UA_ENABLE_DISCOVERY)
@@ -668,11 +679,11 @@ if(UA_ENABLE_DISCOVERY)
 endif()
 
 if(UA_ENABLE_PUBSUB)
-    list(APPEND default_plugin_headers ${PROJECT_SOURCE_DIR}/plugins/ua_pubsub_udp.h)
+    list(APPEND default_plugin_headers ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/pubsub_udp.h)
     list(APPEND default_plugin_sources ${PROJECT_SOURCE_DIR}/plugins/ua_pubsub_udp.c)
     if(UA_ENABLE_PUBSUB_ETH_UADP)
-        list(APPEND default_plugin_headers ${PROJECT_SOURCE_DIR}/plugins/networking/ua_pubsub_ethernet.h)
-        list(APPEND default_plugin_sources ${PROJECT_SOURCE_DIR}/plugins/networking/ua_pubsub_ethernet.c)
+        list(APPEND default_plugin_headers ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/pubsub_ethernet.h)
+        list(APPEND default_plugin_sources ${PROJECT_SOURCE_DIR}/plugins/ua_pubsub_ethernet.c)
     endif()
 endif()
 
@@ -881,7 +892,7 @@ if(UA_PACK_DEBIAN OR (NOT "$ENV{APPVEYOR}" STREQUAL "") OR (
             (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") AND (CMAKE_C_COMPILER_VERSION VERSION_LESS 7.0))
         )
    ))
-    set_source_files_properties(${PROJECT_BINARY_DIR}/src_generated/ua_namespace0.c PROPERTIES COMPILE_FLAGS "-fno-stack-protector -O0")
+    set_source_files_properties(${PROJECT_BINARY_DIR}/src_generated/open62541/namespace0_generated.c PROPERTIES COMPILE_FLAGS "-fno-stack-protector -O0")
 endif()
 
 #####################
@@ -970,9 +981,8 @@ else()
                                "${PROJECT_BINARY_DIR}/src_generated")
 
     # Private includes
-    include_directories_private("${PROJECT_BINARY_DIR}"
-                                "${PROJECT_SOURCE_DIR}/deps"
-                                "${PROJECT_BINARY_DIR}/src_generated")
+    include_directories_private("${PROJECT_BINARY_DIR}")
+
     if(UA_ENABLE_ENCRYPTION)
         include_directories_private(${MBEDTLS_INCLUDE_DIRS})
     endif()
@@ -982,15 +992,6 @@ else()
         include_directories_private("${PROJECT_SOURCE_DIR}/src/client")
     endif()
 
-    if(UA_ENABLE_HISTORIZING)
-        include_directories_public("${PROJECT_SOURCE_DIR}/plugins/historydata")
-    endif()
-
-    if(UA_ENABLE_PUBSUB)
-        include_directories_public("${PROJECT_SOURCE_DIR}/plugins/networking"
-                                   "${PROJECT_SOURCE_DIR}/src/pubsub"
-                                   "${PROJECT_BINARY_DIR}")
-    endif()
 endif()
 
 # Ensure that the open62541::open62541 alias can be used inside open62541's build

+ 2 - 0
arch/posix/ua_clock.c

@@ -9,7 +9,9 @@
 #ifdef UA_ARCHITECTURE_POSIX
 
 #include <open62541/types.h>
+
 #include <time.h>
+
 #include <sys/time.h>
 
 #if defined(__APPLE__) || defined(__MACH__)

+ 5 - 3
arch/ua_network_tcp.c

@@ -9,12 +9,14 @@
  */
 
 #define UA_INTERNAL
-#include <open62541/util.h>
-#include <open62541/plugin/log_stdout.h>
 #include "ua_network_tcp.h"
+
+#include <open62541/plugin/log_stdout.h>
+#include <open62541/util.h>
+
 #include "open62541_queue.h"
 
-#include <string.h> // memset
+#include <string.h>  // memset
 
 #ifndef MSG_NOSIGNAL
 #define MSG_NOSIGNAL 0

+ 1 - 1
arch/ua_network_tcp.h

@@ -7,9 +7,9 @@
 #ifndef UA_NETWORK_TCP_H_
 #define UA_NETWORK_TCP_H_
 
-#include <open62541/server.h>
 #include <open62541/client.h>
 #include <open62541/plugin/log.h>
+#include <open62541/server.h>
 
 _UA_BEGIN_DECLS
 

+ 1 - 0
arch/win32/ua_clock.c

@@ -13,6 +13,7 @@
 #endif
 
 #include <open62541/types.h>
+
 #include <time.h>
 /* Backup definition of SLIST_ENTRY on mingw winnt.h */
 # ifdef SLIST_ENTRY

+ 1 - 1
deps/itoa.h

@@ -24,7 +24,7 @@
 #ifdef __cplusplus
 extern "C" {
 #endif
-    
+
 #include <open62541/types.h>
 
 UA_UInt16 itoaUnsigned(UA_UInt64 value, char* buffer, UA_Byte base);

+ 1 - 1
examples/access_control/client_access_control.c

@@ -5,8 +5,8 @@
  * Using access_control_server
  */
 
-#include <open62541/client_highlevel.h>
 #include <open62541/client_config_default.h>
+#include <open62541/client_highlevel.h>
 
 #include <stdlib.h>
 

+ 2 - 2
examples/access_control/server_access_control.c

@@ -1,10 +1,10 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
 
+#include <open62541/plugin/accesscontrol_default.h>
+#include <open62541/plugin/log_stdout.h>
 #include <open62541/server.h>
 #include <open62541/server_config_default.h>
-#include <open62541/plugin/log_stdout.h>
-#include <open62541/plugin/accesscontrol_default.h>
 
 #include <signal.h>
 #include <stdlib.h>

+ 2 - 2
examples/client.c

@@ -1,9 +1,9 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
 
-#include <open62541/client_subscriptions.h>
-#include <open62541/client_highlevel.h>
 #include <open62541/client_config_default.h>
+#include <open62541/client_highlevel.h>
+#include <open62541/client_subscriptions.h>
 #include <open62541/plugin/log_stdout.h>
 
 #include <stdlib.h>

+ 3 - 3
examples/client_async.c

@@ -1,11 +1,11 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
 
-#include <open62541/client_subscriptions.h>
-#include <open62541/client_highlevel_async.h>
-#include <open62541/server_config_default.h>
 #include <open62541/client_config_default.h>
+#include <open62541/client_highlevel_async.h>
+#include <open62541/client_subscriptions.h>
 #include <open62541/plugin/log_stdout.h>
+#include <open62541/server_config_default.h>
 
 #include <stdlib.h>
 

+ 2 - 1
examples/client_connect_loop.c

@@ -10,9 +10,10 @@
  *
  * This example is very similar to the tutorial_client_firststeps.c. */
 
-#include <open62541/client_highlevel.h>
 #include <open62541/client_config_default.h>
+#include <open62541/client_highlevel.h>
 #include <open62541/plugin/log_stdout.h>
+
 #include <signal.h>
 #include <stdlib.h>
 

+ 1 - 1
examples/client_historical.c

@@ -1,8 +1,8 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
 
-#include <open62541/client_highlevel.h>
 #include <open62541/client_config_default.h>
+#include <open62541/client_highlevel.h>
 
 #include <stdio.h>
 #include <stdlib.h>

+ 1 - 1
examples/client_subscription_loop.c

@@ -10,8 +10,8 @@
  *
  * This example is very similar to the tutorial_client_firststeps.c. */
 
-#include <open62541/client_subscriptions.h>
 #include <open62541/client_config_default.h>
+#include <open62541/client_subscriptions.h>
 #include <open62541/plugin/log_stdout.h>
 
 #include <signal.h>

+ 2 - 2
examples/common.h

@@ -1,8 +1,8 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
 
-# include <open62541/types.h>
-# include <open62541/types_generated_handling.h>
+#include <open62541/types.h>
+#include <open62541/types_generated_handling.h>
 
 /* loadFile parses the certificate file.
  *

+ 3 - 2
examples/custom_datatype/client_types_custom.c

@@ -1,12 +1,13 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
 
-#include <open62541/client_highlevel.h>
 #include <open62541/client_config_default.h>
-#include "custom_datatype.h"
+#include <open62541/client_highlevel.h>
 
 #include <stdlib.h>
 
+#include "custom_datatype.h"
+
 int main(void) {
     /* Make your custom datatype known to the stack */
     UA_DataType types[1];

+ 3 - 2
examples/custom_datatype/server_types_custom.c

@@ -1,14 +1,15 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
 
+#include <open62541/plugin/log_stdout.h>
 #include <open62541/server.h>
 #include <open62541/server_config_default.h>
-#include <open62541/plugin/log_stdout.h>
-#include "custom_datatype.h"
 
 #include <signal.h>
 #include <stdlib.h>
 
+#include "custom_datatype.h"
+
 UA_Boolean running = true;
 
 static void stopHandler(int sig) {

+ 1 - 1
examples/discovery/client_find_servers.c

@@ -5,8 +5,8 @@
  * and then calls GetEndpoints on the returned list of servers.
  */
 
-#include <open62541/client_highlevel.h>
 #include <open62541/client_config_default.h>
+#include <open62541/client_highlevel.h>
 #include <open62541/plugin/log_stdout.h>
 
 #include <stdlib.h>

+ 2 - 2
examples/discovery/server_multicast.c

@@ -8,11 +8,11 @@
  * (i.e., LDS-ME).
  */
 
-#include <open62541/server.h>
 #include <open62541/client.h>
-#include <open62541/server_config_default.h>
 #include <open62541/client_config_default.h>
 #include <open62541/plugin/log_stdout.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
 
 #include <signal.h>
 #include <stdlib.h>

+ 2 - 2
examples/discovery/server_register.c

@@ -5,11 +5,11 @@
  * Before shutdown it has to unregister itself.
  */
 
-#include <open62541/server.h>
 #include <open62541/client.h>
 #include <open62541/client_config_default.h>
-#include <open62541/server_config_default.h>
 #include <open62541/plugin/log_stdout.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
 
 #include <signal.h>
 #include <stdlib.h>

+ 5 - 4
examples/encryption/client_encryption.c

@@ -1,16 +1,17 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
 
-#include <open62541/server.h>
-#include <open62541/server_config_default.h>
 #include <open62541/client_config_default.h>
+#include <open62541/client_highlevel.h>
 #include <open62541/plugin/log_stdout.h>
 #include <open62541/plugin/securitypolicy.h>
-#include <open62541/client_highlevel.h>
-#include "common.h"
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
 
 #include <stdlib.h>
 
+#include "common.h"
+
 #define MIN_ARGS 4
 
 int main(int argc, char* argv[]) {

+ 5 - 4
examples/encryption/server_basic128rsa15.c

@@ -1,16 +1,17 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
 
-#include <open62541/server.h>
-#include <open62541/server_config_default.h>
+#include <open62541/client_highlevel.h>
 #include <open62541/plugin/log_stdout.h>
 #include <open62541/plugin/securitypolicy.h>
-#include <open62541/client_highlevel.h>
-#include "common.h"
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
 
 #include <signal.h>
 #include <stdlib.h>
 
+#include "common.h"
+
 UA_Boolean running = true;
 static void stopHandler(int sig) {
     UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "received ctrl-c");

+ 5 - 4
examples/encryption/server_basic256sha256.c

@@ -1,16 +1,17 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
 
-#include <open62541/server.h>
-#include <open62541/server_config_default.h>
+#include <open62541/client_highlevel.h>
 #include <open62541/plugin/log_stdout.h>
 #include <open62541/plugin/securitypolicy.h>
-#include <open62541/client_highlevel.h>
-#include "common.h"
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
 
 #include <signal.h>
 #include <stdlib.h>
 
+#include "common.h"
+
 UA_Boolean running = true;
 static void stopHandler(int sig) {
     UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "received ctrl-c");

+ 6 - 6
examples/nodeset/server_nodeset.c

@@ -1,17 +1,17 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
 
+#include <open62541/plugin/log_stdout.h>
 #include <open62541/server.h>
 #include <open62541/server_config_default.h>
-#include <open62541/plugin/log_stdout.h>
-
-#include <signal.h>
-#include <stdlib.h>
 
 /* Files example_namespace.h and example_namespace.c are created from server_nodeset.xml in the
  * /src_generated directory by CMake */
-#include "open62541/ua_namespace_example.h"
 #include "open62541/example_nodeids.h"
+#include "open62541/namespace_example_generated.h"
+
+#include <signal.h>
+#include <stdlib.h>
 
 UA_Boolean running = true;
 
@@ -29,7 +29,7 @@ int main(int argc, char** argv) {
 
     UA_StatusCode retval;
     /* create nodes from nodeset */
-    if(ua_namespace_example(server) != UA_STATUSCODE_GOOD) {
+    if(namespace_example_generated(server) != UA_STATUSCODE_GOOD) {
         UA_LOG_ERROR(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "Could not add the example nodeset. "
         "Check previous output for any error.");
         retval = UA_STATUSCODE_BADUNEXPECTEDERROR;

+ 8 - 8
examples/nodeset/server_nodeset_plcopen.c

@@ -4,17 +4,17 @@
 #ifdef UA_ENABLE_AMALGAMATION
 #include "open62541.h"
 #else
-#include "ua_server.h"
-#include "ua_log_stdout.h"
-#include "ua_config_default.h"
+#include <open62541/plugin/log_stdout.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
 #endif
 
+#include "open62541/namespace_di_generated.h"
+#include "open62541/namespace_plc_generated.h"
+
 #include <signal.h>
 #include <stdlib.h>
 
-#include "ua_namespace_di.h"
-#include "ua_namespace_plc.h"
-
 UA_Boolean running = true;
 
 static void stopHandler(int sign) {
@@ -30,14 +30,14 @@ int main(int argc, char** argv) {
     UA_Server *server = UA_Server_new(config);
 
     /* create nodes from nodeset */
-    UA_StatusCode retval = ua_namespace_di(server);
+    UA_StatusCode retval = namespace_di_generated(server);
     if(retval != UA_STATUSCODE_GOOD) {
         UA_LOG_ERROR(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "Adding the DI namespace failed. Please check previous error output.");
         UA_Server_delete(server);
         UA_ServerConfig_delete(config);
         return EXIT_FAILURE;
     }
-    retval |= ua_namespace_plc(server);
+    retval |= namespace_plc_generated(server);
     if(retval != UA_STATUSCODE_GOOD) {
         UA_LOG_ERROR(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "Adding the PLCopen namespace failed. Please check previous error output.");
         UA_Server_delete(server);

+ 8 - 8
examples/nodeset/server_nodeset_powerlink.c

@@ -4,17 +4,17 @@
 #ifdef UA_ENABLE_AMALGAMATION
 #include "open62541.h"
 #else
-#include "ua_server.h"
-#include "ua_log_stdout.h"
-#include "ua_config_default.h"
+#include <open62541/plugin/log_stdout.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
 #endif
 
+#include "open62541/namespace_di_generated.h"
+#include "open62541/namespace_powerlink_generated.h"
+
 #include <signal.h>
 #include <stdlib.h>
 
-#include "ua_namespace_di.h"
-#include "ua_namespace_powerlink.h"
-
 UA_Boolean running = true;
 
 static void stopHandler(int sign) {
@@ -30,14 +30,14 @@ int main(int argc, char** argv) {
     UA_Server *server = UA_Server_new(config);
 
     /* create nodes from nodeset */
-    UA_StatusCode retval = ua_namespace_di(server);
+    UA_StatusCode retval = namespace_di_generated(server);
     if(retval != UA_STATUSCODE_GOOD) {
         UA_LOG_ERROR(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "Adding the DI namespace failed. Please check previous error output.");
         UA_Server_delete(server);
         UA_ServerConfig_delete(config);
         return EXIT_FAILURE;
     }
-    retval |= ua_namespace_powerlink(server);
+    retval |= namespace_powerlink_generated(server);
     if(retval != UA_STATUSCODE_GOOD) {
         UA_LOG_ERROR(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "Adding the Powerlink namespace failed. Please check previous error output.");
         UA_Server_delete(server);

+ 6 - 6
examples/nodeset/server_testnodeset.c

@@ -2,17 +2,17 @@
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
  */
 
-#include <open62541/server.h>
-#include <open62541/server_config_default.h>
-#include <open62541/client_highlevel.h>
 #include <open62541/client_config_default.h>
+#include <open62541/client_highlevel.h>
 #include <open62541/plugin/log_stdout.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
+
+#include "open62541/namespace_testnodeset_generated.h"
 
 #include <signal.h>
 #include <stdlib.h>
 
-#include "open62541/ua_namespace_testnodeset.h"
-
 UA_Boolean running = true;
 
 UA_DataTypeArray customTypesArray = { NULL, UA_TYPES_TESTNODESET_COUNT, UA_TYPES_TESTNODESET};
@@ -32,7 +32,7 @@ int main(int argc, char **argv)
 
     UA_StatusCode retval;
     /* create nodes from nodeset */
-    if(ua_namespace_testnodeset(server) != UA_STATUSCODE_GOOD) {
+    if(namespace_testnodeset_generated(server) != UA_STATUSCODE_GOOD) {
         UA_LOG_ERROR(UA_Log_Stdout, UA_LOGCATEGORY_SERVER,
                      "Could not add the example nodeset. "
                      "Check previous output for any error.");

+ 8 - 6
examples/pubsub/pubsub_subscribe_standalone.c

@@ -10,16 +10,18 @@
  * PubSub subscriber API.
  */
 
-#include <signal.h>
+#include <open62541/plugin/log_stdout.h>
+#include <open62541/plugin/pubsub.h>
+#include <open62541/plugin/pubsub_udp.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
+
 #include "ua_pubsub_networkmessage.h"
-#include "ua_log_stdout.h"
-#include "ua_config_default.h"
-#include "ua_pubsub.h"
-#include "ua_network_pubsub_udp.h"
+
+#include <signal.h>
 #ifdef UA_ENABLE_PUBSUB_ETH_UADP
 #include "ua_network_pubsub_ethernet.h"
 #endif
-#include "src_generated/ua_types_generated.h"
 
 UA_Boolean running = true;
 static void stopHandler(int sign) {

+ 2 - 2
examples/pubsub/tutorial_pubsub_connection.c

@@ -2,10 +2,10 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
 
-#include <open62541/server.h>
-#include <open62541/server_config_default.h>
 #include <open62541/plugin/log_stdout.h>
 #include <open62541/plugin/pubsub_udp.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
 
 #include <signal.h>
 #include <stdlib.h>

+ 3 - 3
examples/pubsub/tutorial_pubsub_publish.c

@@ -24,11 +24,11 @@
  * ``tutorial_pubsub_connection.c``.
  */
 
-#include <open62541/server.h>
-#include <open62541/server_config_default.h>
 #include <open62541/plugin/log_stdout.h>
-#include <open62541/plugin/pubsub_udp.h>
 #include <open62541/plugin/pubsub_ethernet.h>
+#include <open62541/plugin/pubsub_udp.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
 
 #include <signal.h>
 

+ 8 - 8
examples/pubsub/tutorial_pubsub_subscribe.c

@@ -4,19 +4,19 @@
 
 /**
  * IMPORTANT ANNOUNCEMENT
- * The PubSub subscriber API is currently not finished. This examples can be used to receive
- * and print the values, which are published by the tutorial_pubsub_publish example.
- * The following code uses internal API which will be later replaced by the higher-level
- * PubSub subscriber API. */
+ * The PubSub subscriber API is currently not finished. This examples can be used to
+ * receive and print the values, which are published by the tutorial_pubsub_publish
+ * example. The following code uses internal API which will be later replaced by the
+ * higher-level PubSub subscriber API. */
 
-#include <open62541/server.h>
-#include <open62541/server_config_default.h>
 #include <open62541/plugin/log_stdout.h>
 #include <open62541/plugin/pubsub_udp.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
+#include <open62541/types_generated.h>
 
-#include "src_generated/open62541/types_generated.h"
-#include "ua_pubsub_networkmessage.h"
 #include "ua_pubsub.h"
+#include "ua_pubsub_networkmessage.h"
 
 #ifdef UA_ENABLE_PUBSUB_ETH_UADP
 #include <open62541/plugin/pubsub_ethernet.h>

+ 3 - 3
examples/server_ctt.c

@@ -5,15 +5,15 @@
 #define _CRT_SECURE_NO_WARNINGS /* disable fopen deprication warning in msvs */
 #endif
 
+#include <open62541/plugin/log_stdout.h>
 #include <open62541/server.h>
 #include <open62541/server_config_default.h>
-#include <open62541/plugin/log_stdout.h>
-
-#include "common.h"
 
 #include <signal.h>
 #include <stdlib.h>
 
+#include "common.h"
+
 /* This server is configured to the Compliance Testing Tools (CTT) against. The
  * corresponding CTT configuration is available at
  * https://github.com/open62541/open62541-ctt */

+ 1 - 1
examples/server_inheritance.c

@@ -1,9 +1,9 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
 
+#include <open62541/plugin/log_stdout.h>
 #include <open62541/server.h>
 #include <open62541/server_config_default.h>
-#include <open62541/plugin/log_stdout.h>
 
 #include <signal.h>
 #include <stdlib.h>

+ 1 - 1
examples/server_instantiation.c

@@ -1,9 +1,9 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
 
+#include <open62541/plugin/log_stdout.h>
 #include <open62541/server.h>
 #include <open62541/server_config_default.h>
-#include <open62541/plugin/log_stdout.h>
 
 #include <signal.h>
 #include <stdlib.h>

+ 1 - 1
examples/server_mainloop.c

@@ -3,9 +3,9 @@
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
  */
 
+#include <open62541/plugin/log_stdout.h>
 #include <open62541/server.h>
 #include <open62541/server_config_default.h>
-#include <open62541/plugin/log_stdout.h>
 
 #include <signal.h>
 #include <stdlib.h>

+ 1 - 1
examples/server_repeated_job.c

@@ -1,9 +1,9 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
 
+#include <open62541/plugin/log_stdout.h>
 #include <open62541/server.h>
 #include <open62541/server_config_default.h>
-#include <open62541/plugin/log_stdout.h>
 
 #include <signal.h>
 #include <stdlib.h>

+ 3 - 3
examples/tutorial_client_events.c

@@ -1,13 +1,13 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
 
-#include <open62541/server.h>
 #include <open62541/client.h>
+#include <open62541/client_config_default.h>
 #include <open62541/client_highlevel.h>
 #include <open62541/client_subscriptions.h>
-#include <open62541/client_config_default.h>
-#include <open62541/server_config_default.h>
 #include <open62541/plugin/log_stdout.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
 
 #include <signal.h>
 

+ 1 - 1
examples/tutorial_client_firststeps.c

@@ -8,8 +8,8 @@
  * provides both a server- and clientside API, so creating a client is as easy as
  * creating a server. Copy the following into a file `myClient.c`: */
 
-#include <open62541/client_highlevel.h>
 #include <open62541/client_config_default.h>
+#include <open62541/client_highlevel.h>
 #include <open62541/plugin/log_stdout.h>
 
 #include <stdlib.h>

+ 1 - 1
examples/tutorial_datatypes.c

@@ -16,9 +16,9 @@
  * This section shows the basic interaction patterns for data types. Make
  * sure to compare with the type definitions in ``ua_types.h``. */
 
+#include <open62541/plugin/log_stdout.h>
 #include <open62541/server.h>
 #include <open62541/server_config_default.h>
-#include <open62541/plugin/log_stdout.h>
 
 #include <stdlib.h>
 

+ 1 - 1
examples/tutorial_server_datasource.c

@@ -25,9 +25,9 @@
  * new value arrives from the underlying process, we can just write into the
  * variable. */
 
+#include <open62541/plugin/log_stdout.h>
 #include <open62541/server.h>
 #include <open62541/server_config_default.h>
-#include <open62541/plugin/log_stdout.h>
 
 #include <signal.h>
 #include <stdlib.h>

+ 1 - 1
examples/tutorial_server_events.c

@@ -1,9 +1,9 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
 
+#include <open62541/plugin/log_stdout.h>
 #include <open62541/server.h>
 #include <open62541/server_config_default.h>
-#include <open62541/plugin/log_stdout.h>
 
 #include <signal.h>
 #include <stdlib.h>

+ 1 - 1
examples/tutorial_server_firststeps.c

@@ -20,9 +20,9 @@
  * you have the ``open62541.c/.h`` files in the current folder. Now create a new
  * C source-file called ``myServer.c`` with the following content: */
 
+#include <open62541/plugin/log_stdout.h>
 #include <open62541/server.h>
 #include <open62541/server_config_default.h>
-#include <open62541/plugin/log_stdout.h>
 
 #include <signal.h>
 #include <stdlib.h>

+ 5 - 6
examples/tutorial_server_historicaldata.c

@@ -4,14 +4,13 @@
  * Copyright 2019 (c) basysKom GmbH <opensource@basyskom.com> (Author: Peter Rustler)
  */
 
+#include <open62541/plugin/historydata/history_data_backend_memory.h>
+#include <open62541/plugin/historydata/history_data_gathering_default.h>
+#include <open62541/plugin/historydata/history_database_default.h>
+#include <open62541/plugin/historydatabase.h>
+#include <open62541/plugin/log_stdout.h>
 #include <open62541/server.h>
 #include <open62541/server_config_default.h>
-#include <open62541/plugin/log_stdout.h>
-#include <open62541/plugin/historydatabase.h>
-#include <open62541/plugin/historydatabase_default.h>
-
-#include "historydata/ua_historydatagathering_default.h"
-#include "historydata/ua_historydatabackend_memory.h"
 
 #include <signal.h>
 #include <stdlib.h>

+ 2 - 2
examples/tutorial_server_method.c

@@ -30,10 +30,10 @@
  * prepended. The type and length of the input arguments is checked internally
  * by the SDK, so that we don't have to verify the arguments in the callback. */
 
-#include <open62541/server.h>
 #include <open62541/client_config_default.h>
-#include <open62541/server_config_default.h>
 #include <open62541/plugin/log_stdout.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
 
 #include <signal.h>
 #include <stdlib.h>

+ 2 - 2
examples/tutorial_server_monitoreditems.c

@@ -19,10 +19,10 @@
  * context pointer.
  */
 
+#include <open62541/client_subscriptions.h>
+#include <open62541/plugin/log_stdout.h>
 #include <open62541/server.h>
 #include <open62541/server_config_default.h>
-#include <open62541/plugin/log_stdout.h>
-#include <open62541/client_subscriptions.h>
 
 #include <signal.h>
 #include <stdlib.h>

+ 1 - 1
examples/tutorial_server_object.c

@@ -55,9 +55,9 @@
  * setting constraints on the variable values as this is not the focus of this
  * tutorial and was already covered. */
 
+#include <open62541/plugin/log_stdout.h>
 #include <open62541/server.h>
 #include <open62541/server_config_default.h>
-#include <open62541/plugin/log_stdout.h>
 
 #include <signal.h>
 

+ 1 - 1
examples/tutorial_server_variable.c

@@ -14,9 +14,9 @@
  * read only. See below for making the variable writable.
  */
 
+#include <open62541/plugin/log_stdout.h>
 #include <open62541/server.h>
 #include <open62541/server_config_default.h>
-#include <open62541/plugin/log_stdout.h>
 
 #include <signal.h>
 #include <stdlib.h>

+ 1 - 1
examples/tutorial_server_variabletype.c

@@ -18,9 +18,9 @@
  * VariableTypeNode to the hierarchy of variable types.
  */
 
+#include <open62541/plugin/log_stdout.h>
 #include <open62541/server.h>
 #include <open62541/server_config_default.h>
-#include <open62541/plugin/log_stdout.h>
 
 #include <signal.h>
 #include <stdlib.h>

+ 2 - 2
include/open62541/client.h

@@ -17,9 +17,9 @@
 #ifndef UA_CLIENT_H_
 #define UA_CLIENT_H_
 
-#include <open62541/types.h>
-#include <open62541/nodeids.h>
 #include <open62541/client_config.h>
+#include <open62541/nodeids.h>
+#include <open62541/types.h>
 #include <open62541/types_generated.h>
 #include <open62541/types_generated_handling.h>
 

+ 1 - 1
include/open62541/client_highlevel.h

@@ -1,6 +1,6 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. 
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  *    Copyright 2015-2018 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
  *    Copyright 2015 (c) Oleksiy Vasylyev

+ 1 - 1
include/open62541/constants.h

@@ -1,6 +1,6 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. 
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  *    Copyright 2016-2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
  *    Copyright 2016 (c) Sten Grüner

+ 2 - 2
include/open62541/plugin/accesscontrol.h

@@ -1,6 +1,6 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. 
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  *    Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
  *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
@@ -31,7 +31,7 @@ struct UA_AccessControl {
     /* Supported login mechanisms. The server endpoints are created from here. */
     size_t userTokenPoliciesSize;
     UA_UserTokenPolicy *userTokenPolicies;
-    
+
     /* Authenticate a session. The session context is attached to the session
      * and later passed into the node-based access control callbacks. The new
      * session is rejected if a StatusCode other than UA_STATUSCODE_GOOD is

+ 4 - 3
include/open62541/plugin/log.h

@@ -1,6 +1,6 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this 
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. 
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  *    Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
  *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
@@ -9,9 +9,10 @@
 #ifndef UA_PLUGIN_LOG_H_
 #define UA_PLUGIN_LOG_H_
 
-#include <stdarg.h>
 #include <open62541/config.h>
 
+#include <stdarg.h>
+
 _UA_BEGIN_DECLS
 
 /**

+ 20 - 20
include/open62541/plugin/network.h

@@ -1,6 +1,6 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. 
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  *    Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
  *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
@@ -9,8 +9,8 @@
 #ifndef UA_PLUGIN_NETWORK_H_
 #define UA_PLUGIN_NETWORK_H_
 
-#include <open62541/server.h>
 #include <open62541/plugin/log.h>
+#include <open62541/server.h>
 
 _UA_BEGIN_DECLS
 
@@ -26,7 +26,7 @@ typedef struct UA_ServerNetworkLayer UA_ServerNetworkLayer;
 
 /**
  * .. _networking:
- * 
+ *
  * Networking Plugin API
  * =====================
  *
@@ -49,28 +49,28 @@ typedef struct {
 } UA_ConnectionConfig;
 
 typedef enum {
-    UA_CONNECTION_CLOSED,      /* The socket has been closed and the connection
-                                * will be deleted */
-    UA_CONNECTION_OPENING,     /* The socket is open, but the HEL/ACK handshake
-                                * is not done */
-    UA_CONNECTION_ESTABLISHED  /* The socket is open and the connection
-                                * configured */
+    UA_CONNECTION_CLOSED,     /* The socket has been closed and the connection
+                               * will be deleted */
+    UA_CONNECTION_OPENING,    /* The socket is open, but the HEL/ACK handshake
+                               * is not done */
+    UA_CONNECTION_ESTABLISHED /* The socket is open and the connection
+                               * configured */
 
 } UA_ConnectionState;
 
 struct UA_Connection {
     UA_ConnectionState state;
     UA_ConnectionConfig config;
-    UA_SecureChannel *channel;       /* The securechannel that is attached to
-                                      * this connection */
-    UA_SOCKET sockfd;                 /* Most connectivity solutions run on
-                                      * sockets. Having the socket id here
-                                      * simplifies the design. */
-    UA_DateTime openingDate;         /* The date the connection was created */
-    void *handle;                    /* A pointer to internal data */
-    UA_ByteString incompleteChunk;   /* A half-received chunk (TCP is a
-                                      * streaming protocol) is stored here */
-    UA_UInt64 connectCallbackID;     /* Callback Id, for the connect-loop */
+    UA_SecureChannel *channel;     /* The securechannel that is attached to
+                                    * this connection */
+    UA_SOCKET sockfd;              /* Most connectivity solutions run on
+                                    * sockets. Having the socket id here
+                                    * simplifies the design. */
+    UA_DateTime openingDate;       /* The date the connection was created */
+    void *handle;                  /* A pointer to internal data */
+    UA_ByteString incompleteChunk; /* A half-received chunk (TCP is a
+                                    * streaming protocol) is stored here */
+    UA_UInt64 connectCallbackID;   /* Callback Id, for the connect-loop */
     /* Get a buffer for sending */
     UA_StatusCode (*getSendBuffer)(UA_Connection *connection, size_t length,
                                    UA_ByteString *buf);
@@ -167,7 +167,7 @@ struct UA_ServerNetworkLayer {
      *
      * @param nl The network layer
      * @param server The server for processing the incoming packets and for
-     *               closing connections. 
+     *               closing connections.
      * @param timeout The timeout during which an event must arrive in
      *                milliseconds
      * @return A statuscode for the status of the network layer. */

+ 1 - 1
include/open62541/plugin/nodestore.h

@@ -1,6 +1,6 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. 
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  *    Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
  *    Copyright 2017 (c) Julian Grothoff

+ 1 - 1
include/open62541/plugin/pki.h

@@ -1,6 +1,6 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. 
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  *    Copyright 2018 (c) Mark Giraud, Fraunhofer IOSB
  */

+ 1 - 1
include/open62541/plugin/pubsub.h

@@ -86,7 +86,7 @@ struct UA_PubSubChannel {
 
 typedef struct {
     UA_String transportProfileUri;
-    UA_PubSubChannel * (*createPubSubChannel)(UA_PubSubConnectionConfig *connectionConfig);
+    UA_PubSubChannel *(*createPubSubChannel)(UA_PubSubConnectionConfig *connectionConfig);
 } UA_PubSubTransportLayer;
 
 /**

+ 3 - 3
include/open62541/plugin/securitypolicy.h

@@ -1,6 +1,6 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. 
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  *    Copyright 2017-2018 (c) Mark Giraud, Fraunhofer IOSB
  *    Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
@@ -10,9 +10,9 @@
 #ifndef UA_PLUGIN_SECURITYPOLICY_H_
 #define UA_PLUGIN_SECURITYPOLICY_H_
 
-#include <open62541/server.h>
 #include <open62541/plugin/log.h>
 #include <open62541/plugin/pki.h>
+#include <open62541/server.h>
 
 _UA_BEGIN_DECLS
 
@@ -356,7 +356,7 @@ struct UA_SecurityPolicy {
     const UA_Logger *logger;
 
     /*Updates the ApplicationInstanceCertificate and the corresponding
-    * private key at runtime. */
+     * private key at runtime. */
     UA_StatusCode (*updateCertificateAndPrivateKey)(UA_SecurityPolicy *policy,
                                                     const UA_ByteString newCertificate,
                                                     const UA_ByteString newPrivateKey);

+ 4 - 4
include/open62541/server.h

@@ -1,6 +1,6 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. 
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  *    Copyright 2014-2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
  *    Copyright 2015-2016 (c) Sten Grüner
@@ -13,8 +13,8 @@
 #ifndef UA_SERVER_H_
 #define UA_SERVER_H_
 
-#include <open62541/types.h>
 #include <open62541/nodeids.h>
+#include <open62541/types.h>
 #include <open62541/types_generated.h>
 #include <open62541/types_generated_handling.h>
 
@@ -707,7 +707,7 @@ typedef struct {
      * `value->value.storageType` to `UA_VARIANT_DATA_NODELETE` to prevent the
      * memory being cleaned up. Don't forget to also set `value->hasValue` to
      * true to indicate the presence of a value.
-     * 
+     *
      * @param server The server executing the callback
      * @param sessionId The identifier of the session
      * @param sessionContext Additional data attached to the session in the
@@ -734,7 +734,7 @@ typedef struct {
 
     /* Write into a data source. This method pointer can be NULL if the
      * operation is unsupported.
-     * 
+     *
      * @param server The server executing the callback
      * @param sessionId The identifier of the session
      * @param sessionContext Additional data attached to the session in the

+ 3 - 3
include/open62541/server_config.h

@@ -11,13 +11,13 @@
 #ifndef UA_SERVER_CONFIG_H_
 #define UA_SERVER_CONFIG_H_
 
-#include <open62541/server.h>
+#include <open62541/plugin/accesscontrol.h>
 #include <open62541/plugin/log.h>
-#include <open62541/plugin/pki.h>
 #include <open62541/plugin/network.h>
 #include <open62541/plugin/nodestore.h>
-#include <open62541/plugin/accesscontrol.h>
+#include <open62541/plugin/pki.h>
 #include <open62541/plugin/securitypolicy.h>
+#include <open62541/server.h>
 
 #ifdef UA_ENABLE_PUBSUB
 #include <open62541/plugin/pubsub.h>

+ 2 - 2
include/open62541/server_pubsub.h

@@ -241,7 +241,7 @@ typedef struct {
         //events need other config later
     } field;
 } UA_DataSetFieldConfig;
-    
+
 void UA_EXPORT
 UA_DataSetFieldConfig_deleteMembers(UA_DataSetFieldConfig *dataSetFieldConfig);
 
@@ -366,7 +366,7 @@ UA_StatusCode UA_EXPORT
 UA_Server_removeDataSetWriter(UA_Server *server, const UA_NodeId dsw);
 
 #endif /* UA_ENABLE_PUBSUB */
-    
+
 _UA_END_DECLS
 
 #endif /* UA_SERVER_PUBSUB_H */

+ 1 - 1
include/open62541/types.h

@@ -1,6 +1,6 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. 
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  *    Copyright 2014 (c) Leon Urbas
  *    Copyright 2014, 2016-2017 (c) Florian Palm

+ 2 - 1
plugins/historydata/ua_historydatabackend_memory.c

@@ -5,7 +5,8 @@
  *    Copyright 2018 (c) basysKom GmbH <opensource@basyskom.com> (Author: Peter Rustler)
  */
 
-#include "ua_historydatabackend_memory.h"
+#include <open62541/plugin/historydata/history_data_backend_memory.h>
+
 #include <limits.h>
 #include <string.h>
 

+ 4 - 2
plugins/historydata/ua_historydatagathering_default.c

@@ -5,9 +5,11 @@
  *    Copyright 2018 (c) basysKom GmbH <opensource@basyskom.com> (Author: Peter Rustler)
  */
 
-#include <string.h>
 #include <open62541/client_subscriptions.h>
-#include "ua_historydatagathering_default.h"
+#include <open62541/plugin/historydata/history_data_gathering_default.h>
+#include <open62541/plugin/historydata/history_database_default.h>
+
+#include <string.h>
 
 typedef struct {
     UA_NodeId nodeId;

+ 3 - 2
plugins/historydata/ua_historydatabase_default.c

@@ -5,9 +5,10 @@
  *    Copyright 2018 (c) basysKom GmbH <opensource@basyskom.com> (Author: Peter Rustler)
  */
 
+#include <open62541/plugin/historydata/history_data_gathering_default.h>
+#include <open62541/plugin/historydata/history_database_default.h>
+
 #include <limits.h>
-#include <open62541/plugin/historydatabase_default.h>
-#include "ua_historydatagathering_default.h"
 
 typedef struct {
     UA_HistoryDataGathering gathering;

+ 1 - 1
plugins/include/open62541/client_config_default.h

@@ -1,5 +1,5 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
- * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. 
+ * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
  *
  *    Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
  *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH

+ 2 - 2
plugins/include/open62541/plugin/accesscontrol_default.h

@@ -1,5 +1,5 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
- * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. 
+ * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
  *
  *    Copyright 2016-2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
  *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
@@ -8,8 +8,8 @@
 #ifndef UA_ACCESSCONTROL_DEFAULT_H_
 #define UA_ACCESSCONTROL_DEFAULT_H_
 
-#include <open62541/server.h>
 #include <open62541/plugin/accesscontrol.h>
+#include <open62541/server.h>
 
 _UA_BEGIN_DECLS
 

plugins/historydata/ua_plugin_history_data_backend.h → plugins/include/open62541/plugin/historydata/history_data_backend.h


+ 1 - 1
plugins/historydata/ua_historydatabackend_memory.h

@@ -8,7 +8,7 @@
 #ifndef UA_HISTORYDATABACKEND_MEMORY_H_
 #define UA_HISTORYDATABACKEND_MEMORY_H_
 
-#include "ua_plugin_history_data_backend.h"
+#include "history_data_backend.h"
 
 _UA_BEGIN_DECLS
 

+ 1 - 1
plugins/historydata/ua_plugin_history_data_gathering.h

@@ -8,7 +8,7 @@
 #ifndef UA_PLUGIN_HISTORY_DATA_GATHERING_H_
 #define UA_PLUGIN_HISTORY_DATA_GATHERING_H_
 
-#include "ua_plugin_history_data_backend.h"
+#include "history_data_backend.h"
 
 _UA_BEGIN_DECLS
 

+ 1 - 1
plugins/historydata/ua_historydatagathering_default.h

@@ -8,7 +8,7 @@
 #ifndef UA_HISTORYDATAGATHERING_DEFAULT_H_
 #define UA_HISTORYDATAGATHERING_DEFAULT_H_
 
-#include "ua_plugin_history_data_gathering.h"
+#include "history_data_gathering.h"
 
 _UA_BEGIN_DECLS
 

+ 2 - 1
plugins/include/open62541/plugin/historydatabase_default.h

@@ -9,7 +9,8 @@
 #define UA_HISTORYDATASERVICE_DEFAULT_H_
 
 #include <open62541/plugin/historydatabase.h>
-#include "historydata/ua_plugin_history_data_gathering.h"
+
+#include "history_data_gathering.h"
 
 _UA_BEGIN_DECLS
 

+ 1 - 1
plugins/include/open62541/plugin/log_stdout.h

@@ -1,5 +1,5 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
- * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. 
+ * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
  *
  *    Copyright 2016, 2018 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
  */

+ 1 - 1
plugins/include/open62541/plugin/nodestore_default.h

@@ -1,5 +1,5 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
- * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. 
+ * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
  *
  *    Copyright 2014-2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
  *    Copyright 2017 (c) Julian Grothoff

+ 1 - 1
plugins/include/open62541/plugin/pki_default.h

@@ -1,5 +1,5 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
- * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. 
+ * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
  *
  *    Copyright 2018 (c) Mark Giraud, Fraunhofer IOSB
  */

+ 1 - 1
plugins/include/open62541/plugin/securitypolicy_default.h

@@ -1,5 +1,5 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
- * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. 
+ * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
  *
  *    Copyright 2017-2018 (c) Mark Giraud, Fraunhofer IOSB
  *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH

+ 2 - 2
plugins/include/open62541/server_config_default.h

@@ -1,5 +1,5 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
- * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. 
+ * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
  *
  *    Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
  *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
@@ -42,7 +42,7 @@ UA_ServerConfig_new_customBuffer(UA_UInt16 portNumber, const UA_ByteString *cert
                                  UA_UInt32 sendBufferSize, UA_UInt32 recvBufferSize);
 
 /* Creates a new server config with one endpoint.
- * 
+ *
  * The config will set the tcp network layer to the given port and adds a single
  * endpoint with the security policy ``SecurityPolicy#None`` to the server. A
  * server certificate may be supplied but is optional.

+ 7 - 11
plugins/securityPolicies/ua_securitypolicy_basic128rsa15.c

@@ -5,27 +5,23 @@
  *    Copyright 2018 (c) Mark Giraud, Fraunhofer IOSB
  */
 
-
 #include <open62541/plugin/securitypolicy_default.h>
 
-//#include "ua_types.h"
-//#include "ua_plugin_pki.h"
-//#include "ua_securitypolicies.h"
-//#include "ua_securitypolicy_mbedtls_common.h"
-//#include "ua_types_generated_handling.h"
-//#include "ua_util.h"
-
 #ifdef UA_ENABLE_ENCRYPTION
 
+#include <open62541/util.h>
+
+#include "ua_securitypolicy_mbedtls_common.h"
+
 #include <mbedtls/aes.h>
-#include <mbedtls/md.h>
-#include <mbedtls/x509_crt.h>
 #include <mbedtls/ctr_drbg.h>
 #include <mbedtls/entropy.h>
 #include <mbedtls/entropy_poll.h>
 #include <mbedtls/error.h>
-#include <mbedtls/version.h>
+#include <mbedtls/md.h>
 #include <mbedtls/sha1.h>
+#include <mbedtls/version.h>
+#include <mbedtls/x509_crt.h>
 
 /* Notes:
  * mbedTLS' AES allows in-place encryption and decryption. Sow we don't have to

+ 9 - 7
plugins/securityPolicies/ua_securitypolicy_basic256.c

@@ -6,21 +6,23 @@
  *    Copyright 2018 (c) Daniel Feist, Precitec GmbH & Co. KG
  */
 
-#include "ua_types.h"
-#include "ua_plugin_pki.h"
-#include "ua_securitypolicies.h"
-#include "ua_securitypolicy_mbedtls_common.h"
-#include "ua_types_generated_handling.h"
-#include "ua_util.h"
+#include <open62541/plugin/securitypolicy.h>
 
 #ifdef UA_ENABLE_ENCRYPTION
 
+#include <open62541/plugin/pki.h>
+#include <open62541/plugin/securitypolicy_default.h>
+#include <open62541/types.h>
+#include <open62541/util.h>
+
+#include "ua_securitypolicy_mbedtls_common.h"
+
 #include <mbedtls/aes.h>
 #include <mbedtls/entropy.h>
 #include <mbedtls/entropy_poll.h>
 #include <mbedtls/error.h>
-#include <mbedtls/version.h>
 #include <mbedtls/sha1.h>
+#include <mbedtls/version.h>
 
 /* Notes:
  * mbedTLS' AES allows in-place encryption and decryption. Sow we don't have to

+ 7 - 12
plugins/securityPolicies/ua_securitypolicy_basic256sha256.c

@@ -6,28 +6,23 @@
  *    Copyright 2018 (c) Daniel Feist, Precitec GmbH & Co. KG
  */
 
-
 #include <open62541/plugin/securitypolicy_default.h>
-
-//#include "ua_types.h"
-//#include "ua_plugin_pki.h"
-//#include "ua_securitypolicies.h"
-//#include "ua_securitypolicy_mbedtls_common.h"
-//#include "ua_types_generated_handling.h"
-//#include "ua_util.h"
+#include <open62541/util.h>
 
 #ifdef UA_ENABLE_ENCRYPTION
 
+#include "ua_securitypolicy_mbedtls_common.h"
+
 #include <mbedtls/aes.h>
-#include <mbedtls/md.h>
-#include <mbedtls/sha256.h>
-#include <mbedtls/x509_crt.h>
 #include <mbedtls/ctr_drbg.h>
 #include <mbedtls/entropy.h>
 #include <mbedtls/entropy_poll.h>
 #include <mbedtls/error.h>
-#include <mbedtls/version.h>
+#include <mbedtls/md.h>
 #include <mbedtls/sha1.h>
+#include <mbedtls/sha256.h>
+#include <mbedtls/version.h>
+#include <mbedtls/x509_crt.h>
 
 /* Notes:
  * mbedTLS' AES allows in-place encryption and decryption. Sow we don't have to

+ 9 - 7
plugins/securityPolicies/ua_securitypolicy_mbedtls_common.c

@@ -1,19 +1,21 @@
-#include "ua_types.h"
-#include "ua_plugin_pki.h"
-#include "ua_securitypolicies.h"
-#include "ua_securitypolicy_mbedtls_common.h"
+#include <open62541/plugin/securitypolicy.h>
 
 #ifdef UA_ENABLE_ENCRYPTION
 
+#include <open62541/plugin/pki.h>
+#include <open62541/types.h>
+
+#include "ua_securitypolicy_mbedtls_common.h"
+
 #include <mbedtls/aes.h>
-#include <mbedtls/md.h>
-#include <mbedtls/x509_crt.h>
 #include <mbedtls/ctr_drbg.h>
 #include <mbedtls/entropy.h>
 #include <mbedtls/entropy_poll.h>
 #include <mbedtls/error.h>
-#include <mbedtls/version.h>
+#include <mbedtls/md.h>
 #include <mbedtls/sha1.h>
+#include <mbedtls/version.h>
+#include <mbedtls/x509_crt.h>
 
 void
 swapBuffers(UA_ByteString *const bufA, UA_ByteString *const bufB) {

+ 1 - 1
plugins/securityPolicies/ua_securitypolicy_mbedtls_common.h

@@ -7,7 +7,7 @@
 #ifndef UA_SECURITYPOLICY_MBEDTLS_COMMON_H_
 #define UA_SECURITYPOLICY_MBEDTLS_COMMON_H_
 
-#include "ua_plugin_securitypolicy.h"
+#include <open62541/plugin/securitypolicy.h>
 
 #ifdef UA_ENABLE_ENCRYPTION
 

+ 1 - 1
plugins/securityPolicies/ua_securitypolicy_none.c

@@ -1,5 +1,5 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
- * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. 
+ * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
  *
  *    Copyright 2017-2018 (c) Mark Giraud, Fraunhofer IOSB
  *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH

+ 4 - 3
plugins/ua_config_default.c

@@ -11,12 +11,13 @@
  */
 
 #include <open62541/client_config_default.h>
-#include <open62541/server_config_default.h>
-#include <open62541/plugin/log_stdout.h>
 #include <open62541/plugin/accesscontrol_default.h>
-#include <open62541/plugin/pki_default.h>
+#include <open62541/plugin/log_stdout.h>
 #include <open62541/plugin/nodestore_default.h>
+#include <open62541/plugin/pki_default.h>
 #include <open62541/plugin/securitypolicy_default.h>
+#include <open62541/server_config_default.h>
+
 #include "ua_network_tcp.h"
 
 /* Struct initialization works across ANSI C/C99/C++ if it is done when the

+ 3 - 2
plugins/ua_log_stdout.c

@@ -5,9 +5,10 @@
  *    Copyright 2017 (c) Thomas Stalder, Blue Time Concept SA
  */
 
-#include <stdio.h>
-#include <open62541/types.h>
 #include <open62541/plugin/log_stdout.h>
+#include <open62541/types.h>
+
+#include <stdio.h>
 
 #ifdef UA_ENABLE_MULTITHREADING
 #include <pthread.h>

+ 1 - 0
plugins/ua_nodestore_default.c

@@ -7,6 +7,7 @@
  */
 
 #include <open62541/plugin/nodestore_default.h>
+
 #include "ziptree.h"
 
 #ifdef UA_ENABLE_MULTITHREADING

+ 1 - 1
plugins/ua_pki_default.c

@@ -1,5 +1,5 @@
 /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
- * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. 
+ * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
  *
  *    Copyright 2018 (c) Mark Giraud, Fraunhofer IOSB
  */

+ 5 - 7
plugins/ua_pubsub_ethernet.c

@@ -5,17 +5,15 @@
  *   Copyright 2018 (c) Kontron Europe GmbH (Author: Rudolf Hoyler)
  */
 
-#include "ua_plugin_network.h"
-#include "ua_log_stdout.h"
-#include "ua_util.h"
+#include <open62541/plugin/log_stdout.h>
+#include <open62541/plugin/pubsub_ethernet.h>
+#include <open62541/util.h>
 
-#include <netinet/ether.h>
 #include <linux/if_packet.h>
-
-#include "ua_network_pubsub_ethernet.h"
+#include <netinet/ether.h>
 
 #ifndef ETHERTYPE_UADP
-#define ETHERTYPE_UADP  0xb62c
+#define ETHERTYPE_UADP 0xb62c
 #endif
 
 /* Ethernet network layer specific internal data */

+ 3 - 3
plugins/ua_pubsub_udp.c

@@ -6,11 +6,11 @@
  * Copyright 2018 (c) Jose Cabral, fortiss GmbH
  */
 
-#include <open62541/util.h>
-#include <open62541/plugin/pubsub_udp.h>
 #include <open62541/plugin/log_stdout.h>
+#include <open62541/plugin/pubsub_udp.h>
+#include <open62541/util.h>
 
-//UDP multicast network layer specific internal data
+// UDP multicast network layer specific internal data
 typedef struct {
     int ai_family;                        //Protocol family for socket.  IPv4/IPv6
     struct sockaddr_storage *ai_addr;     //https://msdn.microsoft.com/de-de/library/windows/desktop/ms740496(v=vs.85).aspx

+ 2 - 1
src/client/ua_client.c

@@ -17,10 +17,11 @@
  *    Copyright 2018 (c) Kalycito Infotech Private Limited
  */
 
+#include <open62541/types_generated_encoding_binary.h>
+
 #include "ua_client_internal.h"
 #include "ua_connection_internal.h"
 #include "ua_types_encoding_binary.h"
-#include <open62541/types_generated_encoding_binary.h>
 
 #define STATUS_CODE_BAD_POINTER 0x01
 

+ 3 - 2
src/client/ua_client_connect.c

@@ -9,12 +9,13 @@
  *    Copyright 2018 (c) Kalycito Infotech Private Limited
  */
 
-#include "ua_client_internal.h"
 #include <open62541/transport_generated.h>
-#include <open62541/transport_generated_handling.h>
 #include <open62541/transport_generated_encoding_binary.h>
+#include <open62541/transport_generated_handling.h>
 #include <open62541/types_generated_encoding_binary.h>
 
+#include "ua_client_internal.h"
+
 /* Size are refered in bytes */
 #define UA_MINMESSAGESIZE                8192
 #define UA_SESSION_LOCALNONCELENGTH      32

+ 3 - 2
src/client/ua_client_connect_async.c

@@ -2,12 +2,13 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "ua_client_internal.h"
 #include <open62541/transport_generated.h>
-#include <open62541/transport_generated_handling.h>
 #include <open62541/transport_generated_encoding_binary.h>
+#include <open62541/transport_generated_handling.h>
 #include <open62541/types_generated_encoding_binary.h>
 
+#include "ua_client_internal.h"
+
 #define UA_MINMESSAGESIZE                8192
 #define UA_SESSION_LOCALNONCELENGTH      32
 #define MAX_DATA_SIZE 4096

+ 2 - 1
src/client/ua_client_highlevel.c

@@ -11,10 +11,11 @@
  *    Copyright 2018 (c) Peter Rustler, basyskom GmbH
  */
 
-#include "ua_client_internal.h"
 #include <open62541/client_highlevel.h>
 #include <open62541/client_highlevel_async.h>
 
+#include "ua_client_internal.h"
+
 UA_StatusCode
 UA_Client_NamespaceGetIndex(UA_Client *client, UA_String *namespaceUri,
                             UA_UInt16 *namespaceIndex) {

+ 2 - 2
src/client/ua_client_internal.h

@@ -18,10 +18,10 @@
 #include <open62541/client_highlevel.h>
 #include <open62541/client_subscriptions.h>
 
+#include "open62541_queue.h"
 #include "ua_securechannel.h"
-#include "ua_workqueue.h"
 #include "ua_timer.h"
-#include "open62541_queue.h"
+#include "ua_workqueue.h"
 
 _UA_BEGIN_DECLS
 

+ 2 - 1
src/client/ua_client_subscriptions.c

@@ -11,10 +11,11 @@
  *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
  */
 
-#include "ua_client_internal.h"
 #include <open62541/client_highlevel.h>
 #include <open62541/client_highlevel_async.h>
 
+#include "ua_client_internal.h"
+
 #ifdef UA_ENABLE_SUBSCRIPTIONS /* conditional compilation */
 
 /*****************/

+ 4 - 0
src/pubsub/ua_pubsub.c

@@ -16,6 +16,10 @@
 #include "ua_pubsub_ns0.h"
 #endif
 
+#ifdef UA_ENABLE_PUBSUB_DELTAFRAMES
+#include "ua_types_encoding_binary.h"
+#endif
+
 #define UA_MAX_STACKBUF 512 /* Max size of network messages on the stack */
 
 /* Forward declaration */

+ 2 - 1
src/pubsub/ua_pubsub.h

@@ -11,8 +11,9 @@
 #include <open62541/plugin/pubsub.h>
 #include <open62541/server.h>
 #include <open62541/server_pubsub.h>
-#include "ua_pubsub_networkmessage.h"
+
 #include "open62541_queue.h"
+#include "ua_pubsub_networkmessage.h"
 
 _UA_BEGIN_DECLS
 

+ 1 - 0
src/pubsub/ua_pubsub_manager.h

@@ -9,6 +9,7 @@
 #define UA_PUBSUB_MANAGER_H_
 
 #include <open62541/server_pubsub.h>
+
 #include "ua_pubsub.h"
 
 _UA_BEGIN_DECLS

+ 2 - 1
src/pubsub/ua_pubsub_networkmessage_json.c

@@ -7,8 +7,9 @@
 
 #include <open62541/types.h>
 #include <open62541/types_generated_handling.h>
-#include "ua_types_encoding_json.h"
+
 #include "ua_pubsub_networkmessage.h"
+#include "ua_types_encoding_json.h"
 
 /* Json keys for dsm */
 const char * UA_DECODEKEY_MESSAGES = ("Messages");

+ 1 - 0
src/server/ua_discovery_manager.h

@@ -15,6 +15,7 @@
 #define UA_DISCOVERY_MANAGER_H_
 
 #include <open62541/server.h>
+
 #include "open62541_queue.h"
 
 _UA_BEGIN_DECLS

+ 0 - 0
src/server/ua_securechannel_manager.c


Some files were not shown because too many files changed in this diff