Changeset 12230 for trunk/FACT++/src


Ignore:
Timestamp:
10/22/11 19:26:19 (13 years ago)
Author:
tbretz
Message:
Added some debug options.
File:
1 edited

Legend:

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

    r12222 r12230  
    266266            {
    267267                ostringstream out;
    268                 out << "Talked to board " << id/kNumChannelsPerBoard << ", but got answer from board " <<  board << ".";
     268                out << "Talked to board " << id/kNumChannelsPerBoard << ", but got answer from board " <<  board << " (fSendCounter=" << fSendCounter << ")";
    269269                Error(out);
    270270                return false;
     
    296296    void HandleReceivedData(const vector<uint8_t> &buf, size_t bytes_received, int command, int send_counter)
    297297    {
     298#ifdef DEBUG
     299    ofstream fout("received.txt", ios::app);
     300    fout << Time() << ": ";
     301    for (int i=0; i<bytes_received; i++)
     302        fout << hex << setfill('0') << setw(2) << (uint32_t)buf[i];
     303    fout << endl;
     304#endif
     305
    298306        // Now print the received message if requested by the user
    299307        if (fIsVerbose/* && command!=kUpdate*/)
     
    432440        {
    433441            if (err==ba::error::eof)
    434                 Warn("Connection closed by remote host (BIAS).");
     442            {
     443                ostringstream msg;
     444                msg << "Connection closed by remote host (BIAS, fSendCounter=" << fSendCounter << ")";
     445                Warn(msg);
     446            }
    435447
    436448            // 107: Transport endpoint is not connected (bs::error_code(107, bs::system_category))
Note: See TracChangeset for help on using the changeset viewer.