Changeset 5731 in ntrip for trunk


Ignore:
Timestamp:
Jul 31, 2014, 4:16:10 PM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src/PPP
Files:
2 edited

Legend:

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

    r5730 r5731  
    2828 * -------------------------------------------------------------------------
    2929 *
    30  * Class:      t_pppThread
     30 * Class:      t_pppThread, t_pppRun
    3131 *
    3232 * Purpose:    Single PPP Client (running in its own thread)
     
    6060////////////////////////////////////////////////////////////////////////////
    6161t_pppThread::~t_pppThread() {
     62  delete _pppRun;
    6263  cout << "~t_pppThread" << endl;
    6364}
     
    6970  cout << _opt._roverName << " run" << endl;
    7071
    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////////////////////////////////////////////////////////////////////////////
     80t_pppRun::t_pppRun(const t_options& opt) {
     81  _opt = opt;
     82
    7383  if (BNC_CORE->caster()) {
    7484    connect(BNC_CORE->caster(), SIGNAL(newObs(QByteArray, QList<t_obs>)),
     
    8797            this, SLOT(slotNewCorrections(QList<QString>)));
    8898  }
    89  
    90   // Start processing loop
    91   // ---------------------
    92   QThread::exec();
     99}
    93100
    94   cout << _opt._roverName << " exit" << endl;
     101// Destructor
     102////////////////////////////////////////////////////////////////////////////
     103t_pppRun::~t_pppRun() {
     104  cout << "~t_pppRun" << endl;
    95105}
    96106
    97107//
    98108////////////////////////////////////////////////////////////////////////////
    99 void t_pppThread::slotNewEphGPS(gpsephemeris gpseph) {
     109void t_pppRun::slotNewEphGPS(gpsephemeris gpseph) {
    100110  QMutexLocker locker(&_mutex);
    101111  cout << _opt._roverName << " slotNewEphGPS" << endl;
     
    104114//
    105115////////////////////////////////////////////////////////////////////////////
    106 void t_pppThread::slotNewEphGlonass(glonassephemeris gloeph) {
     116void t_pppRun::slotNewEphGlonass(glonassephemeris gloeph) {
    107117  QMutexLocker locker(&_mutex);
    108118  cout << _opt._roverName << " slotNewEphGlonass" << endl;
     
    111121//
    112122////////////////////////////////////////////////////////////////////////////
    113 void t_pppThread::slotNewEphGalileo(galileoephemeris /* galeph */) {
     123void t_pppRun::slotNewEphGalileo(galileoephemeris /* galeph */) {
    114124  QMutexLocker locker(&_mutex);
    115125  cout << _opt._roverName << " slotNewEphGalileo" << endl;
     
    118128//
    119129////////////////////////////////////////////////////////////////////////////
    120 void t_pppThread::slotNewCorrections(QList<QString> corrList) {
     130void t_pppRun::slotNewCorrections(QList<QString> corrList) {
    121131  QMutexLocker locker(&_mutex);
    122132  cout << _opt._roverName << " slotNewCorrections" << endl;
     
    124134//
    125135////////////////////////////////////////////////////////////////////////////
    126 void t_pppThread::slotNewObs(QByteArray staID, QList<t_obs> obsList) {
     136void t_pppRun::slotNewObs(QByteArray staID, QList<t_obs> obsList) {
    127137  QMutexLocker locker(&_mutex);
    128138  cout << _opt._roverName << " slotNewObs" << endl;
  • trunk/BNC/src/PPP/pppThread.h

    r5723 r5731  
    1010namespace BNC {
    1111
    12 class t_pppThread : public QThread {
     12class t_pppRun : public QObject {
    1313 Q_OBJECT
    14 
    1514 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();
    1917
    2018 public slots:
     
    3028};
    3129
     30class 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
    3241}
    3342
Note: See TracChangeset for help on using the changeset viewer.