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

Last change on this file since 14782 was 14763, checked in by neise, 12 years ago
initial include
File size: 741 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.print("Problems in the FTU communication found.");
23 dim.print("Send command to disable all FTUs.");
24 dim.print(" => 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.