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:
1015 bytes
|
Line | |
---|
1 | function replies = tango_group_write_attribute2(group_id, attr_name, attr_value, forward) |
---|
2 | %TANGO_GROUP_WRITE_ATTRIBUTES - enhance function with error handling |
---|
3 | % |
---|
4 | % INPUTS |
---|
5 | % 1. Group identification number |
---|
6 | % 2. Attr_name Attribute name |
---|
7 | % 3. attr_values Attribute value to write |
---|
8 | % 4. forward |
---|
9 | % |
---|
10 | % See Also tango_group_write_attribute |
---|
11 | |
---|
12 | % |
---|
13 | %% Written by Laurent S. Nadolski |
---|
14 | |
---|
15 | if nargin < 3 |
---|
16 | error('At least 3 arguments required'); |
---|
17 | end |
---|
18 | if nargin < 4 |
---|
19 | forward = 0; |
---|
20 | end |
---|
21 | |
---|
22 | replies = tango_group_write_attribute(group_id, attr_name, forward, attr_value); |
---|
23 | |
---|
24 | if tango_error == -1 || (isnumeric(replies) && replies == -1) |
---|
25 | tango_print_error_stack |
---|
26 | return, |
---|
27 | else |
---|
28 | if replies.has_failed |
---|
29 | disp('Error when reading data for BPM'); |
---|
30 | for k = 1:length(replies.replies), |
---|
31 | if replies.replies(k).has_failed |
---|
32 | fprintf('Error with device %s\n',replies.replies(k).dev_name) |
---|
33 | tango_print_error_stack_as_it_is(replies.replies(k).error) |
---|
34 | end |
---|
35 | end |
---|
36 | end |
---|
37 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.