connectors/PYRO/__init__.py
changeset 235 a66e150f2888
parent 231 f1db3ce8f40a
child 284 3fecc96090c8
--- a/connectors/PYRO/__init__.py	Tue Sep 02 12:24:25 2008 +0200
+++ b/connectors/PYRO/__init__.py	Wed Sep 03 17:28:17 2008 +0200
@@ -76,7 +76,7 @@
             """
             return RemotePLCObjectProxy
 
-        def _PyroStartPLC(self):
+        def _PyroStartPLC(self, *args, **kwargs):
             """
             pluginsroot._connector.GetPyroProxy() is used 
             rather than RemotePLCObjectProxy because
@@ -94,7 +94,7 @@
                 # let remote PLC time to resurect.(freeze app)
                 sleep(0.5)
                 pluginsroot._Connect()
-            return pluginsroot._connector.GetPyroProxy().StartPLC()
+            return pluginsroot._connector.GetPyroProxy().StartPLC(*args, **kwargs)
         StartPLC = PyroCatcher(_PyroStartPLC, False)
 
 
@@ -102,7 +102,10 @@
             """
             for safe use in from debug thread, must use the copy
             """
-            return RemotePLCObjectProxyCopy.GetTraceVariables()
+            if RemotePLCObjectProxyCopy.GetPLCstatus() == "Started":
+                return RemotePLCObjectProxyCopy.GetTraceVariables()
+            else:
+                return None,None
         GetTraceVariables = PyroCatcher(_PyroGetTraceVariables)