Changeset 5905 in ntrip
- Timestamp:
- Aug 9, 2014, 11:45:37 AM (10 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppMain.cpp
r5900 r5905 62 62 // 63 63 ////////////////////////////////////////////////////////////////////////////// 64 void t_pppMain::start( ) {64 void t_pppMain::start(bool ownThread) { 65 65 if (_running) { 66 66 return; … … 73 73 while (iOpt.hasNext()) { 74 74 const t_pppOptions* opt = iOpt.next(); 75 t_pppThread* pppThread = new t_pppThread(opt); 76 pppThread->start(); 75 t_pppThread* pppThread = new t_pppThread(ownThread, opt); 76 if (ownThread) { 77 cout << "start" << endl; 78 pppThread->start(); 79 } 80 else { 81 cout << "run" << endl; 82 pppThread->run(); 83 } 77 84 _pppThreads << pppThread; 78 85 _running = true; -
trunk/BNC/src/PPP/pppMain.h
r5900 r5905 10 10 class t_pppMain { 11 11 public: 12 t_pppMain(); 12 t_pppMain(); 13 13 ~t_pppMain(); 14 void start( );15 void stop(); 14 void start(bool ownThread); 15 void stop(); 16 16 17 17 private: … … 20 20 QList<t_pppOptions*> _options; 21 21 QList<t_pppThread*> _pppThreads; 22 QString 23 QString 24 int 25 bool 22 QString _logFile; 23 QString _nmeaFile; 24 int _nmeaPort; 25 bool _running; 26 26 }; 27 27 -
trunk/BNC/src/PPP/pppThread.cpp
r5904 r5905 55 55 // Constructor 56 56 //////////////////////////////////////////////////////////////////////////// 57 t_pppThread::t_pppThread(const t_pppOptions* opt) : QThread(0) { 58 _opt = opt; 59 _pppRun = 0; 57 t_pppThread::t_pppThread(bool ownThread, const t_pppOptions* opt) : QThread(0) { 58 59 _ownThread = ownThread; 60 _opt = opt; 61 _pppRun = 0; 60 62 61 63 connect(this, SIGNAL(finished()), this, SLOT(deleteLater())); … … 79 81 _pppRun = new t_pppRun(_opt); 80 82 if (_opt->_realTime) { 81 QThread::exec(); 83 if (_ownThread) { 84 QThread::exec(); 85 } 82 86 } 83 87 else { -
trunk/BNC/src/PPP/pppThread.h
r5891 r5905 16 16 Q_OBJECT 17 17 public: 18 t_pppThread( const t_pppOptions* opt);18 t_pppThread(bool ownThread, const t_pppOptions* opt); 19 19 ~t_pppThread(); 20 20 virtual void run(); … … 25 25 26 26 private: 27 bool _ownThread; 27 28 const t_pppOptions* _opt; 28 29 t_pppRun* _pppRun; -
trunk/BNC/src/bnccore.cpp
r5903 r5905 872 872 // 873 873 //////////////////////////////////////////////////////////////////////////// 874 void t_bncCore::startPPP( ) {875 _pppMain->start( );874 void t_bncCore::startPPP(bool ownThread) { 875 _pppMain->start(ownThread); 876 876 } 877 877 -
trunk/BNC/src/bnccore.h
r5903 r5905 71 71 void setMainWindow(QWidget* mainWindow){_mainWindow = mainWindow;} 72 72 bool GUIenabled() const {return _GUIenabled;} 73 void startPPP( );73 void startPPP(bool ownThread); 74 74 void stopPPP(); 75 75 -
trunk/BNC/src/bncmain.cpp
r5900 r5905 189 189 BNC_CORE->slotMessage("========== Start BNC v" BNCVERSION " =========", true); 190 190 191 // PPP Client(s) (in separate threads)192 // -----------------------------------193 BNC_CORE->startPPP();194 195 191 // Normal case - data from Internet 196 192 // -------------------------------- 197 193 if ( rawFileName.isEmpty() ) { 198 194 BNC_CORE->setMode(t_bncCore::nonInteractive); 195 BNC_CORE->startPPP(true); 196 199 197 caster->readMountPoints(); 200 198 if (caster->numStations() == 0) { … … 207 205 else { 208 206 BNC_CORE->setMode(t_bncCore::batchPostProcessing); 209 bncRawFile* rawFile = new bncRawFile(rawFileName, "", 210 bncRawFile::input); 207 BNC_CORE->startPPP(false); 208 209 bncRawFile* rawFile = new bncRawFile(rawFileName, "", bncRawFile::input); 211 210 bncGetThread* getThread = new bncGetThread(rawFile); 212 211 caster->addGetThread(getThread, true); -
trunk/BNC/src/bncwindow.cpp
r5902 r5905 1650 1650 startRealTime(); 1651 1651 } 1652 BNC_CORE->startPPP( );1652 BNC_CORE->startPPP(true); 1653 1653 } 1654 1654
Note:
See TracChangeset
for help on using the changeset viewer.