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

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