Skip to content

Commit

Permalink
Merge 7b932b3 into 9e95f3d
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfr committed Mar 21, 2019
2 parents 9e95f3d + 7b932b3 commit 64df39d
Show file tree
Hide file tree
Showing 227 changed files with 1,330 additions and 1,284 deletions.
247 changes: 139 additions & 108 deletions CMakeLists.txt

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions README.md
Expand Up @@ -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) {
Expand Down Expand Up @@ -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[])
{
Expand Down
1 change: 0 additions & 1 deletion arch/posix/CMakeLists.txt
Expand Up @@ -30,7 +30,6 @@ if (${_index} GREATER -1 OR "${UA_ARCHITECTURE}" STREQUAL "posix")
endif()
endif()

ua_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
endif()


Expand Down
2 changes: 1 addition & 1 deletion arch/posix/ua_architecture_functions.c
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion arch/posix/ua_clock.c
Expand Up @@ -8,8 +8,10 @@

#ifdef UA_ARCHITECTURE_POSIX

#include "ua_types.h"
#include <open62541/types.h>

#include <time.h>

#include <sys/time.h>

#if defined(__APPLE__) || defined(__MACH__)
Expand Down
13 changes: 3 additions & 10 deletions arch/ua_architecture_functions.h
Expand Up @@ -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
Expand Down Expand Up @@ -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_ */
8 changes: 5 additions & 3 deletions arch/ua_network_tcp.c
Expand Up @@ -10,11 +10,13 @@

#define UA_INTERNAL
#include "ua_network_tcp.h"
#include "ua_log_stdout.h"

#include <open62541/plugin/log_stdout.h>
#include <open62541/util.h>

#include "open62541_queue.h"
#include "ua_util.h"

#include <string.h> // memset
#include <string.h> // memset

#ifndef MSG_NOSIGNAL
#define MSG_NOSIGNAL 0
Expand Down
6 changes: 3 additions & 3 deletions arch/ua_network_tcp.h
Expand Up @@ -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/client.h>
#include <open62541/plugin/log.h>
#include <open62541/server.h>

_UA_BEGIN_DECLS

Expand Down
2 changes: 1 addition & 1 deletion arch/win32/ua_architecture_functions.c
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion arch/win32/ua_clock.c
Expand Up @@ -12,7 +12,8 @@
# 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
Expand Down
3 changes: 2 additions & 1 deletion deps/atoi.h
Expand Up @@ -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);

Expand Down
7 changes: 3 additions & 4 deletions deps/itoa.h
Expand Up @@ -18,16 +18,15 @@
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/


#ifndef ITOA_H
#define ITOA_H

#ifdef __cplusplus
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);

Expand Down
4 changes: 2 additions & 2 deletions deps/pcg_basic.h
Expand Up @@ -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
Expand Down
36 changes: 18 additions & 18 deletions doc/CMakeLists.txt
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/internal.rst
Expand Up @@ -5,7 +5,7 @@ Internals

statuscodes
plugin_network
plugin_access_control
plugin_accesscontrol
plugin_log
plugin_pubsub_connection
pubsub
5 changes: 2 additions & 3 deletions examples/access_control/client_access_control.c
Expand Up @@ -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_config_default.h>
#include <open62541/client_highlevel.h>

#include <stdlib.h>

Expand Down
9 changes: 4 additions & 5 deletions 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/plugin/accesscontrol_default.h>
#include <open62541/plugin/log_stdout.h>
#include <open62541/server.h>
#include <open62541/server_config_default.h>

#include <signal.h>
#include <stdlib.h>
Expand Down
8 changes: 4 additions & 4 deletions 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_config_default.h>
#include <open62541/client_highlevel.h>
#include <open62541/client_subscriptions.h>
#include <open62541/plugin/log_stdout.h>

#include <stdlib.h>

Expand Down
9 changes: 5 additions & 4 deletions 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_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>

Expand Down
7 changes: 3 additions & 4 deletions examples/client_connect_loop.c
Expand Up @@ -10,10 +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_config_default.h>
#include <open62541/client_highlevel.h>
#include <open62541/plugin/log_stdout.h>

#include <signal.h>
#include <stdlib.h>
Expand Down
6 changes: 3 additions & 3 deletions 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>
Expand Down
5 changes: 2 additions & 3 deletions 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_config_default.h>
#include <open62541/client_highlevel.h>

#include <stdio.h>
#include <stdlib.h>
Expand Down
6 changes: 3 additions & 3 deletions examples/client_subscription_loop.c
Expand Up @@ -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_config_default.h>
#include <open62541/client_subscriptions.h>
#include <open62541/plugin/log_stdout.h>

#include <signal.h>
#include <stdlib.h>
Expand Down
9 changes: 2 additions & 7 deletions 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.
*
Expand Down
7 changes: 4 additions & 3 deletions 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 <ua_client_highlevel.h>
#include <ua_config_default.h>
#include "custom_datatype.h"
#include <open62541/client_config_default.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];
Expand Down

0 comments on commit 64df39d

Please sign in to comment.