Browse Source

Move header files to a more unix-like structure

This commit drops the 'ua_' prefix and changes the public includes
to the form `#include <open62541/server.h>` instead of the old
`#include <ua_server.h>`
Julius Pfrommer 5 years ago
parent
commit
c9c818868f
100 changed files with 458 additions and 468 deletions
  1. 81 89
      CMakeLists.txt
  2. 4 2
      README.md
  3. 1 1
      arch/posix/ua_architecture_functions.c
  4. 1 1
      arch/posix/ua_clock.c
  5. 3 10
      arch/ua_architecture_functions.h
  6. 2 2
      arch/ua_network_tcp.c
  7. 3 3
      arch/ua_network_tcp.h
  8. 1 1
      arch/win32/ua_architecture_functions.c
  9. 1 1
      arch/win32/ua_clock.c
  10. 2 1
      deps/atoi.h
  11. 2 3
      deps/itoa.h
  12. 2 2
      deps/pcg_basic.h
  13. 18 18
      doc/CMakeLists.txt
  14. 1 1
      doc/internal.rst
  15. 2 3
      examples/access_control/client_access_control.c
  16. 4 5
      examples/access_control/server_access_control.c
  17. 4 4
      examples/client.c
  18. 5 4
      examples/client_async.c
  19. 3 5
      examples/client_connect_loop.c
  20. 3 3
      examples/client_connectivitycheck_loop.c
  21. 2 3
      examples/client_historical.c
  22. 3 3
      examples/client_subscription_loop.c
  23. 2 7
      examples/common.h
  24. 2 2
      examples/custom_datatype/client_types_custom.c
  25. 3 3
      examples/custom_datatype/server_types_custom.c
  26. 3 3
      examples/discovery/client_find_servers.c
  27. 2 2
      examples/discovery/server_lds.c
  28. 5 5
      examples/discovery/server_multicast.c
  29. 5 3
      examples/discovery/server_register.c
  30. 6 5
      examples/encryption/client_encryption.c
  31. 5 5
      examples/encryption/server_basic128rsa15.c
  32. 5 5
      examples/encryption/server_basic256sha256.c
  33. 14 11
      examples/nodeset/CMakeLists.txt
  34. 5 5
      examples/nodeset/server_nodeset.c
  35. 9 12
      examples/nodeset/server_testnodeset.c
  36. 4 4
      examples/pubsub/tutorial_pubsub_connection.c
  37. 5 5
      examples/pubsub/tutorial_pubsub_publish.c
  38. 10 8
      examples/pubsub/tutorial_pubsub_subscribe.c
  39. 4 8
      examples/server_ctt.c
  40. 3 3
      examples/server_inheritance.c
  41. 3 3
      examples/server_instantiation.c
  42. 3 3
      examples/server_mainloop.c
  43. 3 3
      examples/server_repeated_job.c
  44. 7 4
      examples/tutorial_client_events.c
  45. 3 3
      examples/tutorial_client_firststeps.c
  46. 3 3
      examples/tutorial_datatypes.c
  47. 3 3
      examples/tutorial_server_datasource.c
  48. 3 3
      examples/tutorial_server_events.c
  49. 3 3
      examples/tutorial_server_firststeps.c
  50. 8 8
      examples/tutorial_server_historicaldata.c
  51. 4 3
      examples/tutorial_server_method.c
  52. 4 4
      examples/tutorial_server_monitoreditems.c
  53. 3 3
      examples/tutorial_server_object.c
  54. 3 3
      examples/tutorial_server_variable.c
  55. 3 3
      examples/tutorial_server_variabletype.c
  56. 5 8
      include/ua_client.h
  57. 4 3
      include/ua_client_config.h
  58. 1 1
      include/ua_client_highlevel.h
  59. 2 1
      include/ua_client_highlevel_async.h
  60. 1 1
      include/ua_client_subscriptions.h
  61. 0 0
      include/open62541/config.h.in
  62. 1 1
      include/ua_constants.h
  63. 1 2
      include/ua_plugin_access_control.h
  64. 15 12
      include/ua_plugin_historydatabase.h
  65. 1 1
      include/ua_plugin_log.h
  66. 2 2
      include/ua_plugin_network.h
  67. 1 2
      include/ua_plugin_nodestore.h
  68. 2 2
      include/ua_plugin_pki.h
  69. 21 22
      include/ua_plugin_pubsub.h
  70. 3 4
      include/ua_plugin_securitypolicy.h
  71. 4 4
      include/ua_server.h
  72. 9 9
      include/ua_server_config.h
  73. 1 1
      include/ua_server_pubsub.h
  74. 3 3
      include/ua_types.h
  75. 5 7
      include/ua_util.h
  76. 0 0
      open62541.pc.in
  77. 2 1
      plugins/historydata/ua_historydatabase_default.c
  78. 2 3
      plugins/historydata/ua_historydatagathering_default.c
  79. 1 2
      plugins/historydata/ua_plugin_history_data_backend.h
  80. 0 2
      plugins/historydata/ua_plugin_history_data_gathering.h
  81. 29 0
      plugins/include/open62541/client_config_default.h
  82. 2 2
      plugins/ua_accesscontrol_default.h
  83. 2 3
      plugins/historydata/ua_historydatabase_default.h
  84. 1 1
      plugins/ua_log_stdout.h
  85. 1 1
      plugins/ua_nodestore_default.h
  86. 1 1
      plugins/ua_pki_certificate.h
  87. 1 1
      plugins/networking/ua_network_pubsub_ethernet.h
  88. 1 1
      plugins/networking/ua_network_pubsub_udp.h
  89. 1 1
      plugins/securityPolicies/ua_securitypolicies.h
  90. 4 21
      plugins/ua_config_default.h
  91. 9 6
      plugins/securityPolicies/ua_securitypolicy_basic128rsa15.c
  92. 10 7
      plugins/securityPolicies/ua_securitypolicy_basic256sha256.c
  93. 1 3
      plugins/securityPolicies/ua_securitypolicy_none.c
  94. 1 1
      plugins/ua_accesscontrol_default.c
  95. 7 8
      plugins/ua_config_default.c
  96. 2 2
      plugins/ua_log_stdout.c
  97. 1 1
      plugins/ua_nodestore_default.c
  98. 1 1
      plugins/ua_pki_certificate.c
  99. 0 0
      plugins/ua_pubsub_ethernet.c
  100. 0 0
      plugins/networking/ua_network_pubsub_udp.c

+ 81 - 89
CMakeLists.txt

@@ -301,24 +301,6 @@ if(UA_ENABLE_EXPERIMENTAL_HISTORIZING)
     endif()
 endif()
 
