--- a/connectors/PYRO/__init__.py Tue Dec 30 22:43:48 2008 +0100
+++ b/connectors/PYRO/__init__.py Tue Dec 30 22:47:15 2008 +0100
@@ -61,14 +61,16 @@
pluginsroot.logger.write_error("Cannot get PLC status - connection failed.\n")
- # for safe use in from debug thread, must create a copy
- RemotePLCObjectProxyCopy = copy.copy(RemotePLCObjectProxy)
A proxy proxy class to handle Beremiz Pyro interface specific behavior.
And to put pyro exception catcher in between caller and pyro proxy
+ # for safe use in from debug thread, must create a copy + self.RemotePLCObjectProxyCopy = None This func returns the real Pyro Proxy.
@@ -94,6 +96,7 @@
# let remote PLC time to resurect.(freeze app)
+ self.RemotePLCObjectProxyCopy = copy.copy(pluginsroot._connector.GetPyroProxy()) return pluginsroot._connector.GetPyroProxy().StartPLC(*args, **kwargs)
StartPLC = PyroCatcher(_PyroStartPLC, False)
@@ -102,11 +105,11 @@
for safe use in from debug thread, must use the copy
- if RemotePLCObjectProxyCopy.GetPLCstatus() == "Started":
- return RemotePLCObjectProxyCopy.GetTraceVariables()
+ if self.RemotePLCObjectProxyCopy is not None and self.RemotePLCObjectProxyCopy.GetPLCstatus() == "Started": + return self.RemotePLCObjectProxyCopy.GetTraceVariables() - GetTraceVariables = PyroCatcher(_PyroGetTraceVariables)
+ GetTraceVariables = PyroCatcher(_PyroGetTraceVariables,(None,None)) def __getattr__(self, attrName):