Changeset 5719 in ntrip


Ignore:
Timestamp:
Jul 31, 2014, 1:29:23 PM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppMain.cpp

    r5717 r5719  
    5656//////////////////////////////////////////////////////////////////////////////
    5757t_pppMain::~t_pppMain() {
     58  stop();
    5859}
    5960
     
    6162//////////////////////////////////////////////////////////////////////////////
    6263void t_pppMain::start() {
    63   cout << "t_pppMain::start" << endl;
     64  if (_running) {
     65    return;
     66  }
     67
    6468  readOptions();
     69
     70  QListIterator<QSharedPointer<t_options> > it(_options);
     71  while (it.hasNext()) {
     72    QSharedPointer<t_options> opt = it.next();
     73    t_pppThread* pppThread = new t_pppThread(opt);
     74    _running = true;
     75  }
    6576}
    6677
     
    6879//////////////////////////////////////////////////////////////////////////////
    6980void t_pppMain::stop() {
    70   cout << "t_pppMain::stop" << endl;
     81  if (!_running) {
     82    return;
     83  }
     84  _running = false;
    7185}
    7286
  • trunk/BNC/src/PPP/pppMain.h

    r5716 r5719  
    44#include <QtCore>
    55#include "options.h"
     6#include "pppThread.h"
    67
    78namespace BNC {
     
    1819
    1920  QList<QSharedPointer<t_options> > _options;
     21  QList<t_pppThread*>               _pppThreads;
    2022  QString                           _logFile;
    2123  QString                           _nmeaFile;
    2224  int                               _nmeaPort;
     25  bool                              _running;
    2326};
    2427
  • trunk/BNC/src/PPP/pppThread.cpp

    r5681 r5719  
     1
     2// Part of BNC, a utility for retrieving decoding and
     3// converting GNSS data streams from NTRIP broadcasters.
     4//
     5// Copyright (C) 2007
     6// German Federal Agency for Cartography and Geodesy (BKG)
     7// http://www.bkg.bund.de
     8// Czech Technical University Prague, Department of Geodesy
     9// http://www.fsv.cvut.cz
     10//
     11// Email: euref-ip@bkg.bund.de
     12//
     13// This program is free software; you can redistribute it and/or
     14// modify it under the terms of the GNU General Public License
     15// as published by the Free Software Foundation, version 2.
     16//
     17// This program is distributed in the hope that it will be useful,
     18// but WITHOUT ANY WARRANTY; without even the implied warranty of
     19// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     20// GNU General Public License for more details.
     21//
     22// You should have received a copy of the GNU General Public License
     23// along with this program; if not, write to the Free Software
     24// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
     25
     26/* -------------------------------------------------------------------------
     27 * BKG NTRIP Client
     28 * -------------------------------------------------------------------------
     29 *
     30 * Class:      t_pppThread
     31 *
     32 * Purpose:    Single PPP Client (running in its own thread)
     33 *
     34 * Author:     L. Mervart
     35 *
     36 * Created:    29-Jul-2014
     37 *
     38 * Changes:   
     39 *
     40 * -----------------------------------------------------------------------*/
     41
    142
    243#include <iostream>
     
    647#include "pppThread.h"
    748#include "bnccore.h"
    8 #include "bncsettings.h"
    9 #include "bnctime.h"
    1049
     50using namespace BNC;
    1151using namespace std;
    1252
    1353// Constructor
    1454////////////////////////////////////////////////////////////////////////////
    15 t_pppThread::t_pppThread() : QThread(0) {
     55t_pppThread::t_pppThread(QSharedPointer<t_options> opt) : QThread(0) {
    1656}
    1757
     
    2565void t_pppThread::run() {
    2666
    27   bncSettings settings;
    2867
    2968  // Connect to BNC Signals
     
    75114}
    76115   
    77 //
    78 ////////////////////////////////////////////////////////////////////////////
    79 void t_pppThread::processFrontEpoch() {
    80 }
  • trunk/BNC/src/PPP/pppThread.h

    r5681 r5719  
    33
    44#include <vector>
     5#include <QtCore>
    56
    67#include "RTCM/GPSDecoder.h"
    7 #include "bncephuser.h"
     8#include "options.h"
     9
     10namespace BNC {
    811
    912class t_pppThread : public QThread {
     
    1114
    1215 public:
    13   t_pppThread();
     16  t_pppThread(QSharedPointer<t_options> opt);
    1417  ~t_pppThread();
    1518  virtual void run();
     
    2326
    2427 private:
    25   class t_epoData {
    26    public:
    27     bncTime            _time;
    28     std::vector<t_obs> _obsRover;
    29   };
    30   void processFrontEpoch();
    31   QMutex                  _mutex;
    32   QByteArray              _roverMount;
    33   QByteArray              _corrMount;
    34   std::vector<t_epoData*> _epochs;
     28  QMutex _mutex;
    3529};
    3630
     31}
     32
    3733#endif
  • trunk/BNC/src/src.pri

    r5712 r5719  
    5959          RTCM3/ephemeris.h RTCM3/timeutils.h                         \
    6060          GPSS/gpssDecoder.h GPSS/hassDecoder.h                       \
    61           PPP/pppwidgets.h PPP/options.h PPP/pppMain.h
     61          PPP/pppwidgets.h PPP/options.h PPP/pppMain.h                \
     62          PPP/pppThread.h
    6263
    6364HEADERS       += serial/qextserialbase.h serial/qextserialport.h
     
    8889          RTCM3/ephemeris.cpp RTCM3/timeutils.cpp                     \
    8990          GPSS/gpssDecoder.cpp GPSS/hassDecoder.cpp                   \
    90           PPP/pppwidgets.cpp PPP/options.cpp PPP/pppMain.cpp
     91          PPP/pppwidgets.cpp PPP/options.cpp PPP/pppMain.cpp          \
     92          PPP/pppThread.cpp
    9193
    9294SOURCES       += serial/qextserialbase.cpp serial/qextserialport.cpp
Note: See TracChangeset for help on using the changeset viewer.