def __init__(self, inst, props, *args, **kwargs): """Constructor""" TwoDController.__init__(self, inst, props, *args, **kwargs) print('GreatEyes Tango Initialization ...') self.proxy = DeviceProxy(self.tangoFQDN) print('SUCCESS') self._axes = {}
def __init__(self, inst, props, *args, **kwargs): self.TangoHost = None TwoDController.__init__(self, inst, props, *args, **kwargs) print("PYTHON -> TwoDController ctor for instance", inst) self.ct_name = "TangoVimbaCtrl/" + self.inst_name if self.TangoHost == None: self.db = PyTango.Database() else: self.node = self.TangoHost self.port = 10000 if self.TangoHost.find(':'): lst = self.TangoHost.split(':') self.node = lst[0] self.port = int(lst[1]) self.db = PyTango.Database(self.node, self.port) name_dev_ask = self.RootDeviceName + "*" self.devices = self.db.get_device_exported(name_dev_ask) self.max_device = 0 self.tango_device = [] self.proxy = [] self.device_available = [] self.start_time = [] self.exp_time = 0 for name in self.devices.value_string: self.tango_device.append(name) self.proxy.append(None) self.device_available.append(0) self.start_time.append(time.time()) self.max_device = self.max_device + 1 self.started = False
def __init__(self, inst, props, *args, **kwargs): TwoDController.__init__(self, inst, props, *args, **kwargs) self.channels = self.MaxDevice * [None, ] self.start_time = None self.integ_time = None self.repetitions = None self.latency_time = None self.acq_cycle_time = None # integ_time + latency_time self.estimated_duration = None self.start_idx = None self._synchronization = AcqSynch.SoftwareTrigger self.read_channels = {} self.counting_channels = {} # name of synchronizer element self._synchronizer = None # synchronizer element (core) self.__synchronizer_obj = None # flag whether the controller was armed for hardware synchronization self._armed = False
def AddDevice(self, ind): # print "PYTHON -> TangoVimbaCtrl/",self.inst_name,": In AddDevice method for index",ind TwoDController.AddDevice(self, ind) if ind > self.max_device: print("False index") return proxy_name = self.tango_device[ind - 1] if self.TangoHost == None: proxy_name = self.tango_device[ind - 1] else: proxy_name = str(self.node) + (":%s/" % self.port) + str( self.tango_device[ind - 1]) self.proxy[ind - 1] = PyTango.DeviceProxy(proxy_name) self.device_available[ind - 1] = 1 print(proxy_name)
def __init__(self, inst, props, *args, **kwargs): TwoDController.__init__(self, inst, props, *args, **kwargs) self.channels = self.MaxDevice * [ None, ] self.reset()
def DeleteDevice(self, ind): # print "PYTHON -> TangoVimbaCtrl/",self.inst_name,": In DeleteDevice method for index",ind TwoDController.DeleteDevice(self, ind) self.proxy[ind - 1] = None self.device_available[ind - 1] = 0
def LoadOne(self, ind, value): self.exp_time = value def GetAxisPar(self, ind, par_name): if par_name == "data_source": data_source = "Not set" return data_source def GetExtraAttributePar(self, ind, name): # print "PYTHON -> TangoVimbaCtrl/",self.inst_name,": In GetExtraFeaturePar method for index",ind," name=",name if self.device_available[ind - 1]: if name == "TangoDevice": tango_device = self.node + ":" + str( self.port) + "/" + self.proxy[ind - 1].name() return tango_device def SetExtraAttributePar(self, ind, name, value): # print "PYTHON -> TangoVimbaCtrl/",self.inst_name,": In SetExtraFeaturePar method for index",ind," name=",name," value=",value pass def SendToCtrl(self, in_data): # print "Received value =",in_data return "Nothing sent" def __del__(self): print("PYTHON -> TangoVimbaCtrl/", self.inst_name, ": dying") if __name__ == "__main__": obj = TwoDController('test')
def __init__(self, inst, props, *args, **kwargs): TwoDController.__init__(self, inst, props, *args, **kwargs) LimaCtrlMixin.__init__(self, TwoDController) self._lima.saving.enabled = True
def __init__(self, inst, props, *args, **kwargs): TwoDController.__init__(self, inst, props, *args, **kwargs) self._log.debug('Detector device: %s' % self.DetectorDevice) self.det = PyTango.DeviceProxy(self.DetectorDevice) self.det.write_attribute('saving_mode', 'MANUAL')
def __init__(self, inst, props, *args, **kwargs): TwoDController.__init__(self, inst, props, *args, **kwargs) self.channels = self.MaxDevice*[None,] self.reset()