Beispiel #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)
Beispiel #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)
Beispiel #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)