Changeset 5072 in ntrip for trunk/BNC/src/bnccore.cpp


Ignore:
Timestamp:
Mar 30, 2013, 11:49:30 AM (11 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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     ||
Note: See TracChangeset for help on using the changeset viewer.