Changeset 2519 in ntrip for trunk/BNC/bncgetthread.cpp
- Timestamp:
- Aug 3, 2010, 12:10:19 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncgetthread.cpp
r2518 r2519 75 75 // Constructor 1 76 76 //////////////////////////////////////////////////////////////////////////// 77 bncGetThread::bncGetThread(const QByteArray& rawInpFileName, 78 const QByteArray& format) { 79 80 _rawInpFile = new QFile(rawInpFileName); 81 _rawInpFile->open(QIODevice::ReadOnly); 82 _format = format; 83 _staID = rawInpFileName.mid( 84 rawInpFileName.lastIndexOf(QDir::separator())+1,5); 85 86 _rawOutput = false; 87 77 bncGetThread::bncGetThread(bncRawFile* rawFile) { 78 79 _rawFile = rawFile; 80 _format = rawFile->format(); 81 _staID = rawFile->staID(); 82 _rawOutput = false; 88 83 _ntripVersion = "N"; 89 84 … … 99 94 const QByteArray& nmea, 100 95 const QByteArray& ntripVersion, const QByteArray& extraStaID) { 101 _raw InpFile= 0;96 _rawFile = 0; 102 97 _mountPoint = mountPoint; 103 98 _staID = (extraStaID.size() == 0 ? mountPoint.path().mid(1).toAscii() : extraStaID); … … 305 300 _format.indexOf("RTCM 3") != -1 ) { 306 301 emit(newMessage(_staID + ": Get data in RTCM 3.x format", true)); 307 bool inputFromFile = false; 308 if (_rawInpFile != 0) { 309 inputFromFile = true; 310 } 311 _decoder = new RTCM3Decoder(_staID, inputFromFile); 302 _decoder = new RTCM3Decoder(_staID, bool(_rawFile != 0)); 312 303 connect((RTCM3Decoder*) _decoder, SIGNAL(newMessage(QByteArray,bool)), 313 304 this, SIGNAL(newMessage(QByteArray,bool))); … … 348 339 delete _decoder; 349 340 delete _rnx; 350 delete _raw InpFile;341 delete _rawFile; 351 342 delete _serialOutFile; 352 343 delete _serialPort; … … 395 386 _query->waitForReadyRead(data); 396 387 } 397 else if (_rawInpFile) { 398 const qint64 maxBytes = 1024; 399 data = _rawInpFile->read(maxBytes); 400 401 //// beg test 402 msleep(10); 403 //// end test 388 else if (_rawFile) { 389 data = _rawFile->read(); 404 390 405 391 if (data.isEmpty()) { … … 457 443 // Check observation epoch 458 444 // ----------------------- 459 if (!_raw InpFile && !dynamic_cast<gpssDecoder*>(_decoder)) {445 if (!_rawFile && !dynamic_cast<gpssDecoder*>(_decoder)) { 460 446 int week; 461 447 double sec; … … 525 511 // Start a new query 526 512 // ----------------- 527 if (!_raw InpFile) {513 if (!_rawFile) { 528 514 529 515 sleep(_nextSleep);
Note:
See TracChangeset
for help on using the changeset viewer.