1 | function [TangoNames, ErrorFlag] = dev2tango(Family, DeviceList, Field) |
---|
2 | %DEV2TANGO - Converts a device list to TANGO names |
---|
3 | % [TangoNames, ErrorFlag] = dev2tango(Family, Field, DeviceList) |
---|
4 | % |
---|
5 | % INPUTS |
---|
6 | % 1. Family = Family Name |
---|
7 | % Data Structure |
---|
8 | % Accelerator Object |
---|
9 | % Cell Array |
---|
10 | % 2. DeviceList ([Sector Device #] or [element #]) |
---|
11 | % 3. Field = Accelerator Object field name ('Monitor', 'Setpoint', etc) {'Monitor'} |
---|
12 | % |
---|
13 | % OUTPUTS |
---|
14 | % 1. TangoNames = Channel name corresponding to the Family, Field, and DeviceList |
---|
15 | % |
---|
16 | % NOTES |
---|
17 | % 1. If Family is a cell array, then DeviceList and Field must also be a cell arrays |
---|
18 | % 2. Returns only status 1 devices -- See StatusFlag |
---|
19 | % |
---|
20 | % EXAMPLES |
---|
21 | % 1. dev2tango('BPMx','Monitor',[1 1]) |
---|
22 | % 2. dev2tango({'HCOR','VCOR'},{'Monitor','Monitor'},{[1 1],[1 2]}) |
---|
23 | % |
---|
24 | % See also family2tango, tango2family |
---|
25 | |
---|
26 | % |
---|
27 | % Written by Laurent S. Nadolski |
---|
28 | |
---|
29 | if nargin <= 1 |
---|
30 | error('Must have at least two inputs (''Family'', (''devicelist'')!'); |
---|
31 | end |
---|
32 | |
---|
33 | if nargin < 3 |
---|
34 | Field = 'Monitor'; |
---|
35 | end |
---|
36 | |
---|
37 | [TangoNames, ErrorFlag] = family2tango(Family, Field, DeviceList); |
---|