Esempio n. 1
0
    def init_device(self):
        PoolTimerableDevice.init_device(self)
        twod = self.twod
        if twod is None:
            full_name = self.get_full_name()
            name = self.alias or full_name
            self.twod = twod = \
                self.pool.create_element(type="TwoDExpChannel",
                                         name=name, full_name=full_name, id=self.Id, axis=self.Axis,
                                         ctrl_id=self.Ctrl_id)
            if self.instrument is not None:
                twod.set_instrument(self.instrument)
        twod.add_listener(self.on_twod_changed)

        # force a state read to initialize the state attribute
        #state = ct.state
        self.set_state(DevState.ON)
Esempio n. 2
0
    def initialize_dynamic_attributes(self):
        attrs = PoolTimerableDevice.initialize_dynamic_attributes(self)

        non_detect_evts = "valuebuffer",

        for attr_name in non_detect_evts:
            if attr_name in attrs:
                self.set_change_event(attr_name, True, False)
Esempio n. 3
0
    def initialize_dynamic_attributes(self):
        attrs = PoolTimerableDevice.initialize_dynamic_attributes(self)

        non_detect_evts = "data",

        for attr_name in non_detect_evts:
            if attr_name in attrs:
                self.set_change_event(attr_name, True, False)
Esempio n. 4
0
    def init_device(self):
        PoolTimerableDevice.init_device(self)
        twod = self.twod
        if twod is None:
            full_name = self.get_full_name()
            name = self.alias or full_name
            self.twod = twod = \
                self.pool.create_element(type="TwoDExpChannel",
                                         name=name, full_name=full_name, id=self.Id, axis=self.Axis,
                                         ctrl_id=self.Ctrl_id)
            if self.instrument is not None:
                twod.set_instrument(self.instrument)
        twod.add_listener(self.on_twod_changed)

        # force a state read to initialize the state attribute
        #state = ct.state
        self.set_state(DevState.ON)
Esempio n. 5
0
    def initialize_dynamic_attributes(self):
        attrs = PoolTimerableDevice.initialize_dynamic_attributes(self)

        # referable channels
        # TODO: not 100% sure if valuereftemplate and valuerefenabled should
        # not belong to detect_evts
        non_detect_evts = ("valuebuffer", "valueref", "valuerefbuffer",
                           "valuereftemplate", "valuerefenabled")
        for attr_name in non_detect_evts:
            if attr_name in attrs:
                self.set_change_event(attr_name, True, False)
Esempio n. 6
0
    def get_dynamic_attributes(self):
        cache_built = hasattr(self, "_dynamic_attributes_cache")

        std_attrs, dyn_attrs = \
            PoolTimerableDevice.get_dynamic_attributes(self)

        if not cache_built:
            # For value attribute, listen to what the controller says for data
            # type (between long and float)
            value = std_attrs.get('value')
            if value is not None:
                _, data_info, attr_info = value
                ttype, _ = to_tango_type_format(attr_info.dtype)
                data_info[0][0] = ttype
        return std_attrs, dyn_attrs
Esempio n. 7
0
    def get_dynamic_attributes(self):
        cache_built = hasattr(self, "_dynamic_attributes_cache")

        std_attrs, dyn_attrs = \
            PoolTimerableDevice.get_dynamic_attributes(self)

        if not cache_built:
            # For value attribute, listen to what the controller says for data
            # type (between long and float) and length
            value = std_attrs.get('value')
            if value is not None:
                _, data_info, attr_info = value
                ttype, _ = to_tango_type_format(attr_info.dtype)
                data_info[0][0] = ttype
                shape = attr_info.maxdimsize
                data_info[0][3] = shape[0]
        return std_attrs, dyn_attrs
Esempio n. 8
0
 def __init__(self, dclass, name):
     PoolTimerableDevice.__init__(self, dclass, name)
Esempio n. 9
0
 def delete_device(self):
     PoolTimerableDevice.delete_device(self)
     twod = self.twod
     if twod is not None:
         twod.remove_listener(self.on_twod_changed)
Esempio n. 10
0
 def init(self, name):
     PoolTimerableDevice.init(self, name)
Esempio n. 11
0
 def __init__(self, dclass, name):
     PoolTimerableDevice.__init__(self, dclass, name)
     self._first_read_cache = False
     self._first_read_ref_cache = False
Esempio n. 12
0
 def delete_device(self):
     PoolTimerableDevice.delete_device(self)
     twod = self.twod
     if twod is not None:
         twod.remove_listener(self.on_twod_changed)
Esempio n. 13
0
 def init(self, name):
     PoolTimerableDevice.init(self, name)
Esempio n. 14
0
 def delete_device(self):
     PoolTimerableDevice.delete_device(self)
     oned = self.oned
     if oned is not None:
         oned.remove_listener(self.on_oned_changed)
Esempio n. 15
0
 def delete_device(self):
     PoolTimerableDevice.delete_device(self)
     ct = self.ct
     if ct is not None:
         ct.remove_listener(self.on_ct_changed)
Esempio n. 16
0
 def __init__(self, dclass, name):
     PoolTimerableDevice.__init__(self, dclass, name)
Esempio n. 17
0
 def delete_device(self):
     PoolTimerableDevice.delete_device(self)
     oned = self.oned
     if oned is not None:
         oned.remove_listener(self.on_oned_changed)
Esempio n. 18
0
 def __init__(self, dclass, name):
     PoolTimerableDevice.__init__(self, dclass, name)
     self._first_read_cache = False