Exemplo n.º 1
0
 def get_attribute_alias_list(self, attr_alias_name):
     attr_alias = settings.HashObjSetting(self.TANGO_ATTR_ALIAS)
     attr_alias_info = attr_alias.get(attr_alias_name)
     if attr_alias_info is None:
         return []
     else:
         return [attr_alias_info.get('name')]
Exemplo n.º 2
0
 def get_attribute_alias2(self, attr_name):
     attr_alias = settings.HashObjSetting(self.TANGO_ATTR_ALIAS)
     result = []
     for alias,name in attr_alias.iteritems():
         if name == attr_name:
             result.append(alias)
     return result
Exemplo n.º 3
0
 def get_attribute_alias(self, attr_alias_name):
     attr_alias = settings.HashObjSetting(self.TANGO_ATTR_ALIAS)
     attr_alias_info = attr_alias.get(attr_alias_name)
     if attr_alias_info is None:
         th_exc(DB_SQLError,
                "No attribute found for alias '" + attr_alias + "'",
                "DataBase::GetAttributeAlias()")
     return attr_alias_info.get('name')
Exemplo n.º 4
0
 def put_attribute_alias(self, attribute_name, attr_alias_name):
     attr_alias = settings.HashObjSetting(self.TANGO_ATTR_ALIAS)
     attr_alias_info = attr_alias.get(attr_alias_name)
     if attr_alias_info is not None:
         self.warn_stream("DataBase::DbPutAttributeAlias(): this alias exists already ")
         th_exc(DB_SQLError,
                "alias " + attribute_alias + " already exists !",
                "DataBase::DbPutAttributeAlias()")
     attr_alias[attr_alias_name] = attribute_name
Exemplo n.º 5
0
 def __init__(self, name, proxy, acquisition_proxy):
     self._proxy = proxy
     self._acquisition_proxy = acquisition_proxy
     self._proxy.Start()
     self.name = '%s:RoiCounters' % name
     self._current_config = settings.SimpleSetting(self.name,
                                                   default_value='default')
     settings_name = '%s:%s' % (self.name, self._current_config.get())
     self._save_rois = settings.HashObjSetting(settings_name)
     self._roi_ids = {}
     self._grouped_read_handler = RoiCounterGroupReadHandler(self)
Exemplo n.º 6
0
 def config_name(self, name):
     self._current_config.set(name)
     self._save_rois = settings.HashObjSetting('%s:%s' % (self.name, name))
Exemplo n.º 7
0
 def get_alias_attribute(self, alias_name):
     attr_alias = settings.HashObjSetting(self.TANGO_ATTR_ALIAS)
     attr_name = attr_alias.get(alias_name)
     return attr_name and [attr_name] or []
Exemplo n.º 8
0
 def _get_property_attr_device(self,dev_name) :
     key_name = 'tango.%s' % dev_name.lower().replace('/','.')
     return settings.HashObjSetting(key_name)
Exemplo n.º 9
0
 def _get_class_attribute(self,klass_name, attr_name) :
     self._info("_get_class_attribute(klass_name=%s,attr_name=%s)",
                klass_name, attr_name)
     key_name = 'tango.class.attribute.%s.%s' % (klass_name,attr_name)
     return settings.HashObjSetting(key_name)
Exemplo n.º 10
0
 def delete_attribute_alias(self, alias):
     self._info("delete_attribute_alias(alias=%s)",alias)
     attr_alias = settings.HashObjSetting(self.TANGO_ATTR_ALIAS)
     del attr_alias[alias]