Browse Source

nsc adds valuerank

ichrispa 8 years ago
parent
commit
dcb44c45b6
1 changed files with 4 additions and 2 deletions
  1. 4 2
      tools/pyUANamespace/open62541_MacroHelper.py

+ 4 - 2
tools/pyUANamespace/open62541_MacroHelper.py

@@ -199,11 +199,13 @@ class open62541_MacroHelper():
     code.append("UA_%sAttributes_init(&attr);" %  nodetype);
     code.append("attr.displayName = UA_LOCALIZEDTEXT(\"\", \"" + str(node.displayName()) + "\");")
     code.append("attr.description = UA_LOCALIZEDTEXT(\"\", \"" + str(node.description()) + "\");")
-
+    
     if nodetype == "Variable":
       code.append("attr.accessLevel = %s;"     % str(node.accessLevel()))
       code.append("attr.userAccessLevel = %s;" % str(node.userAccessLevel()))
-
+    if nodetype in ["Variable", "VariableType"]:
+      code.append("attr.valueRank = %s;"       % str(node.valueRank()))
+      
     if nodetype in ["Variable", "VariableType"]:
       code = code + node.printOpen62541CCode_SubtypeEarly(bootstrapping = False)
     elif nodetype == "Method":