Changeset 2035 in ntrip for trunk/BNC/bncgetthread.cpp
- Timestamp:
- Nov 26, 2009, 2:22:40 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncgetthread.cpp
r2032 r2035 63 63 #include "bncsettings.h" 64 64 #include "latencychecker.h" 65 #include "bncppp thread.h"65 #include "bncpppclient.h" 66 66 67 67 #include "RTCM/RTCM2Decoder.h" … … 123 123 _nextSleep = 0; 124 124 _rawOutFile = 0; 125 _PPP thread= 0;125 _PPPclient = 0; 126 126 127 127 bncSettings settings; … … 284 284 // _rawOutFile->open(QIODevice::WriteOnly); 285 285 286 // Initialize PPP Cli net?286 // Initialize PPP Client? 287 287 // ---------------------- 288 bool pppClient = false;289 288 if (settings.value("pppMount").toString() == _staID) { 290 pppClient = true; 289 _PPPclient = new bncPPPclient(_staID); 290 connect(((bncApp*)qApp), SIGNAL(newEphGPS(gpsephemeris)), 291 _PPPclient, SLOT(slotNewEphGPS(gpsephemeris))); 292 connect(((bncApp*)qApp), SIGNAL(newCorrections(QList<QString>)), 293 _PPPclient, SLOT(slotNewCorrections(QList<QString>))); 291 294 } 292 295 … … 297 300 emit(newMessage(_staID + ": Get data in RTCM 2.x format", true)); 298 301 _decoder = new RTCM2Decoder(_staID.data()); 299 if (pppClient) {300 _PPPthread = new bncPPPthread(_staID);301 }302 302 } 303 303 else if (_format.indexOf("RTCM_3") != -1 || _format.indexOf("RTCM3") != -1 || … … 307 307 connect((RTCM3Decoder*) _decoder, SIGNAL(newMessage(QByteArray,bool)), 308 308 this, SIGNAL(newMessage(QByteArray,bool))); 309 if (pppClient) {310 _PPPthread = new bncPPPthread(_staID);311 }312 309 } 313 310 else if (_format.indexOf("RTIGS") != -1) { 314 311 emit(newMessage(_staID + ": Get data in RTIGS format", true)); 315 312 _decoder = new RTIGSDecoder(); 316 if (pppClient) {317 _PPPthread = new bncPPPthread(_staID);318 }319 313 } 320 314 else if (_format.indexOf("GPSS") != -1 || _format.indexOf("BNC") != -1) { … … 333 327 _latencyChecker = new latencyChecker(_staID); 334 328 335 if (_PPPthread) {336 connect(((bncApp*)qApp), SIGNAL(newEphGPS(gpsephemeris)),337 _PPPthread, SLOT(slotNewEphGPS(gpsephemeris)));338 connect(((bncApp*)qApp), SIGNAL(newCorrections(QList<QString>)),339 _PPPthread, SLOT(slotNewCorrections(QList<QString>)));340 //// _PPPthread->start(); // currently processing in the same thread341 }342 343 329 msleep(100); //sleep 0.1 sec 344 330 } … … 347 333 //////////////////////////////////////////////////////////////////////////// 348 334 bncGetThread::~bncGetThread() { 349 350 if (_PPPthread) {351 _PPPthread->terminate();352 }353 354 335 if (isRunning()) { 355 336 wait(); 356 337 } 357 358 338 if (_query) { 359 339 _query->stop(); 360 340 _query->deleteLater(); 361 341 } 342 delete _PPPclient; 362 343 delete _decoder; 363 344 delete _rnx; … … 501 482 // PPP Client 502 483 // ---------- 503 if (_PPP thread) {504 _PPP thread->putNewObs(obs);484 if (_PPPclient) { 485 _PPPclient->putNewObs(obs); 505 486 } 506 487
Note:
See TracChangeset
for help on using the changeset viewer.