Changeset 5861 in ntrip for trunk/BNC/src/bnccore.h
- Timestamp:
- Aug 8, 2014, 10:35:08 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bnccore.h
r5846 r5861 33 33 34 34 class bncComb; 35 class bncPPPclient;36 35 class bncTableItem; 37 36 38 37 class t_bncCore : public QObject { 39 Q_OBJECT 38 Q_OBJECT 39 friend class bncSettings; 40 40 41 friend class bncSettings; 42 QSettings::SettingsMap _settings; 41 public: 42 enum e_mode {interactive, nonInteractive, batchPostProcessing}; 43 t_bncCore(); 44 virtual ~t_bncCore(); 45 static t_bncCore* instance(); 46 e_mode mode() const {return _mode;} 47 void setGUIenabled(bool GUIenabled) {_GUIenabled = GUIenabled;} 48 void setMode(e_mode mode) {_mode = mode;} 49 void setPort(int port); 50 void setPortCorr(int port); 51 void setCaster(bncCaster* caster) {_caster = caster;} 52 const bncCaster* caster() const {return _caster;} 53 bool dateAndTimeGPSSet() const; 54 QDateTime dateAndTimeGPS() const; 55 void setDateAndTimeGPS(QDateTime dateTime); 56 void setConfFileName(const QString& confFileName); 57 QString confFileName() const {return _confFileName;} 58 void writeRawData(const QByteArray& data, const QByteArray& staID, 59 const QByteArray& format); 60 void storeGlonassSlotNums(const int GLOFreq[]); 61 void getGlonassSlotNums(int GLOFreq[]); 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;} 43 69 44 public: 45 enum e_mode {interactive, nonInteractive, batchPostProcessing}; 46 t_bncCore(); 47 virtual ~t_bncCore(); 48 e_mode mode() const {return _mode;} 49 void setGUIenabled(bool GUIenabled) {_GUIenabled = GUIenabled;} 50 void setMode(e_mode mode) {_mode = mode;} 51 void setPort(int port); 52 void setPortCorr(int port); 53 void setCaster(bncCaster* caster) {_caster = caster;} 54 const bncCaster* caster() const {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 storeGlonassSlotNums(const int GLOFreq[]); 63 void getGlonassSlotNums(int GLOFreq[]); 64 void initCombination(); 65 void stopCombination(); 66 const QString& pgmName() {return _pgmName;} 67 const QString& userName() {return _userName;} 68 QWidget* mainWindow() const {return _mainWindow;}; 69 void setMainWindow(QWidget* mainWindow){_mainWindow = mainWindow;} 70 bool GUIenabled() const {return _GUIenabled;} 70 QMap<int, bncTableItem*> _uploadTableItems; 71 71 72 73 74 75 76 77 78 72 public slots: 73 void slotMessage(QByteArray msg, bool showOnScreen); 74 void slotNewGPSEph(gpsephemeris* gpseph); 75 void slotNewGlonassEph(glonassephemeris* glonasseph, const QString& staID); 76 void slotNewGalileoEph(galileoephemeris* galileoeph); 77 void slotNewCorrLine(QString line, QString staID, bncTime coTime); 78 void slotQuit(); 79 79 80 81 82 83 84 85 86 80 signals: 81 void newMessage(QByteArray msg, bool showOnScreen); 82 void newEphGPS(gpsephemeris gpseph); 83 void newEphGlonass(glonassephemeris glonasseph); 84 void newEphGalileo(galileoephemeris galileoeph); 85 void newCorrections(QStringList); 86 void providerIDChanged(QString); 87 87 88 88 private slots: 89 void slotNewConnection(); 90 void slotNewConnectionCorr(); 91 private: 92 void printEphHeader(); 93 void printGPSEph(gpsephemeris* ep, bool printFile); 94 void printGlonassEph(glonassephemeris* ep, bool printFile, const QString& staID); 95 void printGalileoEph(galileoephemeris* ep, bool printFile); 96 void printOutput(bool printFile, QTextStream* stream, 97 const QString& strV2, const QString& strV3); 98 void dumpCorrs(bncTime minTime, bncTime maxTime); 99 void dumpCorrs(); 100 void dumpCorrs(const QStringList& allCorrs); 101 void messagePrivate(const QByteArray& msg); 102 void checkEphemeris(gpsephemeris* oldEph, gpsephemeris* newEph); 89 void slotNewConnection(); 90 void slotNewConnectionCorr(); 103 91 104 QFile* _logFile; 105 QTextStream* _logStream; 106 int _logFileFlag; 107 QMutex _mutex; 108 QMutex _mutexMessage; 109 QString _ephPath; 110 QString _ephFileNameGPS; 111 int _rinexVers; 112 QFile* _ephFileGPS; 113 QTextStream* _ephStreamGPS; 114 QFile* _ephFileGlonass; 115 QTextStream* _ephStreamGlonass; 116 QFile* _ephFileGalileo; 117 QTextStream* _ephStreamGalileo; 118 gpsephemeris* _gpsEph[PRN_GPS_END - PRN_GPS_START + 1]; 119 glonassephemeris* _glonassEph[PRN_GLONASS_END - PRN_GLONASS_START + 1]; 120 galileoephemeris* _galileoEph[PRN_GALILEO_END - PRN_GALILEO_START + 1]; 121 QString _userName; 122 QString _pgmName; 123 int _port; 124 QTcpServer* _server; 125 QList<QTcpSocket*>* _sockets; 126 int _portCorr; 127 QTcpServer* _serverCorr; 128 QList<QTcpSocket*>* _socketsCorr; 129 int _portNMEA; 130 QTcpServer* _serverNMEA; 131 QList<QTcpSocket*>* _socketsNMEA; 132 bncCaster* _caster; 133 QMap<QString, bncTime> _lastCorrDumpTime; 134 double _waitCoTime; 135 QMultiMap<bncTime, QString>* _corrs; 136 QString _confFileName; 137 QDate _fileDate; 138 bncRawFile* _rawFile; 139 int _GLOFreq[PRN_GLONASS_NUM]; 140 bncComb* _bncComb; 141 e_mode _mode; 142 QWidget* _mainWindow; 143 bool _GUIenabled; 144 QDateTime* _dateAndTimeGPS; 145 mutable QMutex _mutexDateAndTimeGPS; 146 public: 147 bncPPPclient* _bncPPPclient; 148 QMap<int, bncTableItem*> _uploadTableItems; 92 private: 93 void printEphHeader(); 94 void printGPSEph(gpsephemeris* ep, bool printFile); 95 void printGlonassEph(glonassephemeris* ep, bool printFile, const QString& staID); 96 void printGalileoEph(galileoephemeris* ep, bool printFile); 97 void printOutput(bool printFile, QTextStream* stream, 98 const QString& strV2, const QString& strV3); 99 void dumpCorrs(bncTime minTime, bncTime maxTime); 100 void dumpCorrs(); 101 void dumpCorrs(const QStringList& allCorrs); 102 void messagePrivate(const QByteArray& msg); 103 void checkEphemeris(gpsephemeris* oldEph, gpsephemeris* newEph); 104 105 QSettings::SettingsMap _settings; 106 QFile* _logFile; 107 QTextStream* _logStream; 108 int _logFileFlag; 109 QMutex _mutex; 110 QMutex _mutexMessage; 111 QString _ephPath; 112 QString _ephFileNameGPS; 113 int _rinexVers; 114 QFile* _ephFileGPS; 115 QTextStream* _ephStreamGPS; 116 QFile* _ephFileGlonass; 117 QTextStream* _ephStreamGlonass; 118 QFile* _ephFileGalileo; 119 QTextStream* _ephStreamGalileo; 120 gpsephemeris* _gpsEph[PRN_GPS_END - PRN_GPS_START + 1]; 121 glonassephemeris* _glonassEph[PRN_GLONASS_END - PRN_GLONASS_START + 1]; 122 galileoephemeris* _galileoEph[PRN_GALILEO_END - PRN_GALILEO_START + 1]; 123 QString _userName; 124 QString _pgmName; 125 int _port; 126 QTcpServer* _server; 127 QList<QTcpSocket*>* _sockets; 128 int _portCorr; 129 QTcpServer* _serverCorr; 130 QList<QTcpSocket*>* _socketsCorr; 131 int _portNMEA; 132 QTcpServer* _serverNMEA; 133 QList<QTcpSocket*>* _socketsNMEA; 134 bncCaster* _caster; 135 QMap<QString, bncTime> _lastCorrDumpTime; 136 double _waitCoTime; 137 QMultiMap<bncTime, QString>* _corrs; 138 QString _confFileName; 139 QDate _fileDate; 140 bncRawFile* _rawFile; 141 int _GLOFreq[PRN_GLONASS_NUM]; 142 bncComb* _bncComb; 143 e_mode _mode; 144 QWidget* _mainWindow; 145 bool _GUIenabled; 146 QDateTime* _dateAndTimeGPS; 147 mutable QMutex _mutexDateAndTimeGPS; 149 148 }; 150 149 151 t_bncCore& bncCoreInstance(); 152 153 #define BNC_CORE (&bncCoreInstance()) 150 #define BNC_CORE (t_bncCore::instance()) 154 151 155 152 #endif
Note:
See TracChangeset
for help on using the changeset viewer.