source: trunk/FACT++/scripts/handleFtuCheck.js@ 16853

Last change on this file since 16853 was 14968, checked in by tbretz, 12 years ago
Replaced dim.print by dim.log
File size: 735 bytes
Line 
1function handleFtuCheck(wait_state)
2{
3 var service = this.ftuList.get();
4 if (!service.obj || service.obj.length==0)
5 return undefined;
6
7 if (!wait_state)
8 {
9 dim.send("FTM_CONTOL/PING");
10 return toString(service.counter);
11 }
12
13 if (toInt(wait_state)==service.counter)
14 return wait_state;
15
16 var ping = service.data['Ping'];
17 for (var i=0; i<40; i++)
18 {
19 if (ping[i]==1)
20 continue;
21
22 dim.log("Problems in the FTU communication found.");
23 dim.log("Send command to disable all FTUs.");
24 dim.log(" => Power cycle needed.");
25 dim.send("FTM_CONTOL/ENABLE_FTU", -1, false);
26 throw new Error("CrateReset[FTU]");
27 }
28
29 return "";
30}
Note: See TracBrowser for help on using the repository browser.