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

Last change on this file since 1000 was 728, checked in by weber, 17 years ago

* empty log message *

File size: 3.0 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 "bncconst.h"
34
35class bncRinex;
36
37class bncGetThread : public QThread {
38 Q_OBJECT
39
40 public:
41 bncGetThread(const QUrl& mountPoint,
42 const QByteArray& format,
43 const QByteArray& latitude,
44 const QByteArray& longitude,
45 const QByteArray& nmea, int iMount);
46 ~bncGetThread();
47
48 static QTcpSocket* request(const QUrl& mountPoint, QByteArray& latitude, QByteArray& longitude,
49 QByteArray& nmea, int timeOut, QString& msg);
50
51 QByteArray staID() const {return _staID;}
52
53 signals:
54 void newBytes(QByteArray staID, double nbyte);
55 void newObs(QByteArray staID, bool firstObs, p_obs obs);
56 void error(QByteArray staID);
57 void newMessage(QByteArray msg);
58
59 protected:
60 virtual void run();
61
62 private:
63 t_irc initRun();
64 void message(const QString&);
65 void exit(int exitCode = 0);
66 void tryReconnect();
67 void callScript(const char* _comment);
68 GPSDecoder* _decoder;
69 QTcpSocket* _socket;
70 QUrl _mountPoint;
71 QByteArray _staID;
72 QByteArray _staID_orig;
73 QByteArray _format;
74 QByteArray _latitude;
75 QByteArray _longitude;
76 QByteArray _nmea;
77 QString _adviseScript;
78 QString _begDateCor;
79 QString _begTimeCor;
80 QString _begDateOut;
81 QString _begTimeOut;
82 QString _endDateCor;
83 QString _endTimeCor;
84 QString _endDateOut;
85 QString _endTimeOut;
86 bool _makePause;
87 int _obsRate;
88 int _inspSegm;
89 int _adviseFail;
90 int _adviseReco;
91 int _perfIntr;
92 int _timeOut;
93 int _nextSleep;
94 int _iMount;
95 int _samplingRate;
96 bncRinex* _rnx;
97 QDateTime _decodeFailure;
98 QDateTime _decodeStart;
99 QDateTime _decodeStop;
100 QDateTime _decodePause;
101 QDateTime _decodeTime;
102 QDateTime _decodeSucc;
103 QMutex _mutex;
104};
105
106#endif
Note: See TracBrowser for help on using the repository browser.