source: MML/trunk/machine/SOLEIL/common/synchro/state_txt.m @ 4

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 
1function [txt, color]=state_txt(txt)
2% Manage state string from synchro
3
4tf = isstrprop(txt, 'cntrl');
5[C,I] = max(tf);
6if I==1
7    n=length(txt);
8else
9    n=I-1;
10end
11txt=txt(1:n);
12
13if strcmp('Local board is up and running.', txt)
14    color='green';
15elseif strcmp('Central is OK, and delivering Timing Synchro', txt)
16    color='green';
17elseif strcmp('Linac system up and running.', txt)
18    color='green'; 
19elseif     strcmp('Local board is up and running. be careful: there is at least 1 soft address', txt)
20    color='green';
21elseif     strcmp('Local board is no more declenching. all events are equal to 0', txt)
22    color='yellow';
23elseif     strcmp('Local board is no more declenching. try to execute Update', txt)
24    color='magenta';
25else
26    color='red';
27end
28   
29
Note: See TracBrowser for help on using the repository browser.