graphics/GraphicCommons.py
changeset 1089 5cd1f8df71aa
parent 1069 880ec628d490
child 1102 cd4a996ddaa7
equal deleted inserted replaced
1088:43739c16a002 1089:5cd1f8df71aa
   325     def SetDataProducer(self, producer):
   325     def SetDataProducer(self, producer):
   326         if self.RegisterTick and self.Debug:
   326         if self.RegisterTick and self.Debug:
   327             if producer is not None:
   327             if producer is not None:
   328                 producer.SubscribeDebugIECVariable("__tick__", self)
   328                 producer.SubscribeDebugIECVariable("__tick__", self)
   329             if self.DataProducer is not None:
   329             if self.DataProducer is not None:
   330                 self.DataProducer.UnsubscribeDebugIECVariable("__tick__", self)        
   330                 self.DataProducer.UnsubscribeDebugIECVariable("__tick__", self)
   331         self.DataProducer = producer
   331         self.DataProducer = producer
   332     
   332     
   333     def IsDebugging(self):
   333     def IsDebugging(self):
   334         return self.Debug
   334         return self.Debug
   335     
   335     
   351         iec_path = self.DataConsumers.pop(consumer, None)
   351         iec_path = self.DataConsumers.pop(consumer, None)
   352         if iec_path is not None:
   352         if iec_path is not None:
   353             self.DataProducer.UnsubscribeDebugIECVariable(iec_path, consumer)
   353             self.DataProducer.UnsubscribeDebugIECVariable(iec_path, consumer)
   354     
   354     
   355     def RegisterVariables(self):
   355     def RegisterVariables(self):
   356         pass
   356         if self.RegisterTick and self.Debug and self.DataProducer is not None:
       
   357             self.DataProducer.SubscribeDebugIECVariable("__tick__", self)
   357     
   358     
   358     def GetDataType(self, iec_path):
   359     def GetDataType(self, iec_path):
   359         if self.DataProducer is not None:
   360         if self.DataProducer is not None:
   360             infos = self.DataProducer.GetInstanceInfos(iec_path)
   361             infos = self.DataProducer.GetInstanceInfos(iec_path)
   361             if infos is not None:
   362             if infos is not None: