Changeset 12213


Ignore:
Timestamp:
10/20/11 11:33:23 (13 years ago)
Author:
tbretz
Message:
Improved error messages; switched to hardware flow control -- does this make any sense?
File:
1 edited

Legend:

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

    r11979 r12213  
    8282        if (ec)
    8383            Error("Closing "+URL()+": "+ec.message());
    84     }
    85 
    86     // Reset the connection status
    87     fConnectionStatus = kDisconnected;
     84        else
     85            Info("Connection closed succesfully.");
     86    }
    8887
    8988    // Stop deadline counters
    9089    fInTimeout.cancel();
    9190    fOutTimeout.cancel();
     91
     92    // Reset the connection status
     93    fConnectionStatus = kDisconnected;
    9294
    9395    // Empty output queue
     
    244246    fConnectionStatus = kConnecting;
    245247
     248    Info("Connecting to "+URL()+".");
     249
    246250    bs::error_code ec;
    247251    open(URL(), ec);
    248252
    249     ostringstream msg;
    250     msg << "Connecting to " << URL() << "... ";
    251253    if (ec)
    252         msg << " " << ec.message() << " (" << ec << ")";
    253     else
    254         msg << "success.";
    255 
    256     if (ec)
    257     {
     254    {
     255        ostringstream msg;
     256        msg << "Error opening " << URL() << "... " << ec.message() << " (" << ec << ")";
    258257        Error(msg);
    259258        fConnectionStatus = kDisconnected;
     
    261260    }
    262261
    263     Info(msg);
     262    Info("Connection established.");
    264263
    265264    try
     
    296295fBaudRate(115200),
    297296fCharacterSize(8), fParity(parity::none), fStopBits(stop_bits::one),
    298 fFlowControl(flow_control::none),
     297fFlowControl(flow_control::hardware),
    299298fInTimeout(ioservice), fOutTimeout(ioservice),
    300299fConnectionStatus(kDisconnected)
Note: See TracChangeset for help on using the changeset viewer.