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 | |
---|
1 | function [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 |
---|
19 | map = tango_get_db_property(machine,property); |
---|
20 | sep = cell2mat(regexpi(map,'::','once'))-1; |
---|
21 | devicelist = regexprep(map,[magnet '\d*::'],'')'; |
---|
22 | nb = length(map); |
---|
23 | commonlist = {''}; |
---|
24 | for k = 1:nb |
---|
25 | commonlist{k} = map{k}(1:sep(k)); |
---|
26 | end |
---|
27 | commonlist = commonlist'; |
---|
Note: See
TracBrowser
for help on using the repository browser.