Bladeren bron

nsc adds valuerank

ichrispa 8 jaren geleden
bovenliggende
commit
dcb44c45b6
1 gewijzigde bestanden met toevoegingen van 4 en 2 verwijderingen
  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":