Last change
on this file since 4 was
4,
checked in by zhangj, 10 years ago
|
Initial import--MML version from SOLEIL@2013
|
File size:
774 bytes
|
Line | |
---|
1 | function [txt, color]=state_txt(txt) |
---|
2 | % Manage state string from synchro |
---|
3 | |
---|
4 | tf = isstrprop(txt, 'cntrl'); |
---|
5 | [C,I] = max(tf); |
---|
6 | if I==1 |
---|
7 | n=length(txt); |
---|
8 | else |
---|
9 | n=I-1; |
---|
10 | end |
---|
11 | txt=txt(1:n); |
---|
12 | |
---|
13 | if strcmp('Local board is up and running.', txt) |
---|
14 | color='green'; |
---|
15 | elseif strcmp('Central is OK, and delivering Timing Synchro', txt) |
---|
16 | color='green'; |
---|
17 | elseif strcmp('Linac system up and running.', txt) |
---|
18 | color='green'; |
---|
19 | elseif strcmp('Local board is up and running. be careful: there is at least 1 soft address', txt) |
---|
20 | color='green'; |
---|
21 | elseif strcmp('Local board is no more declenching. all events are equal to 0', txt) |
---|
22 | color='yellow'; |
---|
23 | elseif strcmp('Local board is no more declenching. try to execute Update', txt) |
---|
24 | color='magenta'; |
---|
25 | else |
---|
26 | color='red'; |
---|
27 | end |
---|
28 | |
---|
29 | |
---|
Note: See
TracBrowser
for help on using the repository browser.