Changeset 10077
- Timestamp:
- 01/05/11 11:30:12 (14 years ago)
- Location:
- fact/FADctrl
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/FADctrl/FAD.cc
r10036 r10077 39 39 {"cancel", &FAD::cmd_cancel, false, 0, "", "Cancel current operation"}, 40 40 {"update", &FAD::cmd_update, false, 1, "<sec>", "Minimum delay between updates to DIM event service"}, 41 {"socketmode", &FAD::cmd_socketmode, true, 1, "<com|daq>", "Choose which Sockets are used for data transmission"}, 41 42 {"exit", &FAD::cmd_exit, true, 0, "", "Exit program"}, 42 43 {"help", &FAD::cmd_help, false, 0, "", "Print help"}}; … … 69 70 70 71 // Construct boards 71 BoardList = Tokenize(GetConfig("BoardList","192.33.99.225")); 72 73 // ETHZ 74 //BoardList = Tokenize(GetConfig("BoardList","192.33.99.225")); 75 // TUDO 76 BoardList = Tokenize(GetConfig("BoardList","129.217.160.119")); 72 77 73 78 for (unsigned int i=0; i<BoardList.size(); i++) { … … 190 195 else PrintUsage(); 191 196 } 197 198 // 199 // Switch which sockets are used to send data away 200 // case parameter is: "com" - command mode is enabled. 201 // thus only socket 0 is used 202 // case parameter is: "daq" - daq mode is enabled 203 // thus only sockets 1 - 7 are used. 204 // 205 // note: socket 0 is always used to issue commands 206 // 207 void FAD::cmd_socketmode() { 208 209 for (unsigned int i=0; i<Boards.size(); i++) { 210 if (Match(Parameter[1],"com")) Boards[i]->Send(CMD_Stop); 211 else if (Match(Parameter[1],"daq")) Boards[i]->Send(CMD_Start); 212 } 213 214 if (Match(Parameter[1],"com")) PrintMessage("all active boards switched to command mode - socket 0\n"); 215 else if (Match(Parameter[1],"daq")) PrintMessage("all active boards switched to DAQ mode - socket 1..7\n"); 216 else PrintUsage(); 217 } 218 192 219 193 220 // -
fact/FADctrl/FAD.h
r10036 r10077 66 66 void cmd_board(); void cmd_status(); 67 67 void cmd_acalib(); void cmd_serial(); 68 void cmd_trigger(); 68 void cmd_trigger(); void cmd_socketmode(); 69 69 void cmd_srclk(); void cmd_sclk(); 70 70 void cmd_dwrite(); void cmd_domino(); -
fact/FADctrl/FADctrl.cc
r10036 r10077 116 116 void OpenOtherSockets() { 117 117 118 static char Hostname[] = "192.33.99.225"; 118 //ETHZ 119 //static char Hostname[] = "192.33.99.225"; 120 //TUDO 121 static char Hostname[] = "129.217.160.119"; 119 122 int List[] = {5001, 5002, 5003, 5004, 5005, 5006, 5007}; 120 123 int Socket[sizeof(List)/sizeof(int)], MaxSocketNum=0, Ret;
Note:
See TracChangeset
for help on using the changeset viewer.