opc_ua/client.py
branchwxPython4
changeset 3591 50600b946ea7
parent 3589 a0b645a934c9
child 3611 2c041d3d6ee3
--- a/opc_ua/client.py	Tue Sep 13 10:11:25 2022 +0200
+++ b/opc_ua/client.py	Tue Sep 13 16:22:09 2022 +0200
@@ -108,9 +108,14 @@
         paramList = authParams.get(AuthType, None)
         if paramList:
             for name,default in paramList:
-                res[name] = cfg("AuthType."+name)
+                value = cfg("AuthType."+name)
+                if value == "" or value is None:
+                    value = default
+                # cryptomaterial is expected to be in project's user provide file directory
+                if name in ["Certificate","PrivateKey"]:
+                    value = os.path.join(self.GetCTRoot()._getProjectFilesPath(), value)
+                res[name] = value
 
-        print(res)
         return res
 
     def GetFileName(self):
@@ -134,6 +139,8 @@
 
         CFLAGS = ' '.join(['-I"' + path + '"' for path in Open62541IncludePaths])
 
+        # Note: all user provided files are systematicaly copied, including cryptomaterial
+
         return [(c_path, CFLAGS)], LDFLAGS, True
 
     def GetVariableLocationTree(self):