source: ntrip/trunk/BNC/bncgetthread.h@ 1044

Last change on this file since 1044 was 1044, checked in by zdenek, 16 years ago

Zdenek Lukes: a) added logic for RTCM 2.3 messages 20/21 decoding

b) added logic for cycle slip flags (slip counters or lock time indicators) handling

File size: 3.1 KB
Line 
1// Part of BNC, a utility for retrieving decoding and
2// converting GNSS data streams from NTRIP broadcasters.
3//
4// Copyright (C) 2007
5// German Federal Agency for Cartography and Geodesy (BKG)
6// http://www.bkg.bund.de
7// Czech Technical University Prague, Department of Geodesy
8// http://www.fsv.cvut.cz
9//
10// Email: euref-ip@bkg.bund.de
11//
12// This program is free software; you can redistribute it and/or
13// modify it under the terms of the GNU General Public License
14// as published by the Free Software Foundation, version 2.
15//
16// This program is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with this program; if not, write to the Free Software
23// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24
25#ifndef BNCGETTHREAD_H
26#define BNCGETTHREAD_H
27
28#include <QThread>
29#include <QtNetwork>
30#include <QDateTime>
31
32#include "RTCM/GPSDecoder.h"
33#include "RTCM3/rtcm3torinex.h"
34#include "bncconst.h"
35
36class bncRinex;
37
38class bncGetThread : public QThread {
39 Q_OBJECT
40
41 public:
42 bncGetThread(const QUrl& mountPoint,
43 const QByteArray& format,
44 const QByteArray& latitude,
45 const QByteArray& longitude,
46 const QByteArray& nmea, int iMount);
47 ~bncGetThread();
48
49 static QTcpSocket* request(const QUrl& mountPoint, QByteArray& latitude, QByteArray& longitude,
50 QByteArray& nmea, int timeOut, QString& msg);
51
52 QByteArray staID() const {return _staID;}
53
54 signals:
55 void newBytes(QByteArray staID, double nbyte);
56 void newObs(QByteArray staID, bool firstObs, p_obs obs);
57 void error(QByteArray staID);
58 void newMessage(QByteArray msg);
59
60 public slots:
61 void slotNewEphGPS(gpsephemeris gpseph);
62
63 protected:
64 virtual void run();
65
66 private:
67 t_irc initRun();
68 void message(const QString&);
69 void exit(int exitCode = 0);
70 void tryReconnect();
71 void callScript(const char* _comment);
72 GPSDecoder* _decoder;
73 QTcpSocket* _socket;
74 QUrl _mountPoint;
75 QByteArray _staID;
76 QByteArray _staID_orig;
77 QByteArray _format;
78 QByteArray _latitude;
79 QByteArray _longitude;
80 QByteArray _nmea;
81 QString _adviseScript;
82 QString _begDateCor;
83 QString _begTimeCor;
84 QString _begDateOut;
85 QString _begTimeOut;
86 QString _endDateCor;
87 QString _endTimeCor;
88 QString _endDateOut;
89 QString _endTimeOut;
90 QString _checkMountPoint;
91 bool _makePause;
92 int _obsRate;
93 int _inspSegm;
94 int _adviseFail;
95 int _adviseReco;
96 int _perfIntr;
97 int _timeOut;
98 int _nextSleep;
99 int _iMount;
100 int _samplingRate;
101 bncRinex* _rnx;
102 bool _rnx_set_position;
103 QDateTime _decodeFailure;
104 QDateTime _decodeStart;
105 QDateTime _decodeStop;
106 QDateTime _decodePause;
107 QDateTime _decodeTime;
108 QDateTime _decodeSucc;
109 QMutex _mutex;
110};
111
112#endif
Note: See TracBrowser for help on using the repository browser.