def disconnect(self): for dev_id in self.device_contexts.keys(): device_context = self.device_contexts[dev_id] if device_context[CONTAINS_CS_ID_KEY]: self.release_device_context(dev_id, -1, '') TupleWrapper.forget_tuple_wrapper_instances() self.manager.set_manager_callbacks(None, None, None, None) self.manager = None del self.appointed_lom_ids del self.lom_classes
def prepare_control_surface_update(self, device_id, object_id, parameters): found_cs_references = False for dev_id in self.device_contexts.keys(): device_context = self.device_contexts[dev_id] if device_context[CONTAINS_CS_ID_KEY]: found_cs_references = True self.release_device_context(dev_id, -1, parameters) self.manager.refresh_max_device(dev_id) if found_cs_references: TupleWrapper.forget_tuple_wrapper_instances() self.appointed_lom_ids = {0: None}
def _tuple_element_from_path(self, path_components): lom_object = None parent = None attribute = path_components[-1] if len(path_components) > 1: parent = self._calculate_object_from_path(path_components[:-1]) if not (attribute in ('cs', 'control_surfaces') and parent == None): raise AssertionError lom_object = TupleWrapper.get_tuple_wrapper(parent, 'control_surfaces') elif parent != None and hasattr(parent, attribute): selector = self._list_manager.get_list_wrapper if is_cplusplus_lom_object(parent) else TupleWrapper.get_tuple_wrapper lom_object = selector(parent, attribute) return lom_object