Changeset 5072 in ntrip for trunk/BNC


Ignore:
Timestamp:
Mar 30, 2013, 11:49:30 AM (11 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTCM3/ephemeris.cpp

    r5070 r5072  
    416416    }
    417417
    418     if (timeChanged && BNC_CORE->mode() == t_pgmCore::batchPostProcessing) {
     418    if (timeChanged && BNC_CORE->mode() == t_bncCore::batchPostProcessing) {
    419419      bncTime newHTime(ww, (double) tow);
    420420      cout << "GLONASS " << ee->almanac_number <<  " Time Changed at "
  • trunk/BNC/src/app.cpp

    r5070 r5072  
    2222// Global Variable
    2323////////////////////////////////////////////////////////////////////////////
    24 t_pgmCore* BNC_CORE = 0;
     24t_bncCore* BNC_CORE = 0;
    2525
    2626// Constructor
     
    2828t_app::t_app(int& argc, char* argv[], bool GUIenabled) :
    2929  QApplication(argc, argv, GUIenabled) {
    30   BNC_CORE = new t_pgmCore(argc, argv, GUIenabled);
     30  BNC_CORE = new t_bncCore(argc, argv, GUIenabled);
    3131}
    3232
  • trunk/BNC/src/app.h

    r5069 r5072  
    33
    44#include <QtGui>
    5 
    6 class t_pgmCore;
    75
    86class t_app : public QApplication {
     
    1412  virtual bool event(QEvent* ev);
    1513 private:
    16   t_pgmCore* _pgmCore;
    1714};
    1815
  • trunk/BNC/src/bnccore.cpp

    r5070 r5072  
    2727 * -------------------------------------------------------------------------
    2828 *
    29  * Class:      t_pgmCore
     29 * Class:      t_bncCore
    3030 *
    3131 * Purpose:    This class implements the main application
     
    5858// Constructor
    5959////////////////////////////////////////////////////////////////////////////
    60 t_pgmCore::t_pgmCore(int& argc, char* argv[], bool GUIenabled) {
     60t_bncCore::t_bncCore(int& argc, char* argv[], bool GUIenabled) {
    6161  _GUIenabled  = GUIenabled;
    6262  _logFileFlag = 0;
     
    125125// Destructor
    126126////////////////////////////////////////////////////////////////////////////
    127 t_pgmCore::~t_pgmCore() {
     127t_bncCore::~t_bncCore() {
    128128  delete _logStream;
    129129  delete _logFile;
     
    161161// Write a Program Message
    162162////////////////////////////////////////////////////////////////////////////
    163 void t_pgmCore::slotMessage(QByteArray msg, bool showOnScreen) {
     163void t_bncCore::slotMessage(QByteArray msg, bool showOnScreen) {
    164164
    165165  QMutexLocker locker(&_mutexMessage);
     
    171171// Write a Program Message (private, no lock)
    172172////////////////////////////////////////////////////////////////////////////
    173 void t_pgmCore::messagePrivate(const QByteArray& msg) {
     173void t_bncCore::messagePrivate(const QByteArray& msg) {
    174174
    175175  // First time resolve the log file name
     
    213213// New GPS Ephemeris
    214214////////////////////////////////////////////////////////////////////////////
    215 void t_pgmCore::slotNewGPSEph(gpsephemeris* gpseph) {
     215void t_bncCore::slotNewGPSEph(gpsephemeris* gpseph) {
    216216
    217217  QMutexLocker locker(&_mutex);
     
    244244// New Glonass Ephemeris
    245245////////////////////////////////////////////////////////////////////////////
    246 void t_pgmCore::slotNewGlonassEph(glonassephemeris* glonasseph) {
     246void t_bncCore::slotNewGlonassEph(glonassephemeris* glonasseph) {
    247247
    248248  QMutexLocker locker(&_mutex);
     
    290290// New Galileo Ephemeris
    291291////////////////////////////////////////////////////////////////////////////
    292 void t_pgmCore::slotNewGalileoEph(galileoephemeris* galileoeph) {
     292void t_bncCore::slotNewGalileoEph(galileoephemeris* galileoeph) {
    293293
    294294  QMutexLocker locker(&_mutex);
     
    325325// Print Header of the output File(s)
    326326////////////////////////////////////////////////////////////////////////////
    327 void t_pgmCore::printEphHeader() {
     327void t_bncCore::printEphHeader() {
    328328
    329329  bncSettings settings;
     
    497497// Print One GPS Ephemeris
    498498////////////////////////////////////////////////////////////////////////////
    499 void t_pgmCore::printGPSEph(gpsephemeris* ep, bool printFile) {
     499void t_bncCore::printGPSEph(gpsephemeris* ep, bool printFile) {
    500500
    501501  t_ephGPS eph;
     
    510510// Print One Glonass Ephemeris
    511511////////////////////////////////////////////////////////////////////////////
    512 void t_pgmCore::printGlonassEph(glonassephemeris* ep, bool printFile) {
     512void t_bncCore::printGlonassEph(glonassephemeris* ep, bool printFile) {
    513513
    514514  t_ephGlo eph;
     
    524524// Print One Galileo Ephemeris
    525525////////////////////////////////////////////////////////////////////////////
    526 void t_pgmCore::printGalileoEph(galileoephemeris* ep, bool printFile) {
     526void t_bncCore::printGalileoEph(galileoephemeris* ep, bool printFile) {
    527527
    528528  t_ephGal eph;
     
    537537// Output
    538538////////////////////////////////////////////////////////////////////////////
    539 void t_pgmCore::printOutput(bool printFile, QTextStream* stream,
     539void t_bncCore::printOutput(bool printFile, QTextStream* stream,
    540540                         const QString& strV2, const QString& strV3) {
    541541
     
    574574// Set Port Number
    575575////////////////////////////////////////////////////////////////////////////
    576 void t_pgmCore::setPort(int port) {
     576void t_bncCore::setPort(int port) {
    577577  _port = port;
    578578  if (_port != 0) {
     
    580580    _server = new QTcpServer;
    581581    if ( !_server->listen(QHostAddress::Any, _port) ) {
    582       slotMessage("t_pgmCore: Cannot listen on ephemeris port", true);
     582      slotMessage("t_bncCore: Cannot listen on ephemeris port", true);
    583583    }
    584584    connect(_server, SIGNAL(newConnection()), this, SLOT(slotNewConnection()));
     
    590590// Set Port Number
    591591////////////////////////////////////////////////////////////////////////////
    592 void t_pgmCore::setPortCorr(int port) {
     592void t_bncCore::setPortCorr(int port) {
    593593  _portCorr = port;
    594594  if (_portCorr != 0) {
     
    596596    _serverCorr = new QTcpServer;
    597597    if ( !_serverCorr->listen(QHostAddress::Any, _portCorr) ) {
    598       slotMessage("t_pgmCore: Cannot listen on correction port", true);
     598      slotMessage("t_bncCore: Cannot listen on correction port", true);
    599599    }
    600600    connect(_serverCorr, SIGNAL(newConnection()), this, SLOT(slotNewConnectionCorr()));
     
    606606// New Connection
    607607////////////////////////////////////////////////////////////////////////////
    608 void t_pgmCore::slotNewConnection() {
     608void t_bncCore::slotNewConnection() {
    609609  _sockets->push_back( _server->nextPendingConnection() );
    610610}
     
    612612// New Connection
    613613////////////////////////////////////////////////////////////////////////////
    614 void t_pgmCore::slotNewConnectionCorr() {
     614void t_bncCore::slotNewConnectionCorr() {
    615615  _socketsCorr->push_back( _serverCorr->nextPendingConnection() );
    616616}
     
    618618//
    619619////////////////////////////////////////////////////////////////////////////
    620 void t_pgmCore::slotQuit() {
    621   cout << "t_pgmCore::slotQuit" << endl;
     620void t_bncCore::slotQuit() {
     621  cout << "t_bncCore::slotQuit" << endl;
    622622  delete _caster;
    623623  qApp->quit();
     
    626626//
    627627////////////////////////////////////////////////////////////////////////////
    628 void t_pgmCore::slotNewCorrLine(QString line, QString staID, long coTime) {
     628void t_bncCore::slotNewCorrLine(QString line, QString staID, long coTime) {
    629629
    630630  QMutexLocker locker(&_mutex);
     
    678678// Dump Complete Correction Epochs
    679679////////////////////////////////////////////////////////////////////////////
    680 void t_pgmCore::dumpCorrs(long minTime, long maxTime) {
     680void t_bncCore::dumpCorrs(long minTime, long maxTime) {
    681681  for (long sec = minTime; sec <= maxTime; sec++) {
    682682    QList<QString> allCorrs = _corrs->values(sec);
     
    688688// Dump all corrections
    689689////////////////////////////////////////////////////////////////////////////
    690 void t_pgmCore::dumpCorrs() {
     690void t_bncCore::dumpCorrs() {
    691691  QList<QString> allCorrs;
    692692  QMutableMapIterator<long, QString> it(*_corrs);
     
    700700// Dump List of Corrections
    701701////////////////////////////////////////////////////////////////////////////
    702 void t_pgmCore::dumpCorrs(const QList<QString>& allCorrs) {
     702void t_bncCore::dumpCorrs(const QList<QString>& allCorrs) {
    703703  emit newCorrections(allCorrs);
    704704  if (_socketsCorr) {
     
    727727//
    728728////////////////////////////////////////////////////////////////////////////
    729 void t_pgmCore::setConfFileName(const QString& confFileName) {
     729void t_bncCore::setConfFileName(const QString& confFileName) {
    730730  if (confFileName.isEmpty()) {
    731731    _confFileName = QDir::homePath() + QDir::separator()
     
    741741// Raw Output
    742742////////////////////////////////////////////////////////////////////////////
    743 void t_pgmCore::writeRawData(const QByteArray& data, const QByteArray& staID,
     743void t_bncCore::writeRawData(const QByteArray& data, const QByteArray& staID,
    744744                          const QByteArray& format) {
    745745
     
    761761// Get Glonass Slot Numbers from Global Array
    762762////////////////////////////////////////////////////////////////////////////
    763 void t_pgmCore::getGlonassSlotNums(int GLOFreq[]) {
     763void t_bncCore::getGlonassSlotNums(int GLOFreq[]) {
    764764
    765765  QMutexLocker locker(&_mutex);
     
    774774// Store Glonass Slot Numbers to Global Array
    775775////////////////////////////////////////////////////////////////////////////
    776 void t_pgmCore::storeGlonassSlotNums(const int GLOFreq[]) {
     776void t_bncCore::storeGlonassSlotNums(const int GLOFreq[]) {
    777777
    778778  QMutexLocker locker(&_mutex);
     
    787787//
    788788////////////////////////////////////////////////////////////////////////////
    789 void t_pgmCore::initCombination() {
     789void t_bncCore::initCombination() {
    790790#ifdef USE_COMBINATION
    791791  _bncComb = new bncComb();
     
    799799//
    800800////////////////////////////////////////////////////////////////////////////
    801 void t_pgmCore::stopCombination() {
     801void t_bncCore::stopCombination() {
    802802#ifdef USE_COMBINATION
    803803  delete _bncComb;
     
    808808// Check Ephemeris Consistency
    809809////////////////////////////////////////////////////////////////////////////
    810 void t_pgmCore::checkEphemeris(gpsephemeris* oldEph, gpsephemeris* newEph) {
     810void t_bncCore::checkEphemeris(gpsephemeris* oldEph, gpsephemeris* newEph) {
    811811  if (oldEph->clock_bias      != newEph->clock_bias      ||
    812812      oldEph->clock_drift     != newEph->clock_drift     ||
  • trunk/BNC/src/bnccore.h

    r5070 r5072  
    3636class bncTableItem;
    3737
    38 class t_pgmCore : public QObject {
     38class t_bncCore : public QObject {
    3939  Q_OBJECT
    4040
     
    4444  public:
    4545    enum e_mode {interactive, nonInteractive, batchPostProcessing};
    46     t_pgmCore(int& argc, char* argv[], bool GUIenabled);
    47     virtual ~t_pgmCore(); 
     46    t_bncCore(int& argc, char* argv[], bool GUIenabled);
     47    virtual ~t_bncCore(); 
    4848    e_mode mode() const {return _mode;}
    4949    void   setMode(e_mode mode) {_mode = mode;}
     
    142142};
    143143
    144 extern t_pgmCore* BNC_CORE;
     144extern t_bncCore* BNC_CORE;
    145145
    146146#endif
  • trunk/BNC/src/bncmain.cpp

    r5070 r5072  
    138138  if (interactive) {
    139139
    140     BNC_CORE->setMode(t_pgmCore::interactive);
     140    BNC_CORE->setMode(t_bncCore::interactive);
    141141
    142142    QString fontString = settings.value("font").toString();
     
    160160  // -------------------
    161161  else if (settings.value("pppSPP").toString() == "Post-Processing") {
    162     BNC_CORE->setMode(t_pgmCore::batchPostProcessing);
     162    BNC_CORE->setMode(t_bncCore::batchPostProcessing);
    163163    t_postProcessing* postProcessing = new t_postProcessing(0);
    164164    postProcessing->start();
     
    168168  // -------------------------
    169169  else if (settings.value("reqcAction").toString() == "Edit/Concatenate") {
    170     BNC_CORE->setMode(t_pgmCore::batchPostProcessing);
     170    BNC_CORE->setMode(t_bncCore::batchPostProcessing);
    171171    t_reqcEdit* reqcEdit = new t_reqcEdit(0);
    172172    reqcEdit->start();
     
    176176  // ----------------------------
    177177  else if (settings.value("reqcAction").toString() == "Analyze") {
    178     BNC_CORE->setMode(t_pgmCore::batchPostProcessing);
     178    BNC_CORE->setMode(t_bncCore::batchPostProcessing);
    179179    t_reqcAnalyze* reqcAnalyze = new t_reqcAnalyze(0);
    180180    reqcAnalyze->start();
     
    206206    // --------------------------------
    207207    if ( rawFileName.isEmpty() ) {
    208       BNC_CORE->setMode(t_pgmCore::nonInteractive);
     208      BNC_CORE->setMode(t_bncCore::nonInteractive);
    209209      caster->readMountPoints();
    210210      if (caster->numStations() == 0) {
     
    216216    // -----------------------------
    217217    else {
    218       BNC_CORE->setMode(t_pgmCore::batchPostProcessing);
     218      BNC_CORE->setMode(t_bncCore::batchPostProcessing);
    219219      bncRawFile*   rawFile   = new bncRawFile(rawFileName, "",
    220220                                               bncRawFile::input);
  • trunk/BNC/src/rinex/bncpostprocess.cpp

    r5070 r5072  
    222222  }
    223223
    224   if (BNC_CORE->mode() != t_pgmCore::interactive) {
     224  if (BNC_CORE->mode() != t_bncCore::interactive) {
    225225    qApp->exit(0);
    226226  }
  • trunk/BNC/src/rinex/reqcanalyze.cpp

    r5070 r5072  
    101101  delete _log;     _log     = 0;
    102102  delete _logFile; _logFile = 0;
    103   if (BNC_CORE->mode() != t_pgmCore::interactive) {
     103  if (BNC_CORE->mode() != t_bncCore::interactive) {
    104104    qApp->exit(0);
    105105  }
  • trunk/BNC/src/rinex/reqcedit.cpp

    r5070 r5072  
    146146  // Exit (thread)
    147147  // -------------
    148   if (BNC_CORE->mode() != t_pgmCore::interactive) {
     148  if (BNC_CORE->mode() != t_bncCore::interactive) {
    149149    qApp->exit(0);
    150150  }
Note: See TracChangeset for help on using the changeset viewer.