connectors/PYRO/__init__.py
changeset 411 8261c8f1e365
parent 399 77e23bf04c33
child 446 1edde533db19
equal deleted inserted replaced
410:092e33606e51 411:8261c8f1e365
   116                 return self.RemotePLCObjectProxyCopy.GetTraceVariables()
   116                 return self.RemotePLCObjectProxyCopy.GetTraceVariables()
   117             else:
   117             else:
   118                 return None,None
   118                 return None,None
   119         GetTraceVariables = PyroCatcher(_PyroGetTraceVariables,(None,None))
   119         GetTraceVariables = PyroCatcher(_PyroGetTraceVariables,(None,None))
   120 
   120 
       
   121         def _PyroPLCIsStarting(self):
       
   122             """
       
   123             for safe use in from debug thread, must use the copy
       
   124             """
       
   125             return self.RemotePLCObjectProxyCopy is not None and self.RemotePLCObjectProxyCopy.GetPLCstatus() == "Starting"
       
   126         PLCIsStarting = PyroCatcher(_PyroPLCIsStarting,False)
       
   127         
   121         def __getattr__(self, attrName):
   128         def __getattr__(self, attrName):
   122             member = self.__dict__.get(attrName, None)
   129             member = self.__dict__.get(attrName, None)
   123             if member is None:
   130             if member is None:
   124                 def my_local_func(*args,**kwargs):
   131                 def my_local_func(*args,**kwargs):
   125                     return RemotePLCObjectProxy.__getattr__(attrName)(*args,**kwargs)
   132                     return RemotePLCObjectProxy.__getattr__(attrName)(*args,**kwargs)