- Timestamp:
- Jul 31, 2014, 4:16:10 PM (10 years ago)
- Location:
- trunk/BNC/src/PPP
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppThread.cpp
r5730 r5731 28 28 * ------------------------------------------------------------------------- 29 29 * 30 * Class: t_pppThread 30 * Class: t_pppThread, t_pppRun 31 31 * 32 32 * Purpose: Single PPP Client (running in its own thread) … … 60 60 //////////////////////////////////////////////////////////////////////////// 61 61 t_pppThread::~t_pppThread() { 62 delete _pppRun; 62 63 cout << "~t_pppThread" << endl; 63 64 } … … 69 70 cout << _opt._roverName << " run" << endl; 70 71 71 // Connect to BNC Signals 72 // ---------------------- 72 _pppRun = new t_pppRun(_opt); 73 QThread::exec(); 74 75 cout << _opt._roverName << " exit" << endl; 76 } 77 78 // Constructor 79 //////////////////////////////////////////////////////////////////////////// 80 t_pppRun::t_pppRun(const t_options& opt) { 81 _opt = opt; 82 73 83 if (BNC_CORE->caster()) { 74 84 connect(BNC_CORE->caster(), SIGNAL(newObs(QByteArray, QList<t_obs>)), … … 87 97 this, SLOT(slotNewCorrections(QList<QString>))); 88 98 } 89 90 // Start processing loop 91 // --------------------- 92 QThread::exec(); 99 } 93 100 94 cout << _opt._roverName << " exit" << endl; 101 // Destructor 102 //////////////////////////////////////////////////////////////////////////// 103 t_pppRun::~t_pppRun() { 104 cout << "~t_pppRun" << endl; 95 105 } 96 106 97 107 // 98 108 //////////////////////////////////////////////////////////////////////////// 99 void t_ppp Thread::slotNewEphGPS(gpsephemeris gpseph) {109 void t_pppRun::slotNewEphGPS(gpsephemeris gpseph) { 100 110 QMutexLocker locker(&_mutex); 101 111 cout << _opt._roverName << " slotNewEphGPS" << endl; … … 104 114 // 105 115 //////////////////////////////////////////////////////////////////////////// 106 void t_ppp Thread::slotNewEphGlonass(glonassephemeris gloeph) {116 void t_pppRun::slotNewEphGlonass(glonassephemeris gloeph) { 107 117 QMutexLocker locker(&_mutex); 108 118 cout << _opt._roverName << " slotNewEphGlonass" << endl; … … 111 121 // 112 122 //////////////////////////////////////////////////////////////////////////// 113 void t_ppp Thread::slotNewEphGalileo(galileoephemeris /* galeph */) {123 void t_pppRun::slotNewEphGalileo(galileoephemeris /* galeph */) { 114 124 QMutexLocker locker(&_mutex); 115 125 cout << _opt._roverName << " slotNewEphGalileo" << endl; … … 118 128 // 119 129 //////////////////////////////////////////////////////////////////////////// 120 void t_ppp Thread::slotNewCorrections(QList<QString> corrList) {130 void t_pppRun::slotNewCorrections(QList<QString> corrList) { 121 131 QMutexLocker locker(&_mutex); 122 132 cout << _opt._roverName << " slotNewCorrections" << endl; … … 124 134 // 125 135 //////////////////////////////////////////////////////////////////////////// 126 void t_ppp Thread::slotNewObs(QByteArray staID, QList<t_obs> obsList) {136 void t_pppRun::slotNewObs(QByteArray staID, QList<t_obs> obsList) { 127 137 QMutexLocker locker(&_mutex); 128 138 cout << _opt._roverName << " slotNewObs" << endl; -
trunk/BNC/src/PPP/pppThread.h
r5723 r5731 10 10 namespace BNC { 11 11 12 class t_ppp Thread : public QThread{12 class t_pppRun : public QObject { 13 13 Q_OBJECT 14 15 14 public: 16 t_pppThread(const t_options* opt); 17 ~t_pppThread(); 18 virtual void run(); 15 t_pppRun(const t_options& opt); 16 ~t_pppRun(); 19 17 20 18 public slots: … … 30 28 }; 31 29 30 class t_pppThread : public QThread { 31 public: 32 t_pppThread(const t_options* opt); 33 ~t_pppThread(); 34 virtual void run(); 35 36 private: 37 t_options _opt; 38 t_pppRun* _pppRun; 39 }; 40 32 41 } 33 42
Note:
See TracChangeset
for help on using the changeset viewer.