Parcourir la source

renamed "namespace_zero" to "UA_"

Stasik0 il y a 11 ans
Parent
commit
d9a25c77ca
2 fichiers modifiés avec 6 ajouts et 6 suppressions
  1. 4 4
      tool/generate_namespace.py
  2. 2 2
      tool/opcua_basictypes.c

+ 4 - 4
tool/generate_namespace.py

@@ -58,14 +58,14 @@ print('''/**********************************************************
 
 #include "opcua.h"  // definition of UA_VTable and basic UA_Types
 
-Int32 UA_namespace_zero_to_index(Int32 id);
-extern UA_VTable UA_namespace_zero[]; 
+Int32 UA_toIndex(Int32 id);
+extern UA_VTable UA_[]; 
 
 enum UA_VTableIndex_enum {''', end='\n', file=fh)
 
 print('''/* Mapping and vTable of Namespace Zero */
 #include "opcua.h"
-Int32 UA_namespace_zero_to_index(Int32 id) {
+Int32 UA_toIndex(Int32 id) {
     Int32 retval = -1;
     switch (id) { ''', end='\n',file=fc)
 
@@ -85,7 +85,7 @@ for row in rows1:
 print('\tUA_NS0_VTABLE_MAX = 0\n};\n', file=fh)
 print('''\t}\n\treturn retval;
 }
-UA_VTable UA_namespace_zero[] = {''', file=fc)
+UA_VTable UA_[] = {''', file=fc)
 
 for row in rows2:
     if skipKind(row[2]):

+ 2 - 2
tool/opcua_basictypes.c

@@ -11,7 +11,7 @@
 
 
 Int32 UA_calcSize(void* const data, UInt32 type) {
-	return (UA_namespace_zero[type].calcSize)(data);
+	return (UA_[type].calcSize)(data);
 }
 
 Int32 UA_Array_calcSize(Int32 nElements, Int32 type, void const ** data) {
@@ -851,7 +851,7 @@ Int32 UA_Variant_decode(char const * src, Int32 *pos, UA_Variant *dst) {
 	if (ns0Id < UA_BOOLEAN && ns0Id > UA_DOUBLECOMPLEXNUMBERTYPE) {
 		return UA_ERR_INVALID_VALUE;
 	} else {
-		dst->vt = &UA_namespace_zero[UA_namespace_zero_to_index(ns0Id)];
+		dst->vt = &UA_[UA_toIndex(ns0Id)];
 	}
 
 	// get size of array