Changeset 5736 in ntrip
- Timestamp:
- Aug 1, 2014, 7:49:40 AM (10 years ago)
- Location:
- trunk/BNC/src/PPP
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/options.cpp
r5712 r5736 50 50 } 51 51 52 // Destructor 53 ////////////////////////////////////////////////////////////////////////////// 54 t_options::~t_options() { 55 cout << "~t_options" << endl; 56 } 57 -
trunk/BNC/src/PPP/options.h
r5735 r5736 12 12 public: 13 13 t_options(); 14 ~t_options() {};14 ~t_options(); 15 15 bool _realTime; 16 16 std::string _roverName; -
trunk/BNC/src/PPP/pppMain.cpp
r5730 r5736 68 68 readOptions(); 69 69 70 QListIterator< QSharedPointer<t_options> > it(_options);71 while (i t.hasNext()) {72 QSharedPointer<t_options> opt = it.next();73 t_pppThread* pppThread = new t_pppThread(opt .data());70 QListIterator<t_options*> iOpt(_options); 71 while (iOpt.hasNext()) { 72 const t_options* opt = iOpt.next(); 73 t_pppThread* pppThread = new t_pppThread(opt); 74 74 pppThread->start(); 75 75 _pppThreads << pppThread; … … 93 93 _pppThreads.clear(); 94 94 95 QListIterator<t_options*> iOpt(_options); 96 while (iOpt.hasNext()) { 97 delete iOpt.next(); 98 } 99 _options.clear(); 100 95 101 _running = false; 96 102 } … … 100 106 void t_pppMain::readOptions() { 101 107 108 QListIterator<t_options*> iOpt(_options); 109 while (iOpt.hasNext()) { 110 delete iOpt.next(); 111 } 102 112 _options.clear(); 103 113 … … 119 129 } 120 130 121 QListIterator<QString> i t(settings.value("PPP/staTable").toStringList());122 while (i t.hasNext()) {123 QStringList hlp = i t.next().split(",");131 QListIterator<QString> iSta(settings.value("PPP/staTable").toStringList()); 132 while (iSta.hasNext()) { 133 QStringList hlp = iSta.next().split(","); 124 134 125 135 if (hlp.size() < 9) { … … 127 137 } 128 138 129 QSharedPointer<t_options> opt(new t_options());139 t_options* opt = new t_options(); 130 140 131 141 opt->_realTime = realTime; -
trunk/BNC/src/PPP/pppMain.h
r5719 r5736 18 18 void readOptions(); 19 19 20 QList< QSharedPointer<t_options> >_options;21 QList<t_pppThread*> 22 QString 23 QString 24 int 25 bool 20 QList<t_options*> _options; 21 QList<t_pppThread*> _pppThreads; 22 QString _logFile; 23 QString _nmeaFile; 24 int _nmeaPort; 25 bool _running; 26 26 }; 27 27 -
trunk/BNC/src/PPP/pppThread.cpp
r5732 r5736 54 54 //////////////////////////////////////////////////////////////////////////// 55 55 t_pppThread::t_pppThread(const t_options* opt) : QThread(0) { 56 _opt = *opt;56 _opt = opt; 57 57 } 58 58 … … 68 68 void t_pppThread::run() { 69 69 70 cout << _opt ._roverName << " run" << endl;70 cout << _opt->_roverName << " run" << endl; 71 71 72 72 _pppRun = new t_pppRun(_opt); 73 73 QThread::exec(); 74 74 75 cout << _opt ._roverName << " exit" << endl;75 cout << _opt->_roverName << " exit" << endl; 76 76 } 77 77 78 78 // Constructor 79 79 //////////////////////////////////////////////////////////////////////////// 80 t_pppRun::t_pppRun(const t_options &opt) {80 t_pppRun::t_pppRun(const t_options* opt) { 81 81 _opt = opt; 82 82 … … 109 109 void t_pppRun::slotNewEphGPS(gpsephemeris gpseph) { 110 110 QMutexLocker locker(&_mutex); 111 cout << _opt ._roverName << " slotNewEphGPS" << endl;111 cout << _opt->_roverName << " slotNewEphGPS" << endl; 112 112 } 113 113 … … 116 116 void t_pppRun::slotNewEphGlonass(glonassephemeris gloeph) { 117 117 QMutexLocker locker(&_mutex); 118 cout << _opt ._roverName << " slotNewEphGlonass" << endl;118 cout << _opt->_roverName << " slotNewEphGlonass" << endl; 119 119 } 120 120 … … 123 123 void t_pppRun::slotNewEphGalileo(galileoephemeris /* galeph */) { 124 124 QMutexLocker locker(&_mutex); 125 cout << _opt ._roverName << " slotNewEphGalileo" << endl;125 cout << _opt->_roverName << " slotNewEphGalileo" << endl; 126 126 } 127 127 … … 130 130 void t_pppRun::slotNewCorrections(QStringList corrList) { 131 131 QMutexLocker locker(&_mutex); 132 cout << _opt ._roverName << " slotNewCorrections" << endl;132 cout << _opt->_roverName << " slotNewCorrections" << endl; 133 133 } 134 134 // … … 136 136 void t_pppRun::slotNewObs(QByteArray staID, QList<t_obs> obsList) { 137 137 QMutexLocker locker(&_mutex); 138 cout << _opt ._roverName << " slotNewObs" << endl;138 cout << _opt->_roverName << " slotNewObs" << endl; 139 139 } 140 140 -
trunk/BNC/src/PPP/pppThread.h
r5732 r5736 13 13 Q_OBJECT 14 14 public: 15 t_pppRun(const t_options &opt);15 t_pppRun(const t_options* opt); 16 16 ~t_pppRun(); 17 17 … … 24 24 25 25 private: 26 QMutex _mutex;27 t_options_opt;26 QMutex _mutex; 27 const t_options* _opt; 28 28 }; 29 29 … … 35 35 36 36 private: 37 t_options_opt;38 t_pppRun* _pppRun;37 const t_options* _opt; 38 t_pppRun* _pppRun; 39 39 }; 40 40
Note:
See TracChangeset
for help on using the changeset viewer.