source: trunk/FACT++/scripts/handleFscConnected.js@ 16336

Last change on this file since 16336 was 14763, checked in by neise, 12 years ago
initial include
File size: 678 bytes
Line 
1// Get FSC connected
2function handleFscConnected(wait_state)
3{
4 var state = dim.state("FSC_CONTROL");
5 if (state===undefined)
6 return undefined;
7
8 if (wait_state && wait_state.length>0 && state.name!=wait_state)
9 return wait_state;
10
11 //console.out("FSC_CONTROL: "+state.name+"["+state.index+"]");
12
13 switch (state.name)
14 {
15 // Do-nothing conditions
16 case "Disconnected":
17 console.out("Fsc in Diconnected... connect.");
18 dim.send("FSC_CONTROL/RECONNECT");
19 return "Connected";
20
21 case "Connected":
22 return "";
23 }
24
25 throw new Error("FSC_CONTROL:"+state.name+"["+state.index+"] unknown or not handled.");
26}
Note: See TracBrowser for help on using the repository browser.