Browse Source

Update ua_builtin_types.py

Given boolean values within the nodeset are now correctly encoded in the server address space
FlorianPalm 8 years ago
parent
commit
527a74fd28
1 changed files with 3 additions and 3 deletions
  1. 3 3
      tools/pyUANamespace/ua_builtin_types.py

+ 3 - 3
tools/pyUANamespace/ua_builtin_types.py

@@ -835,12 +835,12 @@ class opcua_BuiltinType_boolean_t(opcua_value_t):
     # Catch XML <Boolean /> by setting the value to a default
     if xmlvalue.firstChild == None:
       log(self, "No value is given. Setting to default 0")
-      self.value = False
+      self.value = "UA_FALSE"
     else:
       if "false" in unicode(xmlvalue.firstChild.data).lower():
-        self.value = False
+        self.value = "UA_FALSE"
       else:
-        self.value = True
+        self.value = "UA_TRUE"
 
   def printOpen62541CCode_SubType(self, asIndirect=True):
     return "(UA_" + self.stringRepresentation + ") " + str(self.value)