Changeset 11232 for fact/FADctrl


Ignore:
Timestamp:
07/01/11 09:15:47 (13 years ago)
Author:
neise
Message:
supports firmware v0206
Location:
fact/FADctrl
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • fact/FADctrl/FAD.cc

    r11205 r11232  
    2828   {"sclk", &FAD::cmd_sclk, true, 1, "<on|off>", "Set SCLK"},
    2929   {"trigger", &FAD::cmd_trigger, false, 0, "[n|cont [rate]|stop|enable|disable]", "Issue software triggers"},
     30   {"drsreset", &FAD::cmd_drsreset, true, 1, "<low|high>", "set DRS reset line"},
    3031   {"reset", &FAD::cmd_reset, true, 0, "", "Reset internal trigger counter"},
    3132   {"runnumber", &FAD::cmd_runnumber, true, 1, "<n>", "Set runnumber"},
     
    205206  for (unsigned int i=0; i<Boards.size(); i++) Boards[i]->Send(CMD_RESET_TRIGGER_ID);
    206207}
     208
     209
     210//
     211// Set DRS reset line
     212//
     213void FAD::cmd_drsreset() {
     214
     215  for (unsigned int i=0; i<Boards.size(); i++) {
     216        if (Match(Parameter[1],"low")) Boards[i]->Send(CMD_DRS_RST_LOW);
     217        else if (Match(Parameter[1],"high")) Boards[i]->Send(CMD_DRS_RST_HIGH);
     218        else {
     219          PrintUsage();
     220          return;
     221        }
     222  }
     223}
     224
    207225
    208226//
  • fact/FADctrl/FAD.h

    r11205 r11232  
    2323#include "../drsdaq/RawDataCTX.h"
    2424
    25 const unsigned int PORT = 5000;
     25const unsigned int PORT = 31919;
    2626const int DEFAULT_NUM_CALIB_EVENTS = 100;
    2727const char CALIB_DIRECTORY[] = "~/";
     
    7373        void cmd_trigger();             void cmd_socketmode();
    7474        void cmd_runnumber();   void cmd_reset();
     75        void cmd_drsreset();
    7576        void cmd_execute();
    7677        void cmd_srclk();               void cmd_sclk();
  • fact/FADctrl/FADBoard.cc

    r11205 r11232  
    664664void FADBoard::threadHandler() {
    665665
    666   int List[] = {5001, 5002, 5003, 5004, 5005, 5006, 5007};
     666  //int List[] = {5001, 5002, 5003, 5004, 5005, 5006, 5007};
     667  int List[] = {31920, 31921, 31922, 31923, 31924, 31925, 31926};
    667668  int Socket[sizeof(List)/sizeof(int)], MaxSocketNum, Ret;
    668669  fd_set DescriptorList;
  • fact/FADctrl/FADFormat.h

    r10969 r11232  
    2525#define CMD_SRCLK_ON 0x1500
    2626#define CMD_SRCLK_OFF 0x1600
    27 #define CMD_Trigger_C 0xB000    // continous trigger
     27#define CMD_Trigger_C 0x1F00    // continous trigger
    2828#define CMD_Trigger_S 0x2000    // stop continous trigger
    2929
     
    3535#define CMD_TRIGGERS_ON 0x1800  // enables the trigger line
    3636#define CMD_TRIGGERS_OFF 0x1900 // disables the trigger line
     37
     38#define CMD_DRS_RST_LOW 0x3200
     39#define CMD_DRS_RST_HIGH 0x3300
     40
    3741
    3842//
Note: See TracChangeset for help on using the changeset viewer.