Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ endif()
add_subdirectory(backends)

set(NODESETLOADER_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/PrintfLogger.c
${CMAKE_CURRENT_SOURCE_DIR}/src/InternalRefService.c
${CMAKE_CURRENT_SOURCE_DIR}/src/CharAllocator.c
${CMAKE_CURRENT_SOURCE_DIR}/src/AliasList.c
Expand Down Expand Up @@ -216,16 +215,11 @@ set(NODESETLOADER_DEPS_LIBS
CACHE INTERNAL "")

set(NODESETLOADER_PUBLIC_HEADERS
${PROJECT_SOURCE_DIR}/include/NodesetLoader/Extension.h
${PROJECT_SOURCE_DIR}/include/NodesetLoader/Logger.h
${PROJECT_SOURCE_DIR}/include/NodesetLoader/ReferenceService.h
${PROJECT_SOURCE_DIR}/include/NodesetLoader/arch.h
${PROJECT_SOURCE_DIR}/include/NodesetLoader/NodesetLoader.h
${NODESETLOADER_BACKEND_PUBLIC_HEADERS}
CACHE INTERNAL "")

set(NODESETLOADER_PRIVATE_HEADERS
${PROJECT_SOURCE_DIR}/src/InternalLogger.h
${PROJECT_SOURCE_DIR}/src/InternalRefService.h
${PROJECT_SOURCE_DIR}/src/CharAllocator.h
${PROJECT_SOURCE_DIR}/src/AliasList.h
Expand Down
8 changes: 0 additions & 8 deletions backends/open62541/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
set(NODESETLOADER_BACKEND_OPEN62541_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/customDataType.c
${CMAKE_CURRENT_SOURCE_DIR}/src/DataTypeImporter.c
${CMAKE_CURRENT_SOURCE_DIR}/src/ServerContext.c
${CMAKE_CURRENT_SOURCE_DIR}/src/RefServiceImpl.c
${CMAKE_CURRENT_SOURCE_DIR}/src/import.c
Expand All @@ -19,16 +17,10 @@ set(NODESETLOADER_BACKEND_OPEN62541_DEPS_LIBS "" PARENT_SCOPE)

set(NODESETLOADER_BACKEND_OPEN62541_PUBLIC_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/include/NodesetLoader/backendOpen62541.h
${CMAKE_CURRENT_SOURCE_DIR}/include/NodesetLoader/dataTypes.h
PARENT_SCOPE)

set(NODESETLOADER_BACKEND_OPEN62541_PRIVATE_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/src/DataTypeImporter.h
${CMAKE_CURRENT_SOURCE_DIR}/src/conversion.h
${CMAKE_CURRENT_SOURCE_DIR}/src/customDataType.h
${CMAKE_CURRENT_SOURCE_DIR}/src/padding.h
${CMAKE_CURRENT_SOURCE_DIR}/src/ServerContext.h
${CMAKE_CURRENT_SOURCE_DIR}/src/nodeset_base64.h
${CMAKE_CURRENT_SOURCE_DIR}/src/RefServiceImpl.h
PARENT_SCOPE)

Expand Down
15 changes: 11 additions & 4 deletions backends/open62541/examples/dataTypeImport.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <open62541/server_config_default.h>

#include <NodesetLoader/backendOpen62541.h>
#include <NodesetLoader/dataTypes.h>

#include <assert.h>
#include <signal.h>
Expand Down Expand Up @@ -35,9 +34,12 @@ void addPoint(UA_Server *server)

struct Point p1 = {1, 2, 3};

UA_ServerConfig *config;

UA_Variant var;
UA_Variant_init(&var);
UA_Variant_setScalar(&var, &p1, NodesetLoader_getCustomDataType(server, &attr.dataType));
UA_Variant_setScalar(&var, &p1,
UA_findDataTypeWithCustom(&attr.dataType, config->customDataTypes));
UA_Server_writeValue(server, UA_NODEID_NUMERIC(1, 1000), var);
}

Expand All @@ -64,9 +66,12 @@ void addStructWithArray(UA_Server *server)
s.valid = true;
s.size = 3;

UA_ServerConfig *config;

UA_Variant var;
UA_Variant_init(&var);
UA_Variant_setScalar(&var, &s, NodesetLoader_getCustomDataType(server, &attr.dataType));
UA_Variant_setScalar(&var, &s,
UA_findDataTypeWithCustom(&attr.dataType, config->customDataTypes));

UA_Server_writeValue(server, UA_NODEID_NUMERIC(1, 1001), var);
}
Expand Down Expand Up @@ -102,8 +107,10 @@ void addStructWithPointArray(UA_Server *server)
UA_Variant var;
UA_Variant_init(&var);

UA_ServerConfig *config;

UA_Variant_setScalar(&var, &structWithPointData,
NodesetLoader_getCustomDataType(server, &attr.dataType));
UA_findDataTypeWithCustom(&attr.dataType, config->customDataTypes));

UA_StatusCode retval =
UA_Server_writeValue(server, UA_NODEID_NUMERIC(1, 1002), var);
Expand Down
1 change: 0 additions & 1 deletion backends/open62541/examples/iterate.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <open62541/util.h>

#include <NodesetLoader/backendOpen62541.h>
#include <NodesetLoader/dataTypes.h>

#include <signal.h>
#include <stdlib.h>
Expand Down
1 change: 0 additions & 1 deletion backends/open62541/examples/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <open62541/server_config_default.h>

#include <NodesetLoader/backendOpen62541.h>
#include <NodesetLoader/dataTypes.h>

#include <signal.h>
#include <stdlib.h>
Expand Down
21 changes: 3 additions & 18 deletions backends/open62541/include/NodesetLoader/backendOpen62541.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,17 @@
#define __NODESETLOADER_BACKEND_OPEN62541_H__

#include <open62541/server.h>
#include "NodesetLoader/Extension.h"

#include <stdbool.h>
#include <stdio.h>

#if defined(_WIN32)
#ifdef __GNUC__
#define LOADER_EXPORT __attribute__((dllexport))
#else
#define LOADER_EXPORT __declspec(dllexport)
#endif
#else /* non win32 */
#if __GNUC__ || __clang__
#define LOADER_EXPORT __attribute__((visibility("default")))
#endif
#endif
#ifndef LOADER_EXPORT
#define LOADER_EXPORT /* fallback to default */
#endif

#ifdef __cplusplus
extern "C" {
#endif

LOADER_EXPORT bool NodesetLoader_loadFile(struct UA_Server *, const char *path,
NodesetLoader_ExtensionInterface *extensionHandling);
UA_EXPORT bool
NodesetLoader_loadFile(struct UA_Server *, const char *path,
void *options);

#ifdef __cplusplus
}
Expand Down
39 changes: 0 additions & 39 deletions backends/open62541/include/NodesetLoader/dataTypes.h

This file was deleted.

Loading
Loading