source: MML/trunk/mml/links/tango/get_device_name.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 11 years ago

Initial import--MML version from SOLEIL@2013

File size: 734 bytes
Line 
1function [devicelist commonlist] = get_device_name(machine,property,magnet)
2%GET_DEVICE_NAME - Gets device list from mapping read in tango database
3%
4% INPUTS
5% 1. FamilyName or cell array of devicenames
6% 2. property of the attribute
7% 3. magnet: magnet type eg. CH
8%
9% OUTPUTS
10% 1. devicelist: device name
11% 2. commonlist: name in AT
12%
13% EXAMPLES
14% 1. get_device_name('LT1','tracy_correctorH_mapping', AO.CH.FamilyName);
15%
16
17%
18% Written by Laurent S. Nadolski
19map        = tango_get_db_property(machine,property);
20sep        = cell2mat(regexpi(map,'::','once'))-1;
21devicelist = regexprep(map,[magnet '\d*::'],'')';
22nb = length(map);
23commonlist = {''};
24for k = 1:nb
25   commonlist{k} = map{k}(1:sep(k));
26end
27commonlist = commonlist';
Note: See TracBrowser for help on using the repository browser.