def AddDevice(self, axis):
     self._log.debug('AddDevice(%d): entering...' % axis)
     idx = axis - 1
     func_generator = FunctionGenerator()
     func_generator.initial_domain = SynchDomain.Time
     func_generator.active_domain = SynchDomain.Time
     self.tg[idx] = func_generator
Пример #2
0
 def __init__(self, main_element, name="Synchronization"):
     PoolAction.__init__(self, main_element, name)
     # Even if rest of Sardana is using "." in logger names use "-" as
     # sepator. This is in order to avoid confusion about the logger
     # hierary - by default python logging use "." to indicate loggers'
     # hirarchy in case parent-children relation is established between the
     # loggers.
     # TODO: review if it is possible in Sardana to use a common separator.
     soft_synch_name = main_element.name + "-SoftSynch"
     self._synch_soft = FunctionGenerator(name=soft_synch_name)
     self._listener = None
Пример #3
0
 def AddDevice(self, axis):
     self._log.debug('AddDevice(%d): entering...' % axis)
     idx = axis - 1
     self.device.setoutput(axis, True)
     func_generator = FunctionGenerator()
     func_generator.initial_domain = SynchDomain.Time
     func_generator.active_domain = SynchDomain.Time
     cb = RasPiDOCallback(self.device, axis)
     func_generator.add_listener(cb)
     self.tg[idx] = func_generator
     self.cbs[idx] = cb
     self._log.debug('AddDevice(%d): leaving...' % axis)
Пример #4
0
 def AddDevice(self, axis):
     self._log.debug('AddDevice(%d): entering...' % axis)
     idx = axis - 1
     func_generator = FunctionGenerator()
     func_generator.initial_domain = SynchDomain.Time
     func_generator.active_domain = SynchDomain.Time
     cb = RasPiTangoDOCallback(self, axis)
     func_generator.add_listener(cb)
     self.tg[idx] = func_generator
     self.cbs[idx] = cb
     self.state[idx] = State.On
     self.status[idx] = "Stopped"
     self._log.debug("AddDevice(%d): leaving..." % axis)
Пример #5
0
 def setUp(self):
     self.thread_pool = ThreadPool("TestThreadPool", Psize=2)
     self.func_generator = FunctionGenerator()
     self.event = Event()
     self.listener = Listener()
     self.func_generator.add_listener(self.listener)
Пример #6
0
 def __init__(self, main_element, name="Synchronization"):
     PoolAction.__init__(self, main_element, name)
     self._synch_soft = FunctionGenerator()
     self._listener = None