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

Last change on this file since 9738 was 9738, checked in by stuerze, 23 months ago

minor changes

File size: 5.9 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.
[82]24
25#ifndef BNCAPP_H
26#define BNCAPP_H
27
[5884]28#include "bnctime.h"
[243]29#include "bnccaster.h"
[2519]30#include "bncrawfile.h"
[6432]31#include "bncephuser.h"
[9738]32#include "bncsslconfig.h"
[243]33
[2865]34class bncComb;
[3232]35class bncTableItem;
[5899]36namespace BNC_PPP {
37 class t_pppMain;
38}
[2865]39
[5072]40class t_bncCore : public QObject {
[5861]41Q_OBJECT
42friend class bncSettings;
[4070]43
[5861]44 public:
45 enum e_mode {interactive, nonInteractive, batchPostProcessing};
46 t_bncCore();
[7298]47 ~t_bncCore();
[5861]48 static t_bncCore* instance();
[6151]49 e_mode mode() const {return _mode;}
50 void setGUIenabled(bool GUIenabled) {_GUIenabled = GUIenabled;}
51 void setMode(e_mode mode) {_mode = mode;}
[6451]52 void setPortEph(int port);
[6151]53 void setPortCorr(int port);
54 void setCaster(bncCaster* caster) {_caster = caster;}
55 const bncCaster* caster() const {return _caster;}
56 bool dateAndTimeGPSSet() const;
57 QDateTime dateAndTimeGPS() const;
58 void setDateAndTimeGPS(QDateTime dateTime);
[9738]59 void setSslConfiguration(const bncSslConfig& sslConfig) {_sslConfig = sslConfig;}
60 QString confFileName() const {return _confFileName;}
[6151]61 void setConfFileName(const QString& confFileName);
[9738]62 bncSslConfig sslConfiguration() const {return _sslConfig;}
63
[7298]64 void writeRawData(const QByteArray& data, const QByteArray& staID,
[9211]65 const QByteArray& format);
[6151]66 void initCombination();
67 void stopCombination();
68 const QString& pgmName() {return _pgmName;}
69 const QString& userName() {return _userName;}
70 QWidget* mainWindow() const {return _mainWindow;};
71 void setMainWindow(QWidget* mainWindow){_mainWindow = mainWindow;}
72 bool GUIenabled() const {return _GUIenabled;}
73 void startPPP();
74 void stopPPP();
[7976]75 int sigintReceived;
[4070]76
[5861]77 QMap<int, bncTableItem*> _uploadTableItems;
[8733]78 QMap<int, bncTableItem*> _uploadEphTableItems;
[1538]79
[5861]80 public slots:
81 void slotMessage(QByteArray msg, bool showOnScreen);
[6432]82 void slotNewGPSEph(t_ephGPS);
83 void slotNewGlonassEph(t_ephGlo);
84 void slotNewGalileoEph(t_ephGal);
85 void slotNewSBASEph(t_ephSBAS);
[6598]86 void slotNewBDSEph(t_ephBDS);
[6484]87 void slotNewOrbCorrections(QList<t_orbCorr>);
88 void slotNewClkCorrections(QList<t_clkCorr>);
89 void slotNewCodeBiases(QList<t_satCodeBias>);
90 void slotNewPhaseBiases(QList<t_satPhaseBias>);
91 void slotNewTec(t_vTec);
[5861]92 void slotQuit();
[994]93
[5861]94 signals:
95 void newMessage(QByteArray msg, bool showOnScreen);
[6432]96 void newGPSEph(t_ephGPS eph);
97 void newGlonassEph(t_ephGlo eph);
98 void newSBASEph(t_ephSBAS eph);
99 void newGalileoEph(t_ephGal eph);
[6598]100 void newBDSEph(t_ephBDS eph);
[6484]101 void newOrbCorrections(QList<t_orbCorr>);
102 void newClkCorrections(QList<t_clkCorr>);
103 void newCodeBiases(QList<t_satCodeBias>);
104 void newPhaseBiases(QList<t_satPhaseBias>);
105 void newTec(t_vTec);
[5861]106 void providerIDChanged(QString);
[5954]107 void newPosition(QByteArray staID, bncTime time, QVector<double> xx);
[5991]108 void newNMEAstr(QByteArray staID, QByteArray str);
[5941]109 void progressRnxPPP(int);
110 void finishedRnxPPP();
[5950]111 void mapSpeedSliderChanged(int);
[5972]112 void stopRinexPPP();
[7298]113
[589]114 private slots:
[6451]115 void slotNewConnectionEph();
[5861]116 void slotNewConnectionCorr();
[516]117
[5861]118 private:
[6520]119 t_irc checkPrintEph(t_eph* eph);
120 void printEphHeader();
121 void printEph(const t_eph& eph, bool printFile);
[7298]122 void printOutputEph(bool printFile, QTextStream* stream,
[6520]123 const QString& strV2, const QString& strV3);
124 void messagePrivate(const QByteArray& msg);
[5861]125
[6151]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;
[6384]141 QFile* _ephFileSBAS;
142 QTextStream* _ephStreamSBAS;
[6151]143 QString _userName;
144 QString _pgmName;
[6451]145 int _portEph;
146 QTcpServer* _serverEph;
147 QList<QTcpSocket*>* _socketsEph;
[6151]148 int _portCorr;
149 QTcpServer* _serverCorr;
150 QList<QTcpSocket*>* _socketsCorr;
151 bncCaster* _caster;
[9738]152 bncSslConfig _sslConfig;
[6151]153 QString _confFileName;
154 QDate _fileDate;
155 bncRawFile* _rawFile;
156 bncComb* _bncComb;
157 e_mode _mode;
158 QWidget* _mainWindow;
159 bool _GUIenabled;
160 QDateTime* _dateAndTimeGPS;
161 mutable QMutex _mutexDateAndTimeGPS;
162 BNC_PPP::t_pppMain* _pppMain;
[6432]163 bncEphUser _ephUser;
[82]164};
[5066]165
[5861]166#define BNC_CORE (t_bncCore::instance())
[5066]167
[82]168#endif
Note: See TracBrowser for help on using the repository browser.