Changeset 1390 in ntrip for trunk


Ignore:
Timestamp:
Dec 29, 2008, 11:12:15 AM (16 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bnccaster.cpp

    r1353 r1390  
    3939 * -----------------------------------------------------------------------*/
    4040
     41#include <iostream>
     42
    4143#include <math.h>
    4244#include <unistd.h>
     
    4749#include "bncutils.h"
    4850#include "RTCM/GPSDecoder.h"
     51
     52using namespace std;
    4953
    5054// Constructor
     
    117121  while(it.hasNext()){
    118122    bncGetThread* thread = it.next();
     123    cout << "~bncCaster A" << endl;
    119124    thread->terminate();
     125    cout << "~bncCaster B" << endl;
    120126    thread->wait();
     127    cout << "~bncCaster C" << endl;
    121128    delete thread;
     129    cout << "~bncCaster D" << endl;
    122130  }
    123131  delete _out;
  • trunk/BNC/bncgetthread.cpp

    r1387 r1390  
    297297  delete _rawOutFile;
    298298  delete _serialPort;
     299}
     300
     301//
     302////////////////////////////////////////////////////////////////////////////
     303void bncGetThread::terminate() {
     304  cout << "terminate a" << endl;
     305  if (_query) {
     306    _query->stop();
     307  }
     308  cout << "terminate b" << endl;
     309  QThread::terminate();
    299310}
    300311
  • trunk/BNC/bncgetthread.h

    r1377 r1390  
    5252
    5353   ~bncGetThread();
     54
     55   void terminate();
    5456
    5557   QByteArray staID() const {return _staID;}
  • trunk/BNC/bncnetquery.h

    r1387 r1390  
    1717  }
    1818  virtual ~bncNetQuery() {};
    19 
     19 
     20  virtual void stop() = 0;
    2021  virtual void waitForRequestResult(const QUrl& url, QByteArray& outData) = 0;
    2122  virtual void startRequest(const QUrl& url, const QByteArray& gga) = 0;
  • trunk/BNC/bncnetqueryv1.cpp

    r1385 r1390  
    3434bncNetQueryV1::~bncNetQueryV1() {
    3535  delete _socket;
     36}
     37
     38//
     39////////////////////////////////////////////////////////////////////////////
     40void bncNetQueryV1::stop() {
     41
    3642}
    3743
  • trunk/BNC/bncnetqueryv1.h

    r1384 r1390  
    99  virtual ~bncNetQueryV1();
    1010
     11  virtual void stop();
    1112  virtual void waitForRequestResult(const QUrl& url, QByteArray& outData);
    1213  virtual void startRequest(const QUrl& url, const QByteArray& gga);
  • trunk/BNC/bncnetqueryv2.cpp

    r1389 r1390  
    3535  delete _reply;
    3636  delete _manager;
     37}
     38
     39//
     40////////////////////////////////////////////////////////////////////////////
     41void bncNetQueryV2::stop() {
     42  _reply->abort();
     43  _eventLoop->quit();
    3744}
    3845
Note: See TracChangeset for help on using the changeset viewer.