Changeset 11609 for trunk/FACT++/src


Ignore:
Timestamp:
07/26/11 13:01:08 (13 years ago)
Author:
tbretz
Message:
Updated allowed states.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/fadctrl.cc

    r11588 r11609  
    15311531
    15321532        // FAD Commands
    1533         T::AddEvent("SEND_CMD", "I:1")
     1533        T::AddEvent("SEND_CMD", "I:1", FAD::kConnecting, FAD::kConnected)
    15341534            (bind(&StateMachineFAD::SendCmd, this, placeholders::_1))
    15351535            ("Send a command to the FADs. Values between 0 and 0xffff are allowed."
    15361536             "|command[uint16]:Command to be transmittted.");
    1537         T::AddEvent("SEND_DATA", "I:2")
     1537        T::AddEvent("SEND_DATA", "I:2", FAD::kConnecting, FAD::kConnected)
    15381538            (bind(&StateMachineFAD::SendCmdData, this, placeholders::_1))
    15391539            ("Send a command with data to the FADs. Values between 0 and 0xffff are allowed."
     
    15411541             "|data[uint16]:Data to be sent with the command.");
    15421542
    1543         T::AddEvent("ENABLE_SRCLK", "B:1")
     1543        T::AddEvent("ENABLE_SRCLK", "B:1", FAD::kConnecting, FAD::kConnected)
    15441544            (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdSrclk))
    15451545            ("Set SRCLK");
    1546         T::AddEvent("ENABLE_BUSY", "B:1")
     1546        T::AddEvent("ENABLE_BUSY", "B:1", FAD::kConnecting, FAD::kConnected)
    15471547            (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdBusy))
    15481548            ("Set BUSY");
    1549         T::AddEvent("ENABLE_SCLK", "B:1")
     1549        T::AddEvent("ENABLE_SCLK", "B:1", FAD::kConnecting, FAD::kConnected)
    15501550            (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdSclk))
    15511551            ("Set SCLK");
    1552         T::AddEvent("ENABLE_DRS", "B:1")
     1552        T::AddEvent("ENABLE_DRS", "B:1", FAD::kConnecting, FAD::kConnected)
    15531553            (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdDrsEnable))
    15541554            ("Switch Domino wave");
    1555         T::AddEvent("ENABLE_DWRITE", "B:1")
     1555        T::AddEvent("ENABLE_DWRITE", "B:1", FAD::kConnecting, FAD::kConnected)
    15561556            (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdDwrite))
    15571557            ("Set Dwrite (possibly high / always low)");
    1558         T::AddEvent("ENABLE_CONTINOUS_TRIGGER", "B:1")
     1558        T::AddEvent("ENABLE_CONTINOUS_TRIGGER", "B:1", FAD::kConnecting, FAD::kConnected)
    15591559            (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdContTrigger))
    15601560            ("Enable continous (internal) trigger.");
    1561         T::AddEvent("ENABLE_TRIGGER_LINE", "B:1")
     1561        T::AddEvent("ENABLE_TRIGGER_LINE", "B:1", FAD::kConnecting, FAD::kConnected)
    15621562            (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdTriggerLine))
    15631563            ("Incoming triggers can be accepted/will not be accepted");
    1564         T::AddEvent("ENABLE_COMMAND_SOCKET_MODE", "B:1")
     1564        T::AddEvent("ENABLE_COMMAND_SOCKET_MODE", "B:1", FAD::kConnecting, FAD::kConnected)
    15651565            (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdSocket))
    15661566            ("Set debug mode (yes: dump events through command socket, no=dump events through other sockets)");
    15671567
    1568         T::AddEvent("SET_TRIGGER_RATE", "I:1")
     1568        T::AddEvent("SET_TRIGGER_RATE", "I:1", FAD::kConnecting, FAD::kConnected)
    15691569            (bind(&StateMachineFAD::SetTriggerRate, this, placeholders::_1))
    15701570            ("Enable continous trigger");
    1571         T::AddEvent("SEND_SINGLE_TRIGGER")
     1571        T::AddEvent("SEND_SINGLE_TRIGGER", FAD::kConnecting, FAD::kConnected)
    15721572            (bind(&StateMachineFAD::Trigger, this, 1))
    15731573            ("Issue software triggers");
    1574         T::AddEvent("SEND_N_TRIGGERS", "I")
     1574        T::AddEvent("SEND_N_TRIGGERS", "I", FAD::kConnecting, FAD::kConnected)
    15751575            (bind(&StateMachineFAD::SendTriggers, this, placeholders::_1))
    15761576            ("Issue software triggers");
    1577         T::AddEvent("START_RUN", "")
     1577        T::AddEvent("START_RUN", "", FAD::kConnecting, FAD::kConnected)
    15781578            (bind(&StateMachineFAD::StartRun, this, placeholders::_1, true))
    15791579            ("Set FAD DAQ mode. when started, no configurations must be send.");
    1580         T::AddEvent("STOP_RUN")
     1580        T::AddEvent("STOP_RUN", FAD::kConnecting, FAD::kConnected)
    15811581            (bind(&StateMachineFAD::StartRun, this, placeholders::_1, false))
    15821582            ("");
    1583         T::AddEvent("PHASE_SHIFT", "S:1")
     1583        T::AddEvent("PHASE_SHIFT", "S:1", FAD::kConnecting, FAD::kConnected)
    15841584            (bind(&StateMachineFAD::PhaseShift, this, placeholders::_1))
    15851585            ("Adjust ADC phase (in 'steps')");
    15861586
    1587         T::AddEvent("RESET_EVENT_COUNTER")
     1587        T::AddEvent("RESET_EVENT_COUNTER", FAD::kConnecting, FAD::kConnected)
    15881588            (bind(&StateMachineFAD::Cmd, this, FAD::kCmdResetEventCounter))
    15891589            ("");
    15901590
    1591         T::AddEvent("SET_RUN_NUMBER", "X:1")
     1591        T::AddEvent("SET_RUN_NUMBER", "X:1", FAD::kConnecting, FAD::kConnected)
    15921592            (bind(&StateMachineFAD::SetRunNumber, this, placeholders::_1))
    15931593            ("");
     
    15981598             "|memory[short]:Buffer size in Mega-bytes.");
    15991599
    1600         T::AddEvent("SET_REGISTER", "I:2")
     1600        T::AddEvent("SET_REGISTER", "I:2", FAD::kConnecting, FAD::kConnected)
    16011601            (bind(&StateMachineFAD::SetRegister, this, placeholders::_1))
    16021602            ("set register to value"
     
    16051605
    16061606        // FIXME:  Maybe add a mask which channels should be set?
    1607         T::AddEvent("SET_REGION_OF_INTEREST", "I:2")
     1607        T::AddEvent("SET_REGION_OF_INTEREST", "I:2", FAD::kConnecting, FAD::kConnected)
    16081608            (bind(&StateMachineFAD::SetRoi, this, placeholders::_1))
    16091609            ("Set region-of-interest to value"
     
    16121612
    16131613        // FIXME:  Maybe add a mask which channels should be set?
    1614         T::AddEvent("SET_DAC_VALUE", "I:2")
     1614        T::AddEvent("SET_DAC_VALUE", "I:2", FAD::kConnecting, FAD::kConnected)
    16151615            (bind(&StateMachineFAD::SetDac, this, placeholders::_1))
    16161616            ("Set DAC numbers in range to value"
     
    16911691             "|enable[bool]:Whether the event builder should ignore data from this slot (yes) or allowed (no)");
    16921692
    1693         T::AddEvent("CLOSE_OPEN_FILES", FAD::kConnecting, FAD::kConnected)
     1693        T::AddEvent("CLOSE_OPEN_FILES", FAD::kDisconnected, FAD::kConnecting, FAD::kConnected)
    16941694            (bind(&StateMachineFAD::CloseOpenFiles, this))
    16951695            ("Close all run files opened by the EventBuilder.");
Note: See TracChangeset for help on using the changeset viewer.