def __init__(self, full_name, name=None): self._path_id = None self._motion_loop_states_per_position = self.Default_MotionLoop_StatesPerPosition self._motion_loop_sleep_time = self.Default_MotionLoop_SleepTime self._acq_loop_states_per_value = self.Default_AcqLoop_StatesPerValue self._acq_loop_sleep_time = self.Default_AcqLoop_SleepTime self._drift_correction = self.Default_DriftCorrection self._remote_log_handler = None # dict<str, dict<str, str>> # keys are acquisition channel names and value is a dict describing the # channel containing: # - 'name': with value being the channel name (given by user) # - 'full_name': acq channel full name (ex: tango attribute) # - 'origin': 'local' if local to this server or 'remote' if a remote # channel self._extra_acquisition_element_names = CaselessDict() PoolContainer.__init__(self) PoolObject.__init__(self, full_name=full_name, name=name, id=InvalidId, pool=self, elem_type=ElementType.Pool) self._monitor = PoolMonitor(self, "PMonitor", auto_start=False) # self.init_local_logging() ControllerManager().set_pool(self)
def rename_element(self, old_name, new_name): elem = self.get_element_by_name(old_name) if type(elem) == PoolMeasurementGroup: elem.rename_element(old_name, new_name) else: elem.controller.rename_element(old_name, new_name) PoolContainer.rename_element(self, old_name, new_name) elem = self.get_element_by_name(new_name) self.fire_event(EventType("ElementChanged"), elem)
def __init__(self, **kwargs): self._pending = True self._user_element_ids = None self._user_elements = None self._physical_elements = None self._physical_elements_set = None self._state_statistics = {} self._pool = kwargs.pop('pool') self.set_user_element_ids(kwargs.pop('user_elements')) PoolContainer.__init__(self) try: self._build_elements() except KeyError: self.info("failed to build element information. No problem. " \ "Probably one or more underlying elements have not " \ "been constructed yet")
def rename_element(self, old_name, new_name): elem = self.get_element_by_name(old_name) elem.controller.rename_element(old_name, new_name) PoolContainer.rename_element(self, old_name, new_name) elem = self.get_element_by_name(new_name) self.fire_event(EventType("ElementChanged"), elem)