Browse Source

move ns0id node identifiers to ua_constants.h

Julius Pfrommer 7 years ago
parent
commit
365064bc78

+ 0 - 9
CMakeLists.txt

@@ -231,7 +231,6 @@ set(exported_headers ${PROJECT_BINARY_DIR}/src_generated/ua_config.h
                      ${PROJECT_SOURCE_DIR}/deps/ms_stdint.h
                      ${PROJECT_SOURCE_DIR}/include/ua_constants.h
                      ${PROJECT_SOURCE_DIR}/include/ua_types.h
-                     ${PROJECT_BINARY_DIR}/src_generated/ua_nodeids.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_plugin_network.h
@@ -376,14 +375,6 @@ add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/src_generated/ua_transport_gener
                            ${PROJECT_SOURCE_DIR}/tools/schema/datatypes_transport.txt
                            ${CMAKE_CURRENT_SOURCE_DIR}/tools/schema/Custom.Opc.Ua.Transport.bsd)
 
-# nodeids
-add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/src_generated/ua_nodeids.h
-                   PRE_BUILD
-                   COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/tools/generate_nodeids.py
-                           ${PROJECT_SOURCE_DIR}/tools/schema/NodeIds.csv ${PROJECT_BINARY_DIR}/src_generated/ua_nodeids
-                   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tools/generate_nodeids.py
-                           ${CMAKE_CURRENT_SOURCE_DIR}/tools/schema/NodeIds.csv)
-
 # statuscode explanation
 add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/src_generated/ua_statuscode_descriptions.c
         PRE_BUILD

File diff suppressed because it is too large
+ 1302 - 0
include/ua_constants.h


+ 0 - 1
include/ua_server.h

@@ -12,7 +12,6 @@ extern "C" {
 #include "ua_types.h"
 #include "ua_types_generated.h"
 #include "ua_types_generated_handling.h"
-#include "ua_nodeids.h"
 #include "ua_plugin_log.h"
 #include "ua_plugin_network.h"
 #include "ua_plugin_access_control.h"

+ 0 - 1
src/client/ua_client.c

@@ -11,7 +11,6 @@
 #include "ua_transport_generated_handling.h"
 #include "ua_transport_generated_encoding_binary.h"
 #include "ua_util.h"
-#include "ua_nodeids.h"
 
 /*********************/
 /* Create and Delete */

+ 0 - 1
src/client/ua_client_highlevel.c

@@ -5,7 +5,6 @@
 #include "ua_client.h"
 #include "ua_client_highlevel.h"
 #include "ua_util.h"
-#include "ua_nodeids.h"
 
 UA_StatusCode
 UA_Client_NamespaceGetIndex(UA_Client *client, UA_String *namespaceUri,

+ 0 - 1
src/server/ua_server.c

@@ -8,7 +8,6 @@
 #include "ua_session_manager.h"
 #include "ua_util.h"
 #include "ua_services.h"
-#include "ua_nodeids.h"
 
 #ifdef UA_ENABLE_GENERATE_NAMESPACE0
 #include "ua_namespaceinit_generated.h"

+ 0 - 1
src/server/ua_server_ns0.c

@@ -7,7 +7,6 @@
 #include "ua_session_manager.h"
 #include "ua_util.h"
 #include "ua_services.h"
-#include "ua_nodeids.h"
 
 #ifdef UA_ENABLE_SUBSCRIPTIONS
 #include "ua_subscription.h"

+ 0 - 1
tests/check_services_attributes.c

@@ -10,7 +10,6 @@
 #include "server/ua_nodestore.h"
 #include "server/ua_services.h"
 #include "ua_client.h"
-#include "ua_nodeids.h"
 #include "ua_types.h"
 #include "ua_config_standard.h"
 #include "server/ua_server_internal.h"

+ 0 - 1
tests/check_services_nodemanagement.c

@@ -10,7 +10,6 @@
 #include "server/ua_nodestore.h"
 #include "server/ua_services.h"
 #include "ua_client.h"
-#include "ua_nodeids.h"
 #include "ua_types.h"
 #include "ua_config_standard.h"
 #include "server/ua_server_internal.h"

+ 0 - 59
tools/generate_nodeids.py

@@ -1,59 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this 
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-from __future__ import print_function
-import inspect
-import sys
-import platform
-import getpass
-import time
-import re
-import argparse
-
-parser = argparse.ArgumentParser()
-parser.add_argument('nodeids', help='path/to/NodeIds.csv')
-parser.add_argument('outfile', help='outfile w/o extension')
-args = parser.parse_args()
-
-def useNodeId(row):
-    if row[0] == "":
-        return False
-    if "Test" in row[0]:
-        return False
-    if row[0].startswith("OpcUa_"):
-        return False
-    if row[0].startswith("SessionsDiagnosticsSummaryType_"):
-        return False
-    if "Type_" in row[0]:
-        return False
-    return True
-
-f = open(args.nodeids)
-input_str = f.read() + "\nHasModelParent,50,ReferenceType"
-f.close()
-input_str = input_str.replace('\r','')
-rows = map(lambda x:tuple(x.split(',')), input_str.split('\n'))
-
-fh = open(args.outfile + ".h",'w')
-def printh(string):
-    print(string, end='\n', file=fh)
-
-printh('''/**********************************************************
- * '''+args.outfile+'''.hgen -- do not modify
- **********************************************************
- * Generated from '''+args.nodeids+''' with script '''+sys.argv[0]+'''
- * on host '''+platform.uname()[1]+''' by user '''+getpass.getuser()+''' at '''+
-       time.strftime("%Y-%m-%d %I:%M:%S")+'''
- **********************************************************/\n 
-#ifndef ''' + args.outfile.upper().split("/")[-1] + '''_H_
-#define ''' + args.outfile.upper().split("/")[-1] + '''_H_
-''')
-
-for row in rows:
-    if useNodeId(row):
-        printh("#define UA_NS0ID_%s %s // %s" % (row[0].upper(), row[1], row[2]))
-
-printh('\n#endif /* ' + args.outfile.upper().split("/")[-1] + '_H_ */')
-
-fh.close()