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:
1.0 KB
|
Line | |
---|
1 | function prop=tango_get_db_property(groupname,propertyname,dbserver) |
---|
2 | %TANGO_GET_DG_PROPERTY - Queries for a Database property |
---|
3 | % |
---|
4 | % [prop]=tango_get_db_Property(groupname,propertyname,dbserver) |
---|
5 | % |
---|
6 | % INPUTS |
---|
7 | % 1. groupname - name of the group in the property tree in Tango DB |
---|
8 | % 2. propertyname - property requested in the groupname |
---|
9 | % 3. dbserver - TANGO database device serve 'sys/database/dbds' by default |
---|
10 | % |
---|
11 | % OUTPUTS |
---|
12 | % 1. prop cell array of strings with the system property |
---|
13 | % |
---|
14 | % EXEMPLES |
---|
15 | % prop = tango_get_db_property('anneau','tracy_bpm_mapping') |
---|
16 | % |
---|
17 | % See also tango_set_db_property |
---|
18 | |
---|
19 | % |
---|
20 | % Modified By Laurent S. Nadolski |
---|
21 | |
---|
22 | if (nargin < 2) |
---|
23 | help tango_get_db_property |
---|
24 | return; |
---|
25 | elseif nargin < 3 |
---|
26 | dbserver = tango_get_dbname; |
---|
27 | end |
---|
28 | |
---|
29 | argin = {groupname,propertyname}; |
---|
30 | res = tango_command_inout(dbserver,'DbGetProperty',argin); |
---|
31 | |
---|
32 | if (tango_error == -1) |
---|
33 | %- handle error |
---|
34 | tango_print_error_stack; |
---|
35 | return |
---|
36 | end |
---|
37 | |
---|
38 | %% Overhead 4 lines |
---|
39 | dim = 4; |
---|
40 | nb = str2num(char(res(dim))); |
---|
41 | |
---|
42 | %% return cell array of string |
---|
43 | prop = res(dim+1:dim+nb); |
---|
Note: See
TracBrowser
for help on using the repository browser.