-if(UA_ENABLE_HISTORIZING)
-    set(historizing_exported_headers
-        ${PROJECT_SOURCE_DIR}/include/ua_plugin_historydatabase.h
-        ${PROJECT_SOURCE_DIR}/plugins/historydata/ua_plugin_history_data_backend.h
-        ${PROJECT_SOURCE_DIR}/plugins/historydata/ua_plugin_history_data_gathering.h
-        )
-    set(historizing_default_plugin_headers
-        ${PROJECT_SOURCE_DIR}/plugins/historydata/ua_historydatabackend_memory.h
-        ${PROJECT_SOURCE_DIR}/plugins/historydata/ua_historydatagathering_default.h
-        ${PROJECT_SOURCE_DIR}/plugins/historydata/ua_historydatabase_default.h
-        )
-    set(historizing_default_plugin_sources
-        ${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
-        )
-endif()
-
 option(UA_BUILD_FUZZING_CORPUS "Build the fuzzing corpus" OFF)
 mark_as_advanced(UA_BUILD_FUZZING_CORPUS)
 if(UA_BUILD_FUZZING_CORPUS)
@@ -411,12 +393,12 @@ if(NOT UA_COMPILE_AS_CXX AND (CMAKE_COMPILER_IS_GNUCC OR "x${CMAKE_C_COMPILER_ID
     if (NOT MINGW)
         if(UA_ENABLE_HARDENING)
             check_cc_flag("-fstack-protector-strong") # more performant stack protector, available since gcc 4.9
-            check_cc_flag("-fstack-clash-protection") # increased reliability of stack overflow detection, available since gcc 8    
+            check_cc_flag("-fstack-clash-protection") # increased reliability of stack overflow detection, available since gcc 8
             check_cc_flag_untested("-mcet -fcf-protection") # future use (control flow integrity protection)
         endif()
 
         # IPO requires too much memory for unit tests
-        # GCC docu recommends to compile all files with the same options, therefore ignore it completely 
+        # GCC docu recommends to compile all files with the same options, therefore ignore it completely
         if(NOT UA_BUILD_UNIT_TESTS)
             # needed to check if IPO is supported (check needs cmake > 3.9)
             if("${CMAKE_VERSION}" VERSION_GREATER 3.9)
@@ -429,7 +411,7 @@ if(NOT UA_COMPILE_AS_CXX AND (CMAKE_COMPILER_IS_GNUCC OR "x${CMAKE_C_COMPILER_ID
             endif()
         endif()
     endif()
-	
+
     if(UA_ENABLE_AMALGAMATION)
         add_definitions(-Wno-unused-function)
     endif()
@@ -454,7 +436,7 @@ if(NOT UA_COMPILE_AS_CXX AND (CMAKE_COMPILER_IS_GNUCC OR "x${CMAKE_C_COMPILER_ID
     endif()
 
     if(UA_ENABLE_HARDENING AND (CMAKE_BUILD_TYPE STREQUAL "Release") OR (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
-        check_cc_flag("-D_FORTIFY_SOURCE=2") # run-time buffer overflow detection (needs at least -O1)    
+        check_cc_flag("-D_FORTIFY_SOURCE=2") # run-time buffer overflow detection (needs at least -O1)
     endif()
 
     # Strip release builds
@@ -514,8 +496,8 @@ endif()
 #########################
 
 file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/src_generated")
-configure_file("include/ua_config.h.in" "${PROJECT_BINARY_DIR}/src_generated/ua_config.h")
-configure_file("include/open62541.pc.in" "${PROJECT_BINARY_DIR}/src_generated/open62541.pc" @ONLY)
+configure_file(include/open62541/config.h.in ${PROJECT_BINARY_DIR}/src_generated/open62541/config.h)
+configure_file(open62541.pc.in ${PROJECT_BINARY_DIR}/src_generated/open62541.pc @ONLY)
 
 if(UA_ENABLE_DISCOVERY_MULTICAST)
     set(MDNSD_LOGLEVEL 300 CACHE STRING "Level at which logs shall be reported" FORCE)
@@ -523,7 +505,7 @@ if(UA_ENABLE_DISCOVERY_MULTICAST)
 endif()
 
 set(exported_headers ${exported_headers}
-                     ${PROJECT_BINARY_DIR}/src_generated/ua_config.h
+                     ${PROJECT_BINARY_DIR}/src_generated/open62541/config.h
                      ${PROJECT_SOURCE_DIR}/arch/ua_architecture_base.h
                      ${ua_architecture_headers_beginning}
                      )
@@ -539,29 +521,29 @@ endif()
 set(exported_headers ${exported_headers}
                      ${PROJECT_SOURCE_DIR}/deps/ms_stdint.h
                      ${PROJECT_SOURCE_DIR}/arch/ua_architecture_definitions.h
-                     ${PROJECT_BINARY_DIR}/src_generated/ua_statuscodes.h
-                     ${PROJECT_BINARY_DIR}/src_generated/ua_nodeids.h
-                     ${PROJECT_SOURCE_DIR}/include/ua_constants.h
-                     ${PROJECT_SOURCE_DIR}/include/ua_types.h
-                     ${PROJECT_BINARY_DIR}/src_generated/ua_types_generated.h
-                     ${PROJECT_BINARY_DIR}/src_generated/ua_types_generated_handling.h
-                     ${PROJECT_SOURCE_DIR}/include/ua_util.h
-                     ${PROJECT_SOURCE_DIR}/include/ua_server.h
-                     ${historizing_exported_headers}
-                     ${PROJECT_SOURCE_DIR}/include/ua_plugin_log.h
-                     ${PROJECT_SOURCE_DIR}/include/ua_plugin_network.h
-                     ${PROJECT_SOURCE_DIR}/include/ua_plugin_access_control.h
-                     ${PROJECT_SOURCE_DIR}/include/ua_plugin_pki.h
-                     ${PROJECT_SOURCE_DIR}/include/ua_plugin_securitypolicy.h
-                     ${PROJECT_SOURCE_DIR}/include/ua_server_pubsub.h
-                     ${PROJECT_SOURCE_DIR}/include/ua_plugin_pubsub.h
-                     ${PROJECT_SOURCE_DIR}/include/ua_plugin_nodestore.h
-                     ${PROJECT_SOURCE_DIR}/include/ua_server_config.h
-                     ${PROJECT_SOURCE_DIR}/include/ua_client_config.h
-                     ${PROJECT_SOURCE_DIR}/include/ua_client.h
-                     ${PROJECT_SOURCE_DIR}/include/ua_client_highlevel.h
-                     ${PROJECT_SOURCE_DIR}/include/ua_client_subscriptions.h
-                     ${PROJECT_SOURCE_DIR}/include/ua_client_highlevel_async.h)
+                     ${PROJECT_BINARY_DIR}/src_generated/open62541/statuscodes.h
+                     ${PROJECT_BINARY_DIR}/src_generated/open62541/nodeids.h
+                     ${PROJECT_SOURCE_DIR}/include/open62541/constants.h
+                     ${PROJECT_SOURCE_DIR}/include/open62541/types.h
+                     ${PROJECT_BINARY_DIR}/src_generated/open62541/types_generated.h
+                     ${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
+                     ${PROJECT_SOURCE_DIR}/include/open62541/plugin/pki.h
+                     ${PROJECT_SOURCE_DIR}/include/open62541/plugin/securitypolicy.h
+                     ${PROJECT_SOURCE_DIR}/include/open62541/server_pubsub.h
+                     ${PROJECT_SOURCE_DIR}/include/open62541/plugin/pubsub.h
+                     ${PROJECT_SOURCE_DIR}/include/open62541/plugin/nodestore.h
+                     ${PROJECT_SOURCE_DIR}/include/open62541/server_config.h
+                     ${PROJECT_SOURCE_DIR}/include/open62541/client_config.h
+                     ${PROJECT_SOURCE_DIR}/include/open62541/client.h
+                     ${PROJECT_SOURCE_DIR}/include/open62541/client_highlevel.h
+                     ${PROJECT_SOURCE_DIR}/include/open62541/client_subscriptions.h
+                     ${PROJECT_SOURCE_DIR}/include/open62541/client_highlevel_async.h)
 
 set(internal_headers ${PROJECT_SOURCE_DIR}/deps/open62541_queue.h
                      ${PROJECT_SOURCE_DIR}/deps/ziptree.h
@@ -570,10 +552,10 @@ set(internal_headers ${PROJECT_SOURCE_DIR}/deps/open62541_queue.h
                      ${PROJECT_SOURCE_DIR}/deps/base64.h
                      ${PROJECT_SOURCE_DIR}/src/ua_util_internal.h
                      ${PROJECT_SOURCE_DIR}/src/ua_types_encoding_binary.h
-                     ${PROJECT_BINARY_DIR}/src_generated/ua_types_generated_encoding_binary.h
-                     ${PROJECT_BINARY_DIR}/src_generated/ua_transport_generated.h
-                     ${PROJECT_BINARY_DIR}/src_generated/ua_transport_generated_handling.h
-                     ${PROJECT_BINARY_DIR}/src_generated/ua_transport_generated_encoding_binary.h
+                     ${PROJECT_BINARY_DIR}/src_generated/open62541/types_generated_encoding_binary.h
+                     ${PROJECT_BINARY_DIR}/src_generated/open62541/transport_generated.h
+                     ${PROJECT_BINARY_DIR}/src_generated/open62541/transport_generated_handling.h
+                     ${PROJECT_BINARY_DIR}/src_generated/open62541/transport_generated_encoding_binary.h
                      ${PROJECT_SOURCE_DIR}/src/ua_connection_internal.h
                      ${PROJECT_SOURCE_DIR}/src/ua_securechannel.h
                      ${PROJECT_SOURCE_DIR}/src/ua_workqueue.h
@@ -593,9 +575,9 @@ set(internal_headers ${PROJECT_SOURCE_DIR}/deps/open62541_queue.h
 # TODO: make client optional
 set(lib_sources ${PROJECT_SOURCE_DIR}/src/ua_types.c
                 ${PROJECT_SOURCE_DIR}/src/ua_types_encoding_binary.c
-                ${PROJECT_BINARY_DIR}/src_generated/ua_types_generated.c
-                ${PROJECT_BINARY_DIR}/src_generated/ua_transport_generated.c
-                ${PROJECT_BINARY_DIR}/src_generated/ua_statuscodes.c
+                ${PROJECT_BINARY_DIR}/src_generated/open62541/types_generated.c
+                ${PROJECT_BINARY_DIR}/src_generated/open62541/transport_generated.c
+                ${PROJECT_BINARY_DIR}/src_generated/open62541/statuscodes.c
                 ${PROJECT_SOURCE_DIR}/src/ua_util.c
                 ${PROJECT_SOURCE_DIR}/src/ua_workqueue.c
                 ${PROJECT_SOURCE_DIR}/src/ua_timer.c
@@ -638,36 +620,47 @@ set(lib_sources ${PROJECT_SOURCE_DIR}/src/ua_types.c
                 ${PROJECT_SOURCE_DIR}/deps/pcg_basic.c
                 ${PROJECT_SOURCE_DIR}/deps/base64.c)
 
-set(default_plugin_headers ${PROJECT_SOURCE_DIR}/plugins/ua_accesscontrol_default.h
-                           ${historizing_default_plugin_headers}
-                           ${PROJECT_SOURCE_DIR}/plugins/ua_pki_certificate.h
-                           ${PROJECT_SOURCE_DIR}/plugins/ua_log_stdout.h
-                           ${PROJECT_SOURCE_DIR}/plugins/ua_nodestore_default.h
-                           ${PROJECT_SOURCE_DIR}/plugins/ua_config_default.h
-                           ${PROJECT_SOURCE_DIR}/plugins/securityPolicies/ua_securitypolicies.h
+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
+                           ${PROJECT_SOURCE_DIR}/plugins/include/open62541/server_config_default.h
+                           ${PROJECT_SOURCE_DIR}/plugins/include/open62541/client_config_default.h
+                           ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/securitypolicy_default.h
 )
 
 set(default_plugin_sources ${PROJECT_SOURCE_DIR}/plugins/ua_log_stdout.c
                            ${PROJECT_SOURCE_DIR}/plugins/ua_accesscontrol_default.c
-                           ${historizing_default_plugin_sources}
-                           ${PROJECT_SOURCE_DIR}/plugins/ua_pki_certificate.c
+                           ${PROJECT_SOURCE_DIR}/plugins/ua_pki_default.c
                            ${PROJECT_SOURCE_DIR}/plugins/ua_nodestore_default.c
                            ${PROJECT_SOURCE_DIR}/plugins/ua_config_default.c
                            ${PROJECT_SOURCE_DIR}/plugins/securityPolicies/ua_securitypolicy_none.c
 )
 
 if(UA_GENERATED_NAMESPACE_ZERO)
-    list(APPEND internal_headers ${PROJECT_BINARY_DIR}/src_generated/ua_namespace0.h)
-    list(APPEND lib_sources ${PROJECT_BINARY_DIR}/src_generated/ua_namespace0.c)
+    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)
 endif()
 
 list(APPEND default_plugin_headers
-    ${PROJECT_SOURCE_DIR}/plugins/securityPolicies/ua_securitypolicy_mbedtls_common.h)
+     ${PROJECT_SOURCE_DIR}/plugins/securityPolicies/ua_securitypolicy_mbedtls_common.h)
 list(APPEND default_plugin_sources
-    ${PROJECT_SOURCE_DIR}/plugins/securityPolicies/ua_securitypolicy_mbedtls_common.c
-    ${PROJECT_SOURCE_DIR}/plugins/securityPolicies/ua_securitypolicy_basic128rsa15.c
-    ${PROJECT_SOURCE_DIR}/plugins/securityPolicies/ua_securitypolicy_basic256.c
-    ${PROJECT_SOURCE_DIR}/plugins/securityPolicies/ua_securitypolicy_basic256sha256.c)
+     ${PROJECT_SOURCE_DIR}/plugins/securityPolicies/ua_securitypolicy_mbedtls_common.c
+     ${PROJECT_SOURCE_DIR}/plugins/securityPolicies/ua_securitypolicy_basic128rsa15.c
+     ${PROJECT_SOURCE_DIR}/plugins/securityPolicies/ua_securitypolicy_basic256.c
+     ${PROJECT_SOURCE_DIR}/plugins/securityPolicies/ua_securitypolicy_basic256sha256.c)
+
+if(UA_ENABLE_HISTORIZING)
+    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)
+endif()
 
 if(UA_ENABLE_DISCOVERY)
     list(INSERT internal_headers 13 ${PROJECT_SOURCE_DIR}/src/server/ua_discovery_manager.h)
@@ -675,11 +668,11 @@ if(UA_ENABLE_DISCOVERY)
 endif()
 
 if(UA_ENABLE_PUBSUB)
-    list(APPEND default_plugin_headers ${PROJECT_SOURCE_DIR}/plugins/networking/ua_network_pubsub_udp.h)
-    list(APPEND default_plugin_sources ${PROJECT_SOURCE_DIR}/plugins/networking/ua_network_pubsub_udp.c)
+    list(APPEND default_plugin_headers ${PROJECT_SOURCE_DIR}/plugins/ua_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_network_pubsub_ethernet.h)
-        list(APPEND default_plugin_sources ${PROJECT_SOURCE_DIR}/plugins/networking/ua_network_pubsub_ethernet.c)
+        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)
     endif()
 endif()
 
@@ -798,7 +791,7 @@ endif()
 # standard-defined data types
 ua_generate_datatypes(
     BUILTIN
-    NAME "ua_types"
+    NAME "types"
     TARGET_SUFFIX "types"
     NAMESPACE_IDX 0
     FILE_CSV "${UA_FILE_NODEIDS}"
@@ -809,7 +802,7 @@ ua_generate_datatypes(
 # transport data types
 ua_generate_datatypes(
     INTERNAL
-    NAME "ua_transport"
+    NAME "transport"
     TARGET_SUFFIX "transport"
     NAMESPACE_IDX 1
     FILE_CSV "${UA_FILE_NODEIDS}"
@@ -818,17 +811,17 @@ ua_generate_datatypes(
 )
 
 # statuscode explanation
-add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/src_generated/ua_statuscodes.h
-                          ${PROJECT_BINARY_DIR}/src_generated/ua_statuscodes.c
+add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/src_generated/open62541/statuscodes.h
+                          ${PROJECT_BINARY_DIR}/src_generated/open62541/statuscodes.c
         PRE_BUILD
         COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/tools/generate_statuscode_descriptions.py
-        ${UA_FILE_STATUSCODES} ${PROJECT_BINARY_DIR}/src_generated/ua_statuscodes
+        ${UA_FILE_STATUSCODES} ${PROJECT_BINARY_DIR}/src_generated/open62541/statuscodes
         DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tools/generate_statuscode_descriptions.py
                 ${UA_FILE_STATUSCODES})
 
 # Header containing defines for all NodeIds
 ua_generate_nodeid_header(
-    NAME "ua_nodeids"
+    NAME "nodeids"
     ID_PREFIX "NS0"
     TARGET_SUFFIX "ids-ns0"
     FILE_CSV "${UA_FILE_NODEIDS}"
@@ -837,9 +830,9 @@ ua_generate_nodeid_header(
 # we need a custom target to avoid that the generator is called concurrently and
 # thus overwriting files while the other thread is compiling
 add_custom_target(open62541-generator-statuscode DEPENDS
-        ${PROJECT_BINARY_DIR}/src_generated/ua_nodeids.h
-        ${PROJECT_BINARY_DIR}/src_generated/ua_statuscodes.h
-        ${PROJECT_BINARY_DIR}/src_generated/ua_statuscodes.c)
+        ${PROJECT_BINARY_DIR}/src_generated/open62541/nodeids.h
+        ${PROJECT_BINARY_DIR}/src_generated/open62541/statuscodes.h
+        ${PROJECT_BINARY_DIR}/src_generated/open62541/statuscodes.c)
 
 if (UA_ENABLE_AMALGAMATION)
     # single-file release
@@ -970,11 +963,11 @@ else()
 
     # Public includes
     include_directories_public(${ua_architecture_directories_to_include}
-                               "${PROJECT_BINARY_DIR}/src_generated"
-                               "${PROJECT_SOURCE_DIR}/deps"
                                "${PROJECT_SOURCE_DIR}/include"
-                               "${PROJECT_SOURCE_DIR}/plugins"
-                               "${PROJECT_SOURCE_DIR}/plugins/securityPolicies")
+                               "${PROJECT_SOURCE_DIR}/plugins/include"
+                               "${PROJECT_SOURCE_DIR}/deps"
+                               "${PROJECT_SOURCE_DIR}/src/pubsub"
+                               "${PROJECT_BINARY_DIR}/src_generated")
 
     # Private includes
     include_directories_private("${PROJECT_BINARY_DIR}"
@@ -1210,7 +1203,6 @@ if(NOT UA_ENABLE_AMALGAMATION)
     install(FILES ${internal_headers}
                   ${exported_headers}
                   ${default_plugin_headers}
-                  ${historizing_default_plugin_headers}
                   ${ua_architecture_headers}
             DESTINATION ${open62541_install_include_dir})
 else()

+ 4 - 2
README.md

@@ -127,7 +127,8 @@ Using the GCC compiler, just run ```gcc -std=c99 -DUA_ARCHITECTURE_POSIX <server
 and change `-DUA_ARCHITECTURE_POSIX` to `-DUA_ARCHITECTURE_WIN32`).
 ```c
 #include <signal.h>
-#include "open62541.h"
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
 
 UA_Boolean running = true;
 void signalHandler(int sig) {
@@ -171,7 +172,8 @@ int main(int argc, char** argv)
 ### Example Client Implementation
 ```c
 #include <stdio.h>
-#include "open62541.h"
+#include <open62541/client.h>
+#include <open62541/client_config_default.h>
 
 int main(int argc, char *argv[])
 {

+ 1 - 1
arch/posix/ua_architecture_functions.c

@@ -6,7 +6,7 @@
 
 #ifdef UA_ARCHITECTURE_POSIX
 
-#include "ua_types.h"
+#include <open62541/types.h>
 
 unsigned int UA_socket_set_blocking(UA_SOCKET sockfd){
   int opts = fcntl(sockfd, F_GETFL);

+ 1 - 1
arch/posix/ua_clock.c

@@ -8,7 +8,7 @@
 
 #ifdef UA_ARCHITECTURE_POSIX
 
-#include "ua_types.h"
+#include <open62541/types.h>
 #include <time.h>
 #include <sys/time.h>
 

+ 3 - 10
arch/ua_architecture_functions.h

@@ -12,11 +12,9 @@
 #ifndef PLUGINS_ARCH_UA_ARCHITECTURE_FUNCTIONS_H_
 #define PLUGINS_ARCH_UA_ARCHITECTURE_FUNCTIONS_H_
 
-#include "ua_config.h"
+#include <open62541/config.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+_UA_BEGIN_DECLS
 
 /*
  * Allocation functions
@@ -204,11 +202,6 @@ int UA_access(const char *pathname, int mode); //equivalent implementation of ht
 
 #include "ua_architecture_definitions.h"
 
-#ifdef __cplusplus
-}
-#endif
-
-
-
+_UA_END_DECLS
 
 #endif /* PLUGINS_ARCH_UA_ARCHITECTURE_FUNCTIONS_H_ */

+ 2 - 2
arch/ua_network_tcp.c

@@ -9,10 +9,10 @@
  */
 
 #define UA_INTERNAL
+#include <open62541/util.h>
+#include <open62541/plugin/log_stdout.h>
 #include "ua_network_tcp.h"
-#include "ua_log_stdout.h"
 #include "open62541_queue.h"
-#include "ua_util.h"
 
 #include <string.h> // memset
 

+ 3 - 3
arch/ua_network_tcp.h

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

+ 1 - 1
arch/win32/ua_architecture_functions.c

@@ -6,7 +6,7 @@
 
 #ifdef UA_ARCHITECTURE_WIN32
 
-#include "ua_types.h"
+#include <open62541/types.h>
 
 unsigned int UA_socket_set_blocking(UA_SOCKET sockfd){
   u_long iMode = 0;

+ 1 - 1
arch/win32/ua_clock.c

@@ -12,7 +12,7 @@
 # define _BSD_SOURCE
 #endif
 
-#include "ua_types.h"
+#include <open62541/types.h>
 #include <time.h>
 /* Backup definition of SLIST_ENTRY on mingw winnt.h */
 # ifdef SLIST_ENTRY

+ 2 - 1
deps/atoi.h

@@ -5,7 +5,8 @@
 extern "C" {
 #endif
 
-#include "ua_types.h"
+#include <open62541/types.h>
+
 UA_StatusCode atoiUnsigned(const char *s, size_t size, UA_UInt64 *result);
 UA_StatusCode atoiSigned(const char *s, size_t size, UA_Int64 *result);
     

+ 2 - 3
deps/itoa.h

@@ -18,7 +18,6 @@
  * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-
 #ifndef ITOA_H
 #define ITOA_H
 
@@ -26,8 +25,8 @@
 extern "C" {
 #endif
     
-#include "ua_types.h"
-    
+#include <open62541/types.h>
+
 UA_UInt16 itoaUnsigned(UA_UInt64 value, char* buffer, UA_Byte base);
 UA_UInt16 itoaSigned(UA_Int64 value, char* buffer);
 

+ 2 - 2
deps/pcg_basic.h

@@ -24,12 +24,12 @@
 #ifndef PCG_BASIC_H_
 #define PCG_BASIC_H_
 
+#include <open62541/config.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include "ua_config.h"
-
 typedef struct pcg_state_setseq_64 {
     uint64_t state;  /* RNG state.  All values are possible. */
     uint64_t inc;    /* Controls which RNG sequence (stream) is selected. Must

+ 18 - 18
doc/CMakeLists.txt

@@ -17,23 +17,23 @@ function(generate_rst in out)
 endfunction()
 
 # Doc from headers
-generate_rst(${PROJECT_SOURCE_DIR}/include/ua_types.h ${DOC_SRC_DIR}/types.rst)
-generate_rst(${PROJECT_SOURCE_DIR}/include/ua_constants.h ${DOC_SRC_DIR}/constants.rst)
-generate_rst(${PROJECT_BINARY_DIR}/src_generated/ua_statuscodes.h ${DOC_SRC_DIR}/statuscodes.rst)
-generate_rst(${PROJECT_BINARY_DIR}/src_generated/ua_types_generated.h ${DOC_SRC_DIR}/types_generated.rst)
-generate_rst(${PROJECT_SOURCE_DIR}/include/ua_server_config.h ${DOC_SRC_DIR}/server_config.rst)
-generate_rst(${PROJECT_SOURCE_DIR}/include/ua_server.h ${DOC_SRC_DIR}/server.rst)
-generate_rst(${PROJECT_SOURCE_DIR}/include/ua_client_config.h ${DOC_SRC_DIR}/client_config.rst)
-generate_rst(${PROJECT_SOURCE_DIR}/include/ua_client_subscriptions.h ${DOC_SRC_DIR}/client_subscriptions.rst)
-generate_rst(${PROJECT_SOURCE_DIR}/include/ua_client.h ${DOC_SRC_DIR}/client.rst)
-generate_rst(${PROJECT_SOURCE_DIR}/include/ua_client_highlevel.h ${DOC_SRC_DIR}/client_highlevel.rst)
-generate_rst(${PROJECT_SOURCE_DIR}/include/ua_plugin_log.h ${DOC_SRC_DIR}/plugin_log.rst)
-generate_rst(${PROJECT_SOURCE_DIR}/include/ua_plugin_network.h ${DOC_SRC_DIR}/plugin_network.rst)
-generate_rst(${PROJECT_SOURCE_DIR}/include/ua_plugin_access_control.h ${DOC_SRC_DIR}/plugin_access_control.rst)
+generate_rst(${PROJECT_SOURCE_DIR}/include/open62541/types.h ${DOC_SRC_DIR}/types.rst)
+generate_rst(${PROJECT_SOURCE_DIR}/include/open62541/constants.h ${DOC_SRC_DIR}/constants.rst)
+generate_rst(${PROJECT_BINARY_DIR}/src_generated/open62541/statuscodes.h ${DOC_SRC_DIR}/statuscodes.rst)
+generate_rst(${PROJECT_BINARY_DIR}/src_generated/open62541/types_generated.h ${DOC_SRC_DIR}/types_generated.rst)
+generate_rst(${PROJECT_SOURCE_DIR}/include/open62541/server_config.h ${DOC_SRC_DIR}/server_config.rst)
+generate_rst(${PROJECT_SOURCE_DIR}/include/open62541/server.h ${DOC_SRC_DIR}/server.rst)
+generate_rst(${PROJECT_SOURCE_DIR}/include/open62541/client_config.h ${DOC_SRC_DIR}/client_config.rst)
+generate_rst(${PROJECT_SOURCE_DIR}/include/open62541/client_subscriptions.h ${DOC_SRC_DIR}/client_subscriptions.rst)
+generate_rst(${PROJECT_SOURCE_DIR}/include/open62541/client.h ${DOC_SRC_DIR}/client.rst)
+generate_rst(${PROJECT_SOURCE_DIR}/include/open62541/client_highlevel.h ${DOC_SRC_DIR}/client_highlevel.rst)
+generate_rst(${PROJECT_SOURCE_DIR}/include/open62541/plugin/log.h ${DOC_SRC_DIR}/plugin_log.rst)
+generate_rst(${PROJECT_SOURCE_DIR}/include/open62541/plugin/network.h ${DOC_SRC_DIR}/plugin_network.rst)
+generate_rst(${PROJECT_SOURCE_DIR}/include/open62541/plugin/accesscontrol.h ${DOC_SRC_DIR}/plugin_accesscontrol.rst)
 generate_rst(${PROJECT_SOURCE_DIR}/src/server/ua_services.h ${DOC_SRC_DIR}/services.rst)
-generate_rst(${PROJECT_SOURCE_DIR}/include/ua_plugin_nodestore.h ${DOC_SRC_DIR}/nodestore.rst)
-generate_rst(${PROJECT_SOURCE_DIR}/include/ua_plugin_pubsub.h ${DOC_SRC_DIR}/plugin_pubsub_connection.rst)
-generate_rst(${PROJECT_SOURCE_DIR}/include/ua_server_pubsub.h ${DOC_SRC_DIR}/pubsub.rst)
+generate_rst(${PROJECT_SOURCE_DIR}/include/open62541/plugin/nodestore.h ${DOC_SRC_DIR}/nodestore.rst)
+generate_rst(${PROJECT_SOURCE_DIR}/include/open62541/plugin/pubsub.h ${DOC_SRC_DIR}/plugin_pubsub_connection.rst)
+generate_rst(${PROJECT_SOURCE_DIR}/include/open62541/server_pubsub.h ${DOC_SRC_DIR}/pubsub.rst)
 
 # Doc from tutorial code
 generate_rst(${PROJECT_SOURCE_DIR}/examples/tutorial_datatypes.c ${DOC_SRC_DIR}/tutorial_datatypes.rst)
@@ -56,7 +56,7 @@ add_custom_target(doc_latex ${SPHINX_EXECUTABLE}
           ${DOC_SRC_DIR}/client.rst ${DOC_SRC_DIR}/client_subscriptions.rst
           ${DOC_SRC_DIR}/client_highlevel.rst ${DOC_SRC_DIR}/client_config.rst
           ${DOC_SRC_DIR}/plugin_log.rst ${DOC_SRC_DIR}/plugin_network.rst
-          ${DOC_SRC_DIR}/services.rst ${DOC_SRC_DIR}/plugin_access_control.rst
+          ${DOC_SRC_DIR}/services.rst ${DOC_SRC_DIR}/plugin_accesscontrol.rst
           ${DOC_SRC_DIR}/nodestore.rst
           ${DOC_SRC_DIR}/tutorials.rst
           ${DOC_SRC_DIR}/tutorial_datatypes.rst
@@ -91,7 +91,7 @@ add_custom_target(doc ${SPHINX_EXECUTABLE}
           ${DOC_SRC_DIR}/client.rst ${DOC_SRC_DIR}/client_subscriptions.rst
           ${DOC_SRC_DIR}/client_highlevel.rst ${DOC_SRC_DIR}/client_config.rst
           ${DOC_SRC_DIR}/plugin_log.rst ${DOC_SRC_DIR}/plugin_network.rst
-          ${DOC_SRC_DIR}/services.rst ${DOC_SRC_DIR}/plugin_access_control.rst
+          ${DOC_SRC_DIR}/services.rst ${DOC_SRC_DIR}/plugin_accesscontrol.rst
           ${DOC_SRC_DIR}/nodestore.rst
           ${DOC_SRC_DIR}/tutorials.rst
           ${DOC_SRC_DIR}/tutorial_datatypes.rst

+ 1 - 1
doc/internal.rst

@@ -5,7 +5,7 @@ Internals
 
    statuscodes
    plugin_network
-   plugin_access_control
+   plugin_accesscontrol
    plugin_log
    plugin_pubsub_connection
    pubsub

+ 2 - 3
examples/access_control/client_access_control.c

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

+ 4 - 5
examples/access_control/server_access_control.c

@@ -1,11 +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 <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_plugin_access_control.h>
-#include <ua_accesscontrol_default.h>
-#include <ua_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>

+ 4 - 4
examples/client.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 <ua_client_subscriptions.h>
-#include <ua_client_highlevel.h>
-#include <ua_config_default.h>
-#include <ua_log_stdout.h>
+#include <open62541/client_subscriptions.h>
+#include <open62541/client_highlevel.h>
+#include <open62541/client_config_default.h>
+#include <open62541/plugin/log_stdout.h>
 
 #include <stdlib.h>
 

+ 5 - 4
examples/client_async.c

@@ -1,10 +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 <ua_config_default.h>
-#include <ua_client_subscriptions.h>
-#include <ua_log_stdout.h>
-#include <ua_client_highlevel_async.h>
+#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/plugin/log_stdout.h>
 
 #include <stdlib.h>
 

+ 3 - 5
examples/client_connect_loop.c

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

+ 3 - 3
examples/client_connectivitycheck_loop.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 <ua_client.h>
-#include <ua_config_default.h>
-#include <ua_log_stdout.h>
+#include <open62541/client.h>
+#include <open62541/client_config_default.h>
+#include <open62541/plugin/log_stdout.h>
 
 #include <signal.h>
 #include <stdlib.h>

+ 2 - 3
examples/client_historical.c

@@ -1,9 +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 <ua_client_highlevel.h>
-#include <ua_client.h>
-#include <ua_config_default.h>
+#include <open62541/client_highlevel.h>
+#include <open62541/client_config_default.h>
 
 #include <stdio.h>
 #include <stdlib.h>

+ 3 - 3
examples/client_subscription_loop.c

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

+ 2 - 7
examples/common.h

@@ -1,13 +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. */
 
-
-#ifdef UA_ENABLE_AMALGAMATION
-# include <open62541.h>
-#else
-# include "ua_types.h"
-# include "ua_types_generated_handling.h"
-#endif
+# include <open62541/types.h>
+# include <open62541/types_generated_handling.h>
 
 /* loadFile parses the certificate file.
  *

+ 2 - 2
examples/custom_datatype/client_types_custom.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 <ua_client_highlevel.h>
-#include <ua_config_default.h>
+#include <open62541/client_highlevel.h>
+#include <open62541/client_config_default.h>
 #include "custom_datatype.h"
 
 #include <stdlib.h>

+ 3 - 3
examples/custom_datatype/server_types_custom.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 <ua_server.h>
-#include <ua_log_stdout.h>
-#include <ua_config_default.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
+#include <open62541/plugin/log_stdout.h>
 #include "custom_datatype.h"
 
 #include <signal.h>

+ 3 - 3
examples/discovery/client_find_servers.c

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

+ 2 - 2
examples/discovery/server_lds.c

@@ -6,8 +6,8 @@
  * find servers service to get all registered servers (see client_find_servers.c).
  */
 
-#include <ua_server.h>
-#include <ua_config_default.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
 
 #include <signal.h>
 #include <stdlib.h>

+ 5 - 5
examples/discovery/server_multicast.c

@@ -8,11 +8,11 @@
  * (i.e., LDS-ME).
  */
 
-#include <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_types.h>
-#include <ua_log_stdout.h>
-#include <ua_securitypolicies.h>
+#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 <signal.h>
 #include <stdlib.h>

+ 5 - 3
examples/discovery/server_register.c

@@ -5,9 +5,11 @@
  * Before shutdown it has to unregister itself.
  */
 
-#include <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_log_stdout.h>
+#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 <signal.h>
 #include <stdlib.h>

+ 6 - 5
examples/encryption/client_encryption.c

@@ -1,11 +1,12 @@
 /* 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 <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_log_stdout.h>
-#include <ua_securitypolicies.h>
-#include <ua_client_highlevel.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
+#include <open62541/client_config_default.h>
+#include <open62541/plugin/log_stdout.h>
+#include <open62541/plugin/securitypolicy.h>
+#include <open62541/client_highlevel.h>
 #include "common.h"
 
 #include <stdlib.h>

+ 5 - 5
examples/encryption/server_basic128rsa15.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 <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_log_stdout.h>
-#include <ua_securitypolicies.h>
-#include <ua_client_highlevel.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
+#include <open62541/plugin/log_stdout.h>
+#include <open62541/plugin/securitypolicy.h>
+#include <open62541/client_highlevel.h>
 #include "common.h"
 
 #include <signal.h>

+ 5 - 5
examples/encryption/server_basic256sha256.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 <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_log_stdout.h>
-#include <ua_securitypolicies.h>
-#include <ua_client_highlevel.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
+#include <open62541/plugin/log_stdout.h>
+#include <open62541/plugin/securitypolicy.h>
+#include <open62541/client_highlevel.h>
 #include "common.h"
 
 #include <signal.h>

+ 14 - 11
examples/nodeset/CMakeLists.txt

@@ -38,9 +38,11 @@ ua_generate_nodeid_header(
     FILE_CSV "${FILE_CSV_DIRPREFIX}/server_nodeset.csv"
 )
 
-add_example(server_nodeset server_nodeset.c ${PROJECT_BINARY_DIR}/src_generated/ua_namespace_example.c ${PROJECT_BINARY_DIR}/src_generated/example_nodeids.h)
+add_example(server_nodeset server_nodeset.c
+  ${PROJECT_BINARY_DIR}/src_generated/open62541/ua_namespace_example.c
+  ${PROJECT_BINARY_DIR}/src_generated/open62541/example_nodeids.h)
 if(UA_COMPILE_AS_CXX)
-    set_source_files_properties(${PROJECT_BINARY_DIR}/src_generated/ua_namespace_example.c PROPERTIES LANGUAGE CXX)
+  set_source_files_properties(${PROJECT_BINARY_DIR}/src_generated/open62541/namespace_example.c PROPERTIES LANGUAGE CXX)
 endif()
 
 if(UA_NAMESPACE_ZERO STREQUAL "FULL")
@@ -53,8 +55,8 @@ if(UA_NAMESPACE_ZERO STREQUAL "FULL")
         INTERNAL
     )
     add_example(server_testnodeset server_testnodeset.c 
-        ${PROJECT_BINARY_DIR}/src_generated/ua_namespace_testnodeset.c
-        ${PROJECT_BINARY_DIR}/src_generated/ua_types_testnodeset_generated.c)
+        ${PROJECT_BINARY_DIR}/src_generated/open62541/ua_namespace_testnodeset.c
+        ${PROJECT_BINARY_DIR}/src_generated/open62541/types_testnodeset_generated.c)
     add_dependencies(server_testnodeset open62541-generator-ns-testnodeset)
 endif()
 
@@ -99,9 +101,9 @@ if(UA_NAMESPACE_ZERO STREQUAL "FULL")
     )
 
     add_example(server_nodeset_plcopen server_nodeset_plcopen.c
-                ${PROJECT_BINARY_DIR}/src_generated/ua_types_di_generated.c
-                ${PROJECT_BINARY_DIR}/src_generated/ua_namespace_di.c
-                ${PROJECT_BINARY_DIR}/src_generated/ua_namespace_plc.c)
+                ${PROJECT_BINARY_DIR}/src_generated/open62541/ua_types_di_generated.c
+                ${PROJECT_BINARY_DIR}/src_generated/open62541/ua_namespace_di.c
+                ${PROJECT_BINARY_DIR}/src_generated/open62541/ua_namespace_plc.c)
     add_dependencies(server_nodeset_plcopen open62541-generator-ns-plc)
     
 
@@ -124,10 +126,11 @@ if(UA_NAMESPACE_ZERO STREQUAL "FULL")
     )
 
     add_example(server_nodeset_powerlink server_nodeset_powerlink.c
-                ${PROJECT_BINARY_DIR}/src_generated/ua_types_di_generated.c
-                ${PROJECT_BINARY_DIR}/src_generated/ua_types_powerlink_generated.c
-                ${PROJECT_BINARY_DIR}/src_generated/ua_namespace_di.c
-                ${PROJECT_BINARY_DIR}/src_generated/ua_namespace_powerlink.c)
+                ${PROJECT_BINARY_DIR}/src_generated/open62541/ua_types_di_generated.c
+                ${PROJECT_BINARY_DIR}/src_generated/open62541/ua_types_powerlink_generated.c
+                ${PROJECT_BINARY_DIR}/src_generated/open62541/ua_namespace_di.c
+                ${PROJECT_BINARY_DIR}/src_generated/open62541/ua_namespace_powerlink.c)
     add_dependencies(server_nodeset_powerlink open62541-generator-ns-powerlink)
+    
 
 endif()

+ 5 - 5
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 <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_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 "ua_namespace_example.h"
-#include "example_nodeids.h"
+#include "open62541/ua_namespace_example.h"
+#include "open62541/example_nodeids.h"
 
 UA_Boolean running = true;
 

+ 9 - 12
examples/nodeset/server_testnodeset.c

@@ -2,22 +2,22 @@
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
  */
 
-#include <ua_client_highlevel.h>
-#include <ua_config_default.h>
-#include <ua_log_stdout.h>
-#include <ua_server.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
+#include <open62541/client_highlevel.h>
+#include <open62541/client_config_default.h>
+#include <open62541/plugin/log_stdout.h>
 
 #include <signal.h>
 #include <stdlib.h>
 
-#include "ua_namespace_testnodeset.h"
+#include "open62541/ua_namespace_testnodeset.h"
 
 UA_Boolean running = true;
 
 UA_DataTypeArray customTypesArray = { NULL, UA_TYPES_TESTNODESET_COUNT, UA_TYPES_TESTNODESET};
 
-static void stopHandler(int sign)
-{
+static void stopHandler(int sign) {
     UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "received ctrl-c");
     running = false;
 }
@@ -32,15 +32,12 @@ int main(int argc, char **argv)
 
     UA_StatusCode retval;
     /* create nodes from nodeset */
-    if (ua_namespace_testnodeset(server) != UA_STATUSCODE_GOOD)
-    {
+    if(ua_namespace_testnodeset(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;
-    }
-    else
-    {
+    } else {
         UA_Variant out;
         UA_Variant_init(&out);
         UA_Server_readValue(server, UA_NODEID_NUMERIC(2, 10002), &out);

+ 4 - 4
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 <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_log_stdout.h>
-#include <ua_network_pubsub_udp.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
+#include <open62541/plugin/log_stdout.h>
+#include <open62541/plugin/pubsub_udp.h>
 
 #include <signal.h>
 #include <stdlib.h>

+ 5 - 5
examples/pubsub/tutorial_pubsub_publish.c

@@ -24,11 +24,11 @@
  * ``tutorial_pubsub_connection.c``.
  */
 
-#include <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_log_stdout.h>
-#include <ua_network_pubsub_udp.h>
-#include <ua_network_pubsub_ethernet.h>
+#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 <signal.h>
 

+ 10 - 8
examples/pubsub/tutorial_pubsub_subscribe.c

@@ -7,18 +7,20 @@
  * 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.
-*/
+ * 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 "src_generated/open62541/types_generated.h"
 #include "ua_pubsub_networkmessage.h"
-#include "ua_log_stdout.h"
-#include "ua_server.h"
-#include "ua_config_default.h"
 #include "ua_pubsub.h"
-#include "ua_network_pubsub_udp.h"
+
 #ifdef UA_ENABLE_PUBSUB_ETH_UADP
-#include "ua_network_pubsub_ethernet.h"
+#include <open62541/plugin/pubsub_ethernet.h>
 #endif
-#include "src_generated/ua_types_generated.h"
 
 #include <stdio.h>
 #include <signal.h>

+ 4 - 8
examples/server_ctt.c

@@ -5,15 +5,11 @@
 #define _CRT_SECURE_NO_WARNINGS /* disable fopen deprication warning in msvs */
 #endif
 
-#ifdef UA_ENABLE_AMALGAMATION
-# include <open62541.h>
-#else
-# include <ua_server.h>
-# include <ua_config_default.h>
-# include <ua_log_stdout.h>
-#endif
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
+#include <open62541/plugin/log_stdout.h>
 
-# include "common.h"
+#include "common.h"
 
 #include <signal.h>
 #include <stdlib.h>

+ 3 - 3
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 <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_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/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 <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_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/server_mainloop.c

@@ -3,9 +3,9 @@
  * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
  */
 
-#include <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_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/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 <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_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>

+ 7 - 4
examples/tutorial_client_events.c

@@ -1,10 +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 <ua_client_highlevel.h>
-#include <ua_config_default.h>
-#include <ua_log_stdout.h>
-#include <ua_client_subscriptions.h>
+#include <open62541/server.h>
+#include <open62541/client.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 <signal.h>
 

+ 3 - 3
examples/tutorial_client_firststeps.c

@@ -8,9 +8,9 @@
  * 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 <ua_client_highlevel.h>
-#include <ua_config_default.h>
-#include <ua_log_stdout.h>
+#include <open62541/client_highlevel.h>
+#include <open62541/client_config_default.h>
+#include <open62541/plugin/log_stdout.h>
 
 #include <stdlib.h>
 

+ 3 - 3
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 <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_log_stdout.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
+#include <open62541/plugin/log_stdout.h>
 
 #include <stdlib.h>
 

+ 3 - 3
examples/tutorial_server_datasource.c

@@ -25,9 +25,9 @@
  * new value arrives from the underlying process, we can just write into the
  * variable. */
 
-#include <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_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_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 <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_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_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 <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_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>

+ 8 - 8
examples/tutorial_server_historicaldata.c

@@ -4,14 +4,14 @@
  * Copyright 2019 (c) basysKom GmbH <opensource@basyskom.com> (Author: Peter Rustler)
  */
 
-#include <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_log_stdout.h>
-#include <ua_plugin_historydatabase.h>
-#include <ua_plugin_history_data_gathering.h>
-#include <ua_historydatagathering_default.h>
-#include <ua_historydatabase_default.h>
-#include <ua_historydatabackend_memory.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>

+ 4 - 3
examples/tutorial_server_method.c

@@ -30,9 +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 <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_log_stdout.h>
+#include <open62541/server.h>
+#include <open62541/client_config_default.h>
+#include <open62541/server_config_default.h>
+#include <open62541/plugin/log_stdout.h>
 
 #include <signal.h>
 #include <stdlib.h>

+ 4 - 4
examples/tutorial_server_monitoreditems.c

@@ -19,10 +19,10 @@
  * context pointer.
  */
 
-#include <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_log_stdout.h>
-#include <ua_client_subscriptions.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>

+ 3 - 3
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 <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_log_stdout.h>
+#include <open62541/server.h>
+#include <open62541/server_config_default.h>
+#include <open62541/plugin/log_stdout.h>
 
 #include <signal.h>
 

+ 3 - 3
examples/tutorial_server_variable.c

@@ -14,9 +14,9 @@
  * read only. See below for making the variable writable.
  */
 
-#include <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_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_server_variabletype.c

@@ -18,9 +18,9 @@
  * VariableTypeNode to the hierarchy of variable types.
  */
 
-#include <ua_server.h>
-#include <ua_config_default.h>
-#include <ua_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 - 8
include/ua_client.h

@@ -17,14 +17,11 @@
 #ifndef UA_CLIENT_H_
 #define UA_CLIENT_H_
 
-#include "ua_types.h"
-#include "ua_types_generated.h"
-#include "ua_types_generated_handling.h"
-#include "ua_plugin_securitypolicy.h"
-#include "ua_plugin_network.h"
-#include "ua_plugin_log.h"
-#include "ua_client_config.h"
-#include "ua_nodeids.h"
+#include <open62541/types.h>
+#include <open62541/nodeids.h>
+#include <open62541/client_config.h>
+#include <open62541/types_generated.h>
+#include <open62541/types_generated_handling.h>
 
 _UA_BEGIN_DECLS
 

+ 4 - 3
include/ua_client_config.h

@@ -9,9 +9,10 @@
 #ifndef UA_CLIENT_CONFIG_H
 #define UA_CLIENT_CONFIG_H
 
-#include "ua_config.h"
-#include "ua_plugin_securitypolicy.h"
-#include "ua_plugin_network.h"
+#include <open62541/config.h>
+#include <open62541/plugin/log.h>
+#include <open62541/plugin/network.h>
+#include <open62541/plugin/securitypolicy.h>
 
 _UA_BEGIN_DECLS
 

+ 1 - 1
include/ua_client_highlevel.h

@@ -15,7 +15,7 @@
 #ifndef UA_CLIENT_HIGHLEVEL_H_
 #define UA_CLIENT_HIGHLEVEL_H_
 
-#include "ua_client.h"
+#include <open62541/client.h>
 
 _UA_BEGIN_DECLS
 

+ 2 - 1
include/ua_client_highlevel_async.h

@@ -9,13 +9,14 @@
 #ifndef UA_CLIENT_HIGHLEVEL_ASYNC_H_
 #define UA_CLIENT_HIGHLEVEL_ASYNC_H_
 
-#include "ua_client.h"
+#include <open62541/client.h>
 
 _UA_BEGIN_DECLS
 
 /**
  * Raw Services
  * ^^^^^^^^^^^^ */
+
 typedef void (*UA_ClientAsyncReadCallback)(UA_Client *client, void *userdata,
                                            UA_UInt32 requestId, UA_ReadResponse *rr);
 static UA_INLINE UA_StatusCode

+ 1 - 1
include/ua_client_subscriptions.h

@@ -5,7 +5,7 @@
 #ifndef UA_CLIENT_SUBSCRIPTIONS_H_
 #define UA_CLIENT_SUBSCRIPTIONS_H_
 
-#include "ua_client.h"
+#include <open62541/client.h>
 
 _UA_BEGIN_DECLS
 

include/ua_config.h.in → include/open62541/config.h.in


+ 1 - 1
include/ua_constants.h

@@ -11,7 +11,7 @@
 #ifndef UA_CONSTANTS_H_
 #define UA_CONSTANTS_H_
 
-#include "ua_config.h"
+#include <open62541/config.h>
 
 _UA_BEGIN_DECLS
 

+ 1 - 2
include/ua_plugin_access_control.h

@@ -9,8 +9,7 @@
 #ifndef UA_PLUGIN_ACCESS_CONTROL_H_
 #define UA_PLUGIN_ACCESS_CONTROL_H_
 
-#include "ua_types.h"
-#include "ua_server.h"
+#include <open62541/server.h>
 
 _UA_BEGIN_DECLS
 

+ 15 - 12
include/ua_plugin_historydatabase.h

@@ -8,8 +8,7 @@
 #ifndef UA_PLUGIN_HISTORYDATABASE_H_
 #define UA_PLUGIN_HISTORYDATABASE_H_
 
-#include "ua_types.h"
-#include "ua_server.h"
+#include <open62541/server.h>
 
 _UA_BEGIN_DECLS
 
@@ -49,16 +48,20 @@ struct UA_HistoryDatabase {
      * hdbContext is the context of the UA_HistoryDatabase.
      * sessionId and sessionContext identify the session which set this value.
      * requestHeader, historyReadDetails, timestampsToReturn, releaseContinuationPoints
-     * nodesToReadSize and nodesToRead is the requested data from the client. It is from the request object.
-     * response the response to fill for the client. If the request is ok, there is no need to use it.
-     *          Use this to set status codes other than "Good" or other data.
-     *          You find an already allocated UA_HistoryReadResult array with an UA_HistoryData object
-     *          in the extension object in the size of nodesToReadSize. If you are not willing to return data,
-     *          you have to delete the results array, set it to NULL and set the resultsSize to 0.
-     *          Do not access historyData after that.
-     * historyData is a proper typed pointer array pointing in the UA_HistoryReadResult extension object.
-     *             use this to provide result data to the client.
-     *             Index in the array is the same as in nodesToRead and the UA_HistoryReadResult array. */
+     * nodesToReadSize and nodesToRead is the requested data from the client. It
+     *                 is from the request object.
+     * response the response to fill for the client. If the request is ok, there
+     *          is no need to use it. Use this to set status codes other than
+     *          "Good" or other data. You find an already allocated
+     *          UA_HistoryReadResult array with an UA_HistoryData object in the
+     *          extension object in the size of nodesToReadSize. If you are not
+     *          willing to return data, you have to delete the results array,
+     *          set it to NULL and set the resultsSize to 0. Do not access
+     *          historyData after that.
+     * historyData is a proper typed pointer array pointing in the
+     *             UA_HistoryReadResult extension object. use this to provide
+     *             result data to the client. Index in the array is the same as
+     *             in nodesToRead and the UA_HistoryReadResult array. */
     void
     (*readRaw)(UA_Server *server,
                void *hdbContext,

+ 1 - 1
include/ua_plugin_log.h

@@ -10,7 +10,7 @@
 #define UA_PLUGIN_LOG_H_
 
 #include <stdarg.h>
-#include "ua_config.h"
+#include <open62541/config.h>
 
 _UA_BEGIN_DECLS
 

+ 2 - 2
include/ua_plugin_network.h

@@ -9,8 +9,8 @@
 #ifndef UA_PLUGIN_NETWORK_H_
 #define UA_PLUGIN_NETWORK_H_
 
-#include "ua_server.h"
-#include "ua_plugin_log.h"
+#include <open62541/server.h>
+#include <open62541/plugin/log.h>
 
 _UA_BEGIN_DECLS
 

+ 1 - 2
include/ua_plugin_nodestore.h

@@ -17,8 +17,7 @@
  * not meant to be used directly by end users. Please use the public server API
  * / OPC UA services to interact with the information model. */
 
-#include "ua_types.h"
-#include "ua_server.h"
+#include <open62541/server.h>
 
 _UA_BEGIN_DECLS
 

+ 2 - 2
include/ua_plugin_pki.h

@@ -8,8 +8,8 @@
 #ifndef UA_PLUGIN_PKI_H_
 #define UA_PLUGIN_PKI_H_
 
-#include "ua_types.h"
-#include "ua_server.h"
+#include <open62541/types.h>
+#include <open62541/types_generated.h>
 
 _UA_BEGIN_DECLS
 

+ 21 - 22
include/ua_plugin_pubsub.h

@@ -8,7 +8,7 @@
 #ifndef UA_PLUGIN_PUBSUB_H_
 #define UA_PLUGIN_PUBSUB_H_
 
-#include "ua_server_pubsub.h"
+#include <open62541/server_pubsub.h>
 
 _UA_BEGIN_DECLS
 
@@ -20,15 +20,14 @@ _UA_BEGIN_DECLS
  * PubSub Connection Plugin API
  * ============================
  *
- * The PubSub Connection API is the interface between concrete network implementations and the internal pubsub
- * code.
+ * The PubSub Connection API is the interface between concrete network
+ * implementations and the internal pubsub code.
  *
- * The PubSub specification enables the creation of new connections on runtime. Wording:
- * 'Connection' -> OPC UA standard 'highlevel' perspective,
- * 'Channel' -> open62541 implementation 'lowlevel' perspective. A channel can be assigned with different
- * network implementations like UDP, MQTT, AMQP. The channel provides basis services
- * like send, regist, unregist, receive, close.
- */
+ * The PubSub specification enables the creation of new connections on runtime.
+ * Wording: 'Connection' -> OPC UA standard 'highlevel' perspective, 'Channel'
+ * -> open62541 implementation 'lowlevel' perspective. A channel can be assigned
+ * with different network implementations like UDP, MQTT, AMQP. The channel
+ * provides basis services like send, regist, unregist, receive, close. */
 
 typedef enum {
     UA_PUBSUB_CHANNEL_RDY,
@@ -76,13 +75,14 @@ struct UA_PubSubChannel {
 };
 
 /**
- * The UA_PubSubTransportLayer is used for the creation of new connections. Whenever on runtime a new
- * connection is request, the internal PubSub implementation call * the 'createPubSubChannel' function.
- * The 'transportProfileUri' contains the standard defined transport profile information
- * and is used to identify the type of connections which can be created by the
- * TransportLayer. The server config contains a list of UA_PubSubTransportLayer.
- * Take a look in the tutorial_pubsub_connection to get informations about the TransportLayer handling.
- */
+ * The UA_PubSubTransportLayer is used for the creation of new connections.
+ * Whenever on runtime a new connection is request, the internal PubSub
+ * implementation call * the 'createPubSubChannel' function. The
+ * 'transportProfileUri' contains the standard defined transport profile
+ * information and is used to identify the type of connections which can be
+ * created by the TransportLayer. The server config contains a list of
+ * UA_PubSubTransportLayer. Take a look in the tutorial_pubsub_connection to get
+ * informations about the TransportLayer handling. */
 
 typedef struct {
     UA_String transportProfileUri;
@@ -90,18 +90,17 @@ typedef struct {
 } UA_PubSubTransportLayer;
 
 /**
- * The UA_ServerConfig_addPubSubTransportLayer is used to add a transport
- * layer to the server configuration. The list memory is allocated and will be freed with
- * UA_PubSubManager_delete.
+ * The UA_ServerConfig_addPubSubTransportLayer is used to add a transport layer
+ * to the server configuration. The list memory is allocated and will be freed
+ * with UA_PubSubManager_delete.
  *
  * .. note:: If the UA_String transportProfileUri was dynamically allocated
  *           the memory has to be freed when no longer required.
  *
- * .. note:: This has to be done before the server is started with UA_Server_run.
- */
+ * .. note:: This has to be done before the server is started with UA_Server_run. */
 UA_StatusCode UA_EXPORT
 UA_ServerConfig_addPubSubTransportLayer(UA_ServerConfig *config,
-        UA_PubSubTransportLayer *pubsubTransportLayer);
+                                        UA_PubSubTransportLayer *pubsubTransportLayer);
 
 #endif /* UA_ENABLE_PUBSUB */
 

+ 3 - 4
include/ua_plugin_securitypolicy.h

@@ -10,10 +10,9 @@
 #ifndef UA_PLUGIN_SECURITYPOLICY_H_
 #define UA_PLUGIN_SECURITYPOLICY_H_
 
-#include "ua_types.h"
-#include "ua_types_generated.h"
-#include "ua_plugin_log.h"
-#include "ua_plugin_pki.h"
+#include <open62541/server.h>
+#include <open62541/plugin/log.h>
+#include <open62541/plugin/pki.h>
 
 _UA_BEGIN_DECLS
 

+ 4 - 4
include/ua_server.h

@@ -13,10 +13,10 @@
 #ifndef UA_SERVER_H_
 #define UA_SERVER_H_
 
-#include "ua_types.h"
-#include "ua_types_generated.h"
-#include "ua_types_generated_handling.h"
-#include "ua_nodeids.h"
+#include <open62541/types.h>
+#include <open62541/nodeids.h>
+#include <open62541/types_generated.h>
+#include <open62541/types_generated_handling.h>
 
 _UA_BEGIN_DECLS
 

+ 9 - 9
include/ua_server_config.h

@@ -11,20 +11,20 @@
 #ifndef UA_SERVER_CONFIG_H_
 #define UA_SERVER_CONFIG_H_
 
-#include "ua_server.h"
-#include "ua_plugin_log.h"
-#include "ua_plugin_network.h"
-#include "ua_plugin_access_control.h"
-#include "ua_plugin_pki.h"
-#include "ua_plugin_securitypolicy.h"
-#include "ua_plugin_nodestore.h"
+#include <open62541/server.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/securitypolicy.h>
 
 #ifdef UA_ENABLE_PUBSUB
-#include "ua_plugin_pubsub.h"
+#include <open62541/plugin/pubsub.h>
 #endif
 
 #ifdef UA_ENABLE_HISTORIZING
-#include "ua_plugin_historydatabase.h"
+#include <open62541/plugin/historydatabase.h>
 #endif
 
 _UA_BEGIN_DECLS

+ 1 - 1
include/ua_server_pubsub.h

@@ -8,7 +8,7 @@
 #ifndef UA_SERVER_PUBSUB_H
 #define UA_SERVER_PUBSUB_H
 
-#include "ua_server.h"
+#include <open62541/server.h>
 
 _UA_BEGIN_DECLS
 

+ 3 - 3
include/ua_types.h

@@ -16,9 +16,9 @@
 #ifndef UA_TYPES_H_
 #define UA_TYPES_H_
 
-#include "ua_config.h"
-#include "ua_constants.h"
-#include "ua_statuscodes.h"
+#include <open62541/config.h>
+#include <open62541/constants.h>
+#include <open62541/statuscodes.h>
 
 _UA_BEGIN_DECLS
 

+ 5 - 7
include/ua_util.h

@@ -5,20 +5,18 @@
  *    Copyright 2018 (c) Stefan Profanter, fortiss GmbH
  */
 
-
 #ifndef UA_HELPER_H_
 #define UA_HELPER_H_
 
-#include "ua_config.h"
-#include "ua_types.h"
+#include <open62541/types.h>
 
 _UA_BEGIN_DECLS
 
 /**
-* Endpoint URL Parser
-* -------------------
-* The endpoint URL parser is generally useful for the implementation of network
-* layer plugins. */
+ * Endpoint URL Parser
+ * -------------------
+ * The endpoint URL parser is generally useful for the implementation of network
+ * layer plugins. */
 
 /* Split the given endpoint url into hostname, port and path. All arguments must
  * be non-NULL. EndpointUrls have the form "opc.tcp://hostname:port/path", port

include/open62541.pc.in → open62541.pc.in


+ 2 - 1
plugins/historydata/ua_historydatabase_default.c

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

+ 2 - 3
plugins/historydata/ua_historydatagathering_default.c

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

+ 1 - 2
plugins/historydata/ua_plugin_history_data_backend.h

@@ -8,8 +8,7 @@
 #ifndef UA_PLUGIN_HISTORY_DATA_BACKEND_H_
 #define UA_PLUGIN_HISTORY_DATA_BACKEND_H_
 
-#include "ua_types.h"
-#include "ua_server.h"
+#include <open62541/server.h>
 
 _UA_BEGIN_DECLS
 

+ 0 - 2
plugins/historydata/ua_plugin_history_data_gathering.h

@@ -8,8 +8,6 @@
 #ifndef UA_PLUGIN_HISTORY_DATA_GATHERING_H_
 #define UA_PLUGIN_HISTORY_DATA_GATHERING_H_
 
-#include "ua_types.h"
-#include "ua_server.h"
 #include "ua_plugin_history_data_backend.h"
 
 _UA_BEGIN_DECLS

+ 29 - 0
plugins/include/open62541/client_config_default.h

@@ -0,0 +1,29 @@
+/* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
+ * 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
+ *    Copyright 2018 (c) Mark Giraud, Fraunhofer IOSB
+ */
+
+#ifndef UA_CLIENT_CONFIG_DEFAULT_H_
+#define UA_CLIENT_CONFIG_DEFAULT_H_
+
+#include <open62541/client_config.h>
+
+_UA_BEGIN_DECLS
+
+UA_StatusCode UA_EXPORT
+UA_ClientConfig_setDefault(UA_ClientConfig *config);
+
+#ifdef UA_ENABLE_ENCRYPTION
+UA_StatusCode UA_EXPORT
+UA_ClientConfig_setDefaultEncryption(UA_ClientConfig *config,
+                                     UA_ByteString localCertificate, UA_ByteString privateKey,
+                                     const UA_ByteString *trustList, size_t trustListSize,
+                                     const UA_ByteString *revocationList, size_t revocationListSize);
+#endif
+
+_UA_END_DECLS
+
+#endif /* UA_CLIENT_CONFIG_DEFAULT_H_ */

+ 2 - 2
plugins/ua_accesscontrol_default.h

@@ -8,8 +8,8 @@
 #ifndef UA_ACCESSCONTROL_DEFAULT_H_
 #define UA_ACCESSCONTROL_DEFAULT_H_
 
-#include "ua_server.h"
-#include "ua_plugin_access_control.h"
+#include <open62541/server.h>
+#include <open62541/plugin/accesscontrol.h>
 
 _UA_BEGIN_DECLS
 

+ 2 - 3
plugins/historydata/ua_historydatabase_default.h

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

+ 1 - 1
plugins/ua_log_stdout.h

@@ -7,7 +7,7 @@
 #ifndef UA_LOG_STDOUT_H_
 #define UA_LOG_STDOUT_H_
 
-#include "ua_plugin_log.h"
+#include <open62541/plugin/log.h>
 
 _UA_BEGIN_DECLS
 

+ 1 - 1
plugins/ua_nodestore_default.h

@@ -9,7 +9,7 @@
 #ifndef UA_NODESTORE_DEFAULT_H_
 #define UA_NODESTORE_DEFAULT_H_
 
-#include "ua_plugin_nodestore.h"
+#include <open62541/plugin/nodestore.h>
 
 _UA_BEGIN_DECLS
 

+ 1 - 1
plugins/ua_pki_certificate.h

@@ -7,7 +7,7 @@
 #ifndef UA_PKI_CERTIFICATE_H_
 #define UA_PKI_CERTIFICATE_H_
 
-#include "ua_plugin_pki.h"
+#include <open62541/plugin/pki.h>
 
 _UA_BEGIN_DECLS
 

+ 1 - 1
plugins/networking/ua_network_pubsub_ethernet.h

@@ -7,7 +7,7 @@
 #ifndef UA_NETWORK_PUBSUB_ETHERNET_H_
 #define UA_NETWORK_PUBSUB_ETHERNET_H_
 
-#include "ua_plugin_pubsub.h"
+#include <open62541/plugin/pubsub.h>
 
 _UA_BEGIN_DECLS
 

+ 1 - 1
plugins/networking/ua_network_pubsub_udp.h

@@ -7,7 +7,7 @@
 #ifndef UA_NETWORK_UDPMC_H_
 #define UA_NETWORK_UDPMC_H_
 
-#include "ua_plugin_pubsub.h"
+#include <open62541/plugin/pubsub.h>
 
 _UA_BEGIN_DECLS
 

+ 1 - 1
plugins/securityPolicies/ua_securitypolicies.h

@@ -9,7 +9,7 @@
 #ifndef UA_SECURITYPOLICIES_H_
 #define UA_SECURITYPOLICIES_H_
 
-#include "ua_plugin_securitypolicy.h"
+#include <open62541/plugin/securitypolicy.h>
 
 _UA_BEGIN_DECLS
 

+ 4 - 21
plugins/ua_config_default.h

@@ -6,12 +6,10 @@
  *    Copyright 2018 (c) Mark Giraud, Fraunhofer IOSB
  */
 
-#ifndef UA_CONFIG_DEFAULT_H_
-#define UA_CONFIG_DEFAULT_H_
+#ifndef UA_SERVER_CONFIG_DEFAULT_H_
+#define UA_SERVER_CONFIG_DEFAULT_H_
 
-#include "ua_server.h"
-#include "ua_server_config.h"
-#include "ua_client.h"
+#include <open62541/server_config.h>
 
 _UA_BEGIN_DECLS
 
@@ -108,21 +106,6 @@ UA_ServerConfig_set_customHostname(UA_ServerConfig *config,
 UA_EXPORT void
 UA_ServerConfig_delete(UA_ServerConfig *config);
 
-/*************************/
-/* Default Client Config */
-/*************************/
-
-UA_StatusCode UA_EXPORT
-UA_ClientConfig_setDefault(UA_ClientConfig *config);
-
-#ifdef UA_ENABLE_ENCRYPTION
-UA_StatusCode UA_EXPORT
-UA_ClientConfig_setDefaultEncryption(UA_ClientConfig *config,
-                                     UA_ByteString localCertificate, UA_ByteString privateKey,
-                                     const UA_ByteString *trustList, size_t trustListSize,
-                                     const UA_ByteString *revocationList, size_t revocationListSize);
-#endif
-
 _UA_END_DECLS
 
-#endif /* UA_CONFIG_DEFAULT_H_ */
+#endif /* UA_SERVER_CONFIG_DEFAULT_H_ */

+ 9 - 6
plugins/securityPolicies/ua_securitypolicy_basic128rsa15.c

@@ -5,12 +5,15 @@
  *    Copyright 2018 (c) Mark Giraud, Fraunhofer IOSB
  */
 
-#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_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
 

+ 10 - 7
plugins/securityPolicies/ua_securitypolicy_basic256sha256.c

@@ -6,12 +6,15 @@
  *    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_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
 
@@ -251,7 +254,7 @@ sym_verify_sp_basic256sha256(const UA_SecurityPolicy *securityPolicy,
 
     Basic256Sha256_PolicyContext *pc =
         (Basic256Sha256_PolicyContext *)securityPolicy->policyContext;
-    
+
     unsigned char mac[UA_SHA256_LENGTH];
     mbedtls_hmac(&pc->sha256MdContext, &cc->remoteSymSigningKey, message, mac);
 

+ 1 - 3
plugins/securityPolicies/ua_securitypolicy_none.c

@@ -5,9 +5,7 @@
  *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
  */
 
-#include "ua_types.h"
-#include "ua_securitypolicies.h"
-#include "ua_types_generated_handling.h"
+#include <open62541/plugin/securitypolicy_default.h>
 
 static UA_StatusCode
 verify_none(const UA_SecurityPolicy *securityPolicy,

+ 1 - 1
plugins/ua_accesscontrol_default.c

@@ -5,7 +5,7 @@
  *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
  */
 
-#include "ua_accesscontrol_default.h"
+#include <open62541/plugin/accesscontrol_default.h>
 
 /* Example access control management. Anonymous and username / password login.
  * The access rights are maximally permissive. */

+ 7 - 8
plugins/ua_config_default.c

@@ -10,15 +10,14 @@
  *    Copyright 2018 (c) Fabian Arndt, Root-Core
  */
 
-#include "ua_config_default.h"
-#include "ua_client_config.h"
-#include "ua_log_stdout.h"
+#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/nodestore_default.h>
+#include <open62541/plugin/securitypolicy_default.h>
 #include "ua_network_tcp.h"
-#include "ua_accesscontrol_default.h"
-#include "ua_pki_certificate.h"
-#include "ua_nodestore_default.h"
-#include "ua_securitypolicies.h"
-#include "ua_plugin_securitypolicy.h"
 
 /* Struct initialization works across ANSI C/C99/C++ if it is done when the
  * variable is first declared. Assigning values to existing structs is

+ 2 - 2
plugins/ua_log_stdout.c

@@ -6,8 +6,8 @@
  */
 
 #include <stdio.h>
-#include "ua_log_stdout.h"
-#include "ua_types.h"
+#include <open62541/types.h>
+#include <open62541/plugin/log_stdout.h>
 
 #ifdef UA_ENABLE_MULTITHREADING
 #include <pthread.h>

+ 1 - 1
plugins/ua_nodestore_default.c

@@ -6,7 +6,7 @@
  *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
  */
 
-#include "ua_nodestore_default.h"
+#include <open62541/plugin/nodestore_default.h>
 #include "ziptree.h"
 
 #ifdef UA_ENABLE_MULTITHREADING

+ 1 - 1
plugins/ua_pki_certificate.c

@@ -4,7 +4,7 @@
  *    Copyright 2018 (c) Mark Giraud, Fraunhofer IOSB
  */
 
-#include "ua_pki_certificate.h"
+#include <open62541/plugin/pki_default.h>
 
 #ifdef UA_ENABLE_ENCRYPTION
 #include <mbedtls/x509.h>

plugins/networking/ua_network_pubsub_ethernet.c → plugins/ua_pubsub_ethernet.c


+ 0 - 0
plugins/networking/ua_network_pubsub_udp.c


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