Ignore:
Timestamp:
06/20/11 18:26:11 (13 years ago)
Author:
tbretz
Message:
Added commands DUMP_STREAM and DUMP_RECV to have better access to the behaviour of the sockets.
File:
1 edited

Legend:

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

    r11080 r11082  
    947947        for (int i=slot[0]; i<=slot[1]; i++)
    948948            SetIgnore(i, block);
     949
     950        return T::GetCurrentState();
     951    }
     952
     953    int SetDumpStream(const EventImp &evt)
     954    {
     955        if (!CheckEventSize(evt.GetSize(), "SetDumpStream", 1))
     956            return T::kSM_FatalError;
     957
     958        SetDebugStream(evt.Get<uint8_t>());
     959
     960        return T::GetCurrentState();
     961    }
     962
     963    int SetDumpRecv(const EventImp &evt)
     964    {
     965        if (!CheckEventSize(evt.GetSize(), "SetDumpRecv", 1))
     966            return T::kSM_FatalError;
     967
     968        SetDebugRead(evt.Get<uint8_t>());
    949969
    950970        return T::GetCurrentState();
     
    13341354
    13351355        // Verbosity commands
    1336         T::AddEvent("SET_VERBOSE", "B")
     1356        T::AddEvent("SET_VERBOSE", "B:1")
    13371357            (boost::bind(&StateMachineFAD::SetVerbosity, this, _1))
    13381358            ("set verbosity state"
    13391359             "|verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data");
    13401360
    1341         T::AddEvent("SET_HEX_OUTPUT", "B")
     1361        T::AddEvent("SET_HEX_OUTPUT", "B:1")
    13421362            (boost::bind(&StateMachineFAD::SetHexOutput, this, _1))
    13431363            ("enable or disable hex output for received data"
    13441364             "|hexout[bool]:disable or enable hex output for received data (yes/no)");
    13451365
    1346         T::AddEvent("SET_DATA_OUTPUT", "B")
     1366        T::AddEvent("SET_DATA_OUTPUT", "B:1")
    13471367            (boost::bind(&StateMachineFAD::SetDataOutput, this, _1))
    13481368            ("");
    13491369
    1350         T::AddEvent("PRINT_EVENT", "I")
     1370        T::AddEvent("PRINT_EVENT", "I:1")
    13511371            (boost::bind(&StateMachineFAD::PrintEvent, this, _1))
    13521372            ("Print (last) event"
    13531373             "|board[int]:slot from which the event should be printed (-1 for all)");
     1374
     1375        T::AddEvent("DUMP_STREAM", "B:1")
     1376            (boost::bind(&StateMachineFAD::SetDumpStream, this, _1))
     1377            ("For debugging purpose: the binary data stream read from the sockets 0-7 can be dumped to files."
     1378             "|switch[bool]:Enable (yes) or disable (no)");
     1379
     1380        T::AddEvent("DUMP_RECV", "B:1")
     1381            (boost::bind(&StateMachineFAD::SetDumpRecv, this, _1))
     1382            ("For debugging purpose: the times when data has been receives are dumped to a file."
     1383             "|switch[bool]:Enable (yes) or disable (no)");
    13541384
    13551385        T::AddEvent("BLOCK_TRANSMISSION", "S:1;B:1")
Note: See TracChangeset for help on using the changeset viewer.