Changeset 6065 in ntrip for trunk/BNC/src/PPP_free
- Timestamp:
- Sep 7, 2014, 9:58:10 AM (10 years ago)
- Location:
- trunk/BNC/src/PPP_free
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP_free/bncmodel.cpp
r6064 r6065 590 590 // ---------------------- 591 591 if (update_p(epoData) != success) { 592 _pppClient->emitNewMessage(_log, false);592 LOG << _log.data() << endl; 593 593 return failure; 594 594 } … … 642 642 strB << '\n'; 643 643 _log += strB.str().c_str(); 644 _pppClient->emitNewMessage(_log, false);644 LOG << _log.data() << endl; 645 645 646 646 // Final Message (both log file and screen) … … 675 675 } 676 676 677 _pppClient->emitNewMessage(QByteArray(strC.str().c_str()), true);677 LOG << strC.str() << endl; 678 678 679 679 delete newPos; -
trunk/BNC/src/PPP_free/bncpppclient.cpp
r6055 r6065 55 55 // Constructor 56 56 //////////////////////////////////////////////////////////////////////////// 57 bncPPPclient::bncPPPclient(QByteArray staID, t_pppOptions* opt, bool connectSlots) : 58 bncEphUser(connectSlots) { 59 60 if (opt) { 61 _opt = opt; 62 _optOwner = false; 63 } 64 else { 65 _opt = new t_pppOptions(); 66 _optOwner = true; 67 } 68 57 bncPPPclient::bncPPPclient(QByteArray staID, t_pppOptions* opt) : bncEphUser(false) { 58 59 _opt = opt; 69 60 _staID = staID; 70 71 61 _model = new bncModel(this); 72 73 if (connectSlots) {74 connect(this, SIGNAL(newMessage(QByteArray,bool)),75 BNC_CORE, SLOT(slotMessage(const QByteArray,bool)));76 77 connect(BNC_CORE, SIGNAL(newCorrections(QList<QString>)),78 this, SLOT(slotNewCorrections(QList<QString>)));79 80 connect(BNC_CORE, SIGNAL(providerIDChanged(QString)),81 this, SLOT(slotProviderIDChanged(QString)));82 }83 62 } 84 63 … … 86 65 //////////////////////////////////////////////////////////////////////////// 87 66 bncPPPclient::~bncPPPclient() { 88 delete _model;89 67 while (!_epoData.empty()) { 90 68 delete _epoData.front(); … … 101 79 delete ib.value(); 102 80 } 103 if (_optOwner) { 104 delete _opt; 105 } 81 delete _model; 106 82 } 107 83 … … 257 233 // 258 234 //////////////////////////////////////////////////////////////////////////// 259 void bncPPPclient:: slotNewCorrections(QList<QString> corrList) {235 void bncPPPclient::putNewCorrections(QList<QString> corrList) { 260 236 QMutexLocker locker(&_mutex); 261 237 … … 472 448 } 473 449 474 emit newMessage(msg.toAscii(), false);450 LOG << msg.toAscii() << endl; 475 451 #endif // BNC_DEBUG 476 452 … … 493 469 // --------------- 494 470 if (_model->update(_epoData.front()) == success) { 495 emit newPosition(_model->time(), _model->x(), _model->y(), _model->z());471 /// emit newPosition(_model->time(), _model->x(), _model->y(), _model->z()); 496 472 } 497 473 } … … 533 509 } 534 510 } 535 536 //537 ////////////////////////////////////////////////////////////////////////////538 void bncPPPclient::slotProviderIDChanged(QString mountPoint) {539 QMutexLocker locker(&_mutex);540 541 if (mountPoint != QString(_opt->_corrMount.c_str())) {542 return;543 }544 emit newMessage("bncPPPclient " + _staID + ": Provider Changed: " + mountPoint.toAscii() + "\n", true);545 546 delete _model;547 _model = new bncModel(this);548 549 while (!_epoData.empty()) {550 delete _epoData.front();551 _epoData.pop();552 }553 554 QMapIterator<QString, t_corr*> ic(_corr);555 while (ic.hasNext()) {556 ic.next();557 delete ic.value();558 }559 _corr.clear();560 561 QMapIterator<QString, t_bias*> ib(_bias);562 while (ib.hasNext()) {563 ib.next();564 delete ib.value();565 }566 _bias.clear();567 } -
trunk/BNC/src/PPP_free/bncpppclient.h
r6055 r6065 117 117 118 118 class bncPPPclient : public bncEphUser { 119 Q_OBJECT 119 public: 120 bncPPPclient(QByteArray staID, t_pppOptions* opt); 121 ~bncPPPclient(); 122 void putNewObs(const t_obs& pp); 123 void putNewCorrections(QList<QString> corrList); 120 124 121 public: 122 bncPPPclient(QByteArray staID, t_pppOptions* opt = 0, bool connectSlots = true); 123 ~bncPPPclient(); 124 void putNewObs(const t_obs& pp); 125 static t_irc applyCorr(const bncTime& tt, const t_corr* cc, ColumnVector& xc, 126 ColumnVector& vv); 127 QByteArray staID() const {return _staID;} 125 QByteArray staID() const {return _staID;} 128 126 const t_pppOptions* opt() const {return _opt;} 129 void emitNewMessage(QByteArray msg, bool showOnScreen) {130 emit newMessage(msg, showOnScreen);131 }132 void emitNewNMEAstr(QByteArray str) {133 emit newNMEAstr(str);134 }135 127 136 public slots: 137 void slotNewCorrections(QList<QString> corrList); 138 void slotProviderIDChanged(QString mountPoint); 128 static t_irc applyCorr(const bncTime& tt, const t_corr* cc, ColumnVector& xc, ColumnVector& vv); 139 129 140 signals:141 void newMessage(QByteArray msg, bool showOnScreen);142 void newPosition(bncTime time, double x, double y, double z);143 void newNMEAstr(QByteArray str);144 130 145 131 private: … … 163 149 t_irc cmpToT(t_satData* satData); 164 150 165 t_pppOptions* _opt; 166 bool _optOwner; 151 const t_pppOptions* _opt; 167 152 QByteArray _staID; 168 153 QMap<QString, t_corr*> _corr;
Note:
See TracChangeset
for help on using the changeset viewer.