Changeset 11379 for trunk


Ignore:
Timestamp:
07/13/11 18:37:57 (13 years ago)
Author:
tbretz
Message:
Updated the behaviour of the configure command; allow all possible values to be send as trigger rate; fixed increasing of the run-number when a new run is started.
File:
1 edited

Legend:

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

    r11377 r11379  
    802802            return T::kSM_FatalError;
    803803
    804         if (evt.GetUShort()>0xff)
     804        if (evt.GetUShort()>0xffff)
    805805        {
    806806            ostringstream msg;
    807             msg << hex << "Value " << evt.GetUShort() << " out of range, max=" << 0xff << "(?)";
     807            msg << hex << "Value " << evt.GetUShort() << " out of range, max=" << 0xffff << "(?)";
    808808            T::Error(msg);
    809809            return false;
     
    10801080        }
    10811081
    1082         T::Message("Starting configuration for '"+name+"'");
     1082        ostringstream str;
     1083        str << "Starting configuration for run " << GetRunNumber() << " (" << name << ")";
     1084        T::Message(str.str());
     1085
     1086        const uint32_t runno = IncreaseRunNumber();
    10831087
    10841088        for (BoardList::iterator it=fBoards.begin(); it!=fBoards.end(); it++)
     
    11051109
    11061110            fad.CmdSetTriggerRate(conf.fTriggerRate);
    1107             fad.CmdSetRunNumber(IncreaseRunNumber());
     1111            fad.CmdSetRunNumber(runno);
    11081112            fad.Cmd(FAD::kCmdResetEventCounter);
    11091113            fad.Cmd(FAD::kCmdSingleTrigger);
     
    16151619            "|val[short]:Value to be set");
    16161620
    1617         T::AddEvent("CONFIGURE", "C", FAD::kConnected)
     1621        T::AddEvent("CONFIGURE", "C", FAD::kConnected, FAD::kConfigured)
    16181622            (boost::bind(&StateMachineFAD::StartConfigure, this, _1))
    16191623            ("");
    16201624
    1621         T::AddEvent("RESET_CONFIGURE", FAD::kConfiguring)
     1625        T::AddEvent("RESET_CONFIGURE", FAD::kConfiguring, FAD::kConfigured)
    16221626            (boost::bind(&StateMachineFAD::ResetConfig, this))
    16231627            ("");
Note: See TracChangeset for help on using the changeset viewer.