source: ntrip/trunk/BNC/src/bnccore.h@ 11020

Last change on this file since 11020 was 11008, checked in by stuerze, 6 days ago

updates regarding RTCM-SSR

File size: 5.8 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 BNCAPP_H
26#define BNCAPP_H
27
28#include "bnctime.h"
29#include "bnccaster.h"
30#include "bncrawfile.h"
31#include "bncephuser.h"
32
33class bncComb;
34class bncTableItem;
35namespace BNC_PPP {
36 class t_pppMain;
37}
38
39class t_bncCore : public QObject {
40Q_OBJECT
41friend class bncSettings;
42
43 public:
44 enum e_mode {interactive, nonInteractive, batchPostProcessing};
45 t_bncCore();
46 ~t_bncCore();
47 static t_bncCore* instance();
48 e_mode mode() const {return _mode;}
49 void setGUIenabled(bool GUIenabled) {_GUIenabled = GUIenabled;}
50 void setMode(e_mode mode) {_mode = mode;}
51 void setPortEph(int port);
52 void setPortCorr(int port);
53 void setCaster(bncCaster* caster) {_caster = caster;}
54 bncCaster* caster() {return _caster;}
55 bool dateAndTimeGPSSet() const;
56 QDateTime dateAndTimeGPS() const;
57 void setDateAndTimeGPS(QDateTime dateTime);
58 void setConfFileName(const QString& confFileName);
59 QString confFileName() const {return _confFileName;}
60 void writeRawData(const QByteArray& data, const QByteArray& staID,
61 const QByteArray& format);
62 void initCombination();
63 void stopCombination();
64 const QString& pgmName() {return _pgmName;}
65 const QString& userName() {return _userName;}
66 QWidget* mainWindow() const {return _mainWindow;};
67 void setMainWindow(QWidget* mainWindow){_mainWindow = mainWindow;}
68 bool GUIenabled() const {return _GUIenabled;}
69 void startPPP();
70 void stopPPP();
71 int sigintReceived;
72
73 QMap<int, bncTableItem*> _uploadTableItems;
74 QMap<int, bncTableItem*> _uploadEphTableItems;
75 QMap<int, bncTableItem*> _uploadRawTableItems;
76
77 public slots:
78 void slotMessage(QByteArray msg, bool showOnScreen);
79 void slotNewGPSEph(t_ephGPS);
80 void slotNewGlonassEph(t_ephGlo);
81 void slotNewGalileoEph(t_ephGal);
82 void slotNewSBASEph(t_ephSBAS);
83 void slotNewBDSEph(t_ephBDS);
84 void slotNewOrbCorrections(QList<t_orbCorr>);
85 void slotNewClkCorrections(QList<t_clkCorr>);
86 void slotNewCodeBiases(QList<t_satCodeBias>);
87 void slotNewPhaseBiases(QList<t_satPhaseBias>);
88 void slotNewTec(t_vTec);
89 void slotNewMetaData(t_metaData);
90 void slotQuit();
91
92 signals:
93 void newMessage(QByteArray msg, bool showOnScreen);
94 void newGPSEph(t_ephGPS eph);
95 void newGlonassEph(t_ephGlo eph);
96 void newSBASEph(t_ephSBAS eph);
97 void newGalileoEph(t_ephGal eph);
98 void newBDSEph(t_ephBDS eph);
99 void newOrbCorrections(QList<t_orbCorr>);
100 void newClkCorrections(QList<t_clkCorr>);
101 void newCodeBiases(QList<t_satCodeBias>);
102 void newPhaseBiases(QList<t_satPhaseBias>);
103 void newTec(t_vTec);
104 void newMetaData(t_metaData);
105 void providerIDChanged(QString);
106 void newPosition(QByteArray staID, bncTime time, QVector<double> xx);
107 void newNMEAstr(QByteArray staID, QByteArray str);
108 void progressRnxPPP(int);
109 void finishedRnxPPP();
110 void mapSpeedSliderChanged(int);
111 void stopRinexPPP();
112
113 private slots:
114 void slotNewConnectionEph();
115 void slotNewConnectionCorr();
116
117 private:
118 t_irc checkPrintEph(t_eph* eph);
119 void printEphHeader(QString receptStaID);
120 void printEph(const t_eph& eph, bool printFile);
121 void printOutputEph(bool printFile, QTextStream* stream,
122 const QString& strV2, const QString& strV3,
123 const QString& strV4);
124 void messagePrivate(const QByteArray& msg);
125
126 QSettings::SettingsMap _settings;
127 QFile* _logFile;
128 QTextStream* _logStream;
129 int _logFileFlag;
130 QMutex _mutex;
131 QMutex _mutexMessage;
132 QString _ephPath;
133 QString _ephFileNameGPS;
134 int _rinexVers;
135 QFile* _ephFileGPS;
136 QTextStream* _ephStreamGPS;
137 QFile* _ephFileGlonass;
138 QTextStream* _ephStreamGlonass;
139 QFile* _ephFileGalileo;
140 QTextStream* _ephStreamGalileo;
141 QFile* _ephFileSBAS;
142 QTextStream* _ephStreamSBAS;
143 QString _userName;
144 QString _pgmName;
145 int _portEph;
146 QTcpServer* _serverEph;
147 QList<QTcpSocket*>* _socketsEph;
148 int _portCorr;
149 QTcpServer* _serverCorr;
150 QList<QTcpSocket*>* _socketsCorr;
151 bncCaster* _caster;
152 QString _confFileName;
153 QDate _fileDate;
154 bncRawFile* _rawFile;
155 e_mode _mode;
156 QWidget* _mainWindow;
157 bool _GUIenabled;
158 QDateTime* _dateAndTimeGPS;
159 mutable QMutex _mutexDateAndTimeGPS;
160 BNC_PPP::t_pppMain* _pppMain;
161 bncEphUser _ephUser;
162};
163
164#define BNC_CORE (t_bncCore::instance())
165
166#endif
Note: See TracBrowser for help on using the repository browser.