Changeset 1343 in ntrip


Ignore:
Timestamp:
Dec 27, 2008, 10:47:43 AM (15 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncnetrequest.cpp

    r1342 r1343  
    1919
    2020#include "bncnetrequest.h"
     21#include "RTCM3/RTCM3Decoder.h"
    2122
    2223using namespace std;
     
    2728  _manager = 0;
    2829  _reply   = 0;
     30  _decoder = new RTCM3Decoder("TEST1");
     31  connect((RTCM3Decoder*) _decoder, SIGNAL(newMessage(QByteArray,bool)),
     32          this, SIGNAL(slotNewMessage(QByteArray,bool)));
    2933}
    3034
     
    8892  cout << "slotReadyRead" << endl;
    8993  QByteArray buffer = _reply->readAll();
    90   cerr << buffer.data();
     94
     95  vector<string> errmsg;
     96  _decoder->Decode(buffer.data(), buffer.length(), errmsg);
     97
     98  QListIterator<p_obs> it(_decoder->_obsList);
     99  while (it.hasNext()) {
     100    p_obs obs = it.next();
     101    cout << obs->_o.satNum << endl;
     102    delete obs;
     103  }
     104  _decoder->_obsList.clear();
    91105}
    92106
     
    104118}
    105119
     120//
     121////////////////////////////////////////////////////////////////////////////
     122void bncNetRequest::slotNewMessage(QByteArray msg, bool) {
     123  cout << "Message: " << msg.data() << endl;
     124}
  • trunk/BNC/bncnetrequest.h

    r1342 r1343  
    44#include <QtNetwork>
    55#include "bncconst.h"
     6#include "RTCM/GPSDecoder.h"
    67
    78class bncNetRequest : public QObject {
     
    2021  void slotError(QNetworkReply::NetworkError);
    2122  void slotSslErrors(const QList<QSslError>&);
     23  void slotNewMessage(QByteArray,bool);
    2224
    2325 private:
    2426  QNetworkAccessManager* _manager;
    2527  QNetworkReply*         _reply;
     28  GPSDecoder*            _decoder;
    2629};
    2730
  • trunk/BNC/ntrip2test.pro

    r1335 r1343  
    44CONFIG -= release
    55CONFIG += debug
     6
     7DEFINES += NO_RTCM3_MAIN
    68
    79# Get rid of mingwm10.dll
     
    1618release:MOC_DIR=.moc/release
    1719
    18 HEADERS =                bncnetrequest.h
     20HEADERS =                bncnetrequest.h   bncutils.h   bncrinex.h    \
     21          RTCM/GPSDecoder.h RTCM/RTCM2.h RTCM/RTCM2Decoder.h          \
     22          RTCM/RTCM2_2021.h RTCM/rtcm_utils.h                         \
     23          RTCM3/RTCM3Decoder.h RTCM3/rtcm3torinex.h                   \
     24          RTCM3/RTCM3coDecoder.h RTCM3/clock_orbit_rtcm.h             \
     25          RTCM3/ephemeris.h RTCM3/timeutils.h                         \
    1926
    20 SOURCES = ntrip2test.cpp bncnetrequest.cpp
     27SOURCES = ntrip2test.cpp bncnetrequest.cpp bncutils.cpp bncrinex.cpp  \
     28          RTCM/RTCM2.cpp RTCM/RTCM2Decoder.cpp                        \
     29          RTCM/RTCM2_2021.cpp RTCM/rtcm_utils.cpp                     \
     30          RTCM3/RTCM3Decoder.cpp RTCM3/rtcm3torinex.c                 \
     31          RTCM3/RTCM3coDecoder.cpp RTCM3/clock_orbit_rtcm.c           \
     32          RTCM3/ephemeris.cpp RTCM3/timeutils.cpp                     
    2133
    2234QT += network
Note: See TracChangeset for help on using the changeset viewer.