Преглед на файлове

fix the addition for type and member names

Julius Pfrommer преди 9 години
родител
ревизия
9eaa94c086
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      tools/generate_datatypes.py

+ 1 - 1
tools/generate_datatypes.py

@@ -179,7 +179,7 @@ class EnumerationType(object):
             typeid = "{.namespaceIndex = 0, .identifierType = UA_NODEIDTYPE_NUMERIC, .identifier.numeric = 0}, "
         else:
             typeid = "{.namespaceIndex = %s, .identifierType = UA_NODEIDTYPE_NUMERIC, .identifier.numeric = %s}, " % (description.namespaceid, description.nodeid)
-        return "{.typeId = " + typeid + \
+        return (("{.typeName = \"" + self.name[3:] + "\", ") if typeintrospection else "{") + ".typeId = " + typeid + \
             ".memSize = sizeof(" + self.name + "), " +\
             ".namespaceZero = UA_TRUE, " + \
             ".fixedSize = UA_TRUE, .zeroCopyable = UA_TRUE, " + \