Ejemplo n.º 1
0
    def init_device(self):
        PoolGroupDevice.init_device(self)
        # state and status are already set by the super class
        detect_evts = "latencytime", "moveable", "synchronization", \
                      "softwaresynchronizerinitialdomain", "nbstarts"
        non_detect_evts = "configuration", "integrationtime", "monitorcount", \
                          "acquisitionmode", "elementlist"
        self.set_change_events(detect_evts, non_detect_evts)

        self.Elements = list(self.Elements)
        for i in range(len(self.Elements)):
            try:
                self.Elements[i] = int(self.Elements[i])
            except:
                pass
        mg = self.measurement_group
        if mg is None:
            full_name = self.get_full_name()
            name = self.alias or full_name
            self.measurement_group = mg = \
                self.pool.create_measurement_group(name=name,
                                                   full_name=full_name,
                                                   id=self.Id,
                                                   user_elements=self.Elements)
        mg.add_listener(self.on_measurement_group_changed)

        # force a state read to initialize the state attribute
        # state = self.measurement_group.state
        self.set_state(DevState.ON)
Ejemplo n.º 2
0
 def init_device(self):
     PoolGroupDevice.init_device(self)
     detect_evts = "position",
     non_detect_evts = "elementlist",
     self.set_change_events(detect_evts, non_detect_evts)
     self.Elements = map(int, self.Elements)
     motor_group = self.motor_group
     if motor_group is None:
         full_name = self.get_full_name()
         name = self.alias or full_name
         self.motor_group = motor_group = \
             self.pool.create_motor_group(name=name, id=self.Id,
                                          full_name=full_name, user_elements=self.Elements)
     motor_group.add_listener(self.on_motor_group_changed)
     self.set_state(DevState.ON)
Ejemplo n.º 3
0
 def init_device(self):
     PoolGroupDevice.init_device(self)
     detect_evts = "position",
     non_detect_evts = "elementlist",
     self.set_change_events(detect_evts, non_detect_evts)
     self.Elements = map(int, self.Elements)
     motor_group = self.motor_group
     if motor_group is None:
         full_name = self.get_full_name()
         name = self.alias or full_name
         self.motor_group = motor_group = \
             self.pool.create_motor_group(name=name, id=self.Id,
                                          full_name=full_name, user_elements=self.Elements)
     motor_group.add_listener(self.on_motor_group_changed)
     self.set_state(DevState.ON)
Ejemplo n.º 4
0
 def delete_device(self):
     PoolGroupDevice.delete_device(self)
     motor_group = self.motor_group
     if motor_group is not None:
         motor_group.remove_listener(self.on_motor_group_changed)
Ejemplo n.º 5
0
 def _is_allowed(self, req_type):
     return PoolGroupDevice._is_allowed(self, req_type)
Ejemplo n.º 6
0
 def init(self, name):
     PoolGroupDevice.init(self, name)
Ejemplo n.º 7
0
 def __init__(self, dclass, name):
     self.in_write_position = False
     PoolGroupDevice.__init__(self, dclass, name)
Ejemplo n.º 8
0
 def delete_device(self):
     PoolGroupDevice.delete_device(self)
     mg = self.measurement_group
     if mg is not None:
         mg.remove_listener(self.on_measurement_group_changed)
Ejemplo n.º 9
0
 def init(self, name):
     PoolGroupDevice.init(self, name)
Ejemplo n.º 10
0
 def __init__(self, dclass, name):
     PoolGroupDevice.__init__(self, dclass, name)
Ejemplo n.º 11
0
 def delete_device(self):
     PoolGroupDevice.delete_device(self)
     motor_group = self.motor_group
     if motor_group is not None:
         motor_group.remove_listener(self.on_motor_group_changed)
Ejemplo n.º 12
0
 def _is_allowed(self, req_type):
     return PoolGroupDevice._is_allowed(self, req_type)
Ejemplo n.º 13
0
 def __init__(self, dclass, name):
     self.in_write_position = False
     PoolGroupDevice.__init__(self, dclass, name)