source: ntrip/trunk/BNC/src/bncgetthread.h@ 10212

Last change on this file since 10212 was 9124, checked in by stuerze, 4 years ago

minor changes regarding latency check, ssr and long mountpoint names

File size: 4.8 KB
RevLine 
[280]1// Part of BNC, a utility for retrieving decoding and
[464]2// converting GNSS data streams from NTRIP broadcasters.
[280]3//
[464]4// Copyright (C) 2007
[280]5// German Federal Agency for Cartography and Geodesy (BKG)
6// http://www.bkg.bund.de
[464]7// Czech Technical University Prague, Department of Geodesy
[280]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.
[35]24
25#ifndef BNCGETTHREAD_H
26#define BNCGETTHREAD_H
27
28#include <QThread>
[651]29#include <QDateTime>
[1137]30#include <QFile>
[8252]31#include <QTcpServer>
32#include <QUrl>
[35]33
[138]34#include "bncconst.h"
[1812]35#include "bncnetquery.h"
[2142]36#include "bnctime.h"
[2519]37#include "bncrawfile.h"
[6137]38#include "satObs.h"
[6580]39#include "rinex/rnxobsfile.h"
[35]40
[6137]41class GPSDecoder;
[1319]42class QextSerialPort;
[1558]43class latencyChecker;
[408]44
[35]45class bncGetThread : public QThread {
46 Q_OBJECT
47
48 public:
[2519]49 bncGetThread(bncRawFile* rawFile);
[8082]50 bncGetThread(const QUrl& mountPoint,
[366]51 const QByteArray& format,
52 const QByteArray& latitude,
53 const QByteArray& longitude,
[8082]54 const QByteArray& nmea,
[3527]55 const QByteArray& ntripVersion);
[1138]56
[1812]57 bncNetQuery::queryStatus queryStatus() {
58 if (_query) {
59 return _query->status();
60 }
61 else {
62 return bncNetQuery::init;
63 }
64 }
65
[1525]66 protected:
[35]67 ~bncGetThread();
68
[1525]69 public:
[1390]70 void terminate();
71
[88]72 QByteArray staID() const {return _staID;}
[1163]73 QUrl mountPoint() const {return _mountPoint;}
74 QByteArray latitude() const {return _latitude;}
75 QByteArray longitude() const {return _longitude;}
[1423]76 QByteArray ntripVersion() const {return _ntripVersion;}
[88]77
[35]78 signals:
[628]79 void newBytes(QByteArray staID, double nbyte);
[5648]80 void newRawData(QByteArray staID, QByteArray data);
[1974]81 void newLatency(QByteArray staID, double clate);
[6137]82 void newObs(QByteArray staID, QList<t_satObs> obsList);
[8082]83 void newAntCrd(QByteArray staID, double xx, double yy, double zz,
[3595]84 double hh, QByteArray antType);
[1299]85 void newMessage(QByteArray msg, bool showOnScreen);
[2356]86 void newRTCMMessage(QByteArray staID, int msgID);
[1556]87 void getThreadFinished(QByteArray staID);
[35]88
[2528]89 public:
[35]90 virtual void run();
[138]91
[7180]92 public slots:
93 void slotNewNMEAstr(QByteArray staID, QByteArray str);
94
[1607]95 private slots:
96 void slotSerialReadyRead();
[7180]97 void slotNewNMEAConnection();
[1607]98
[35]99 private:
[1710]100 enum t_serialNMEA {NO_NMEA, MANUAL_NMEA, AUTO_NMEA};
[3523]101 t_irc initDecoder();
102 GPSDecoder* decoder();
[1710]103
[1140]104 void initialize();
[1555]105 t_irc tryReconnect();
[7424]106 void miscScanRTCM();
[1555]107
[3560]108 QMap<QString, GPSDecoder*> _decodersRaw;
109 GPSDecoder* _decoder;
[3523]110 bncNetQuery* _query;
111 QUrl _mountPoint;
112 QByteArray _staID;
113 QByteArray _format;
114 QByteArray _latitude;
115 QByteArray _longitude;
116 QByteArray _height;
117 QByteArray _nmea;
118 QByteArray _ntripVersion;
[6751]119 QByteArray _manualNMEAString;
120 QDateTime _lastManualNMEA;
121 int _manualNMEASampl;
[3523]122 int _nextSleep;
123 int _iMount;
[8082]124 int _ssrEpoch;
[3523]125 bncRawFile* _rawFile;
126 QextSerialPort* _serialPort;
127 bool _isToBeDeleted;
[9124]128 bool _rtcmObs;
129 bool _rtcmSsrOrb;
130 bool _rtcmSsrClk;
131 bool _rtcmSsrOrbClk;
132 bool _rtcmSsrCbi;
133 bool _rtcmSsrPbi;
134 bool _rtcmSsrVtec;
135 bool _rtcmSsrUra;
136 bool _rtcmSsrHr;
137 bool _rtcmSsrIgs;
[3523]138 latencyChecker* _latencyChecker;
139 QString _miscMount;
140 QFile* _serialOutFile;
141 t_serialNMEA _serialNMEA;
142 bool _rawOutput;
[8271]143 bool _latencycheck;
[8417]144 QMap<QString, bncTime> _prnLastEpo;
[4476]145 QMap<char, QVector<QString> > _rnxTypes;
[6864]146 QStringList _gloSlots;
[7180]147 QList<QTcpSocket*>* _nmeaSockets;
148 QMap<QByteArray, int> _nmeaPortsMap;
149 QTcpServer* _nmeaServer;
[35]150};
151
152#endif
Note: See TracBrowser for help on using the repository browser.