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

Last change on this file since 10526 was 10465, checked in by stuerze, 6 months ago

a SIGHUP signal to BNC will result into a reload of its configuration file

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