Ejemplo n.º 1
0
def createControllerConfiguration(pool_ctrl, pool_channels):
    conf_ctrl = ControllerConfiguration(pool_ctrl)
    for pool_channel in pool_channels:
        channel = ChannelConfiguration(pool_channel)
        channel.controller = conf_ctrl
        conf_ctrl.add_channel(channel)
    return conf_ctrl
Ejemplo n.º 2
0
def createControllerConfiguration(pool_ctrl, pool_channels):
    conf_ctrl = ControllerConfiguration(pool_ctrl)
    for pool_channel in pool_channels:
        channel = ChannelConfiguration(pool_channel)
        channel.controller = conf_ctrl
        conf_ctrl.add_channel(channel)
    return conf_ctrl
Ejemplo n.º 3
0
 def __init__(self, **kwargs):
     PoolBaseChannel.__init__(self, **kwargs)
     # TODO: part of the configuration could be moved to the base class
     # so other experimental channels could reuse it
     self._conf_channel = ChannelConfiguration(self)
     self._conf_ctrl = ControllerConfiguration(self.controller)
     self._conf_ctrl.add_channel(self._conf_channel)
     self._timer = "__default"
     self._conf_timer = None
Ejemplo n.º 4
0
 def _configure_timer(self):
     timer = self.timer
     if timer == "__self":
         conf_timer = self._conf_channel
     else:
         ctrl = self.get_controller()
         if timer == "__default":
             axis = ctrl.get_default_timer()
             if axis is None:
                 msg = "default_timer not defined in controller"
                 raise ValueError(msg)
             timer_elem = ctrl.get_element(axis=axis)
         else:
             timer_elem = self.pool.get_element_by_name(timer)
         if timer_elem is self:
             conf_timer = self._conf_channel
         else:
             self.acquisition.add_element(timer_elem)
             conf_timer = ChannelConfiguration(timer_elem)
             self._conf_ctrl.add_channel(conf_timer)
     self._conf_ctrl.timer = conf_timer
     self._conf_timer = conf_timer