Changeset 5072 in ntrip for trunk/BNC/src/bnccore.cpp
- Timestamp:
- Mar 30, 2013, 11:49:30 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bnccore.cpp
r5070 r5072 27 27 * ------------------------------------------------------------------------- 28 28 * 29 * Class: t_ pgmCore29 * Class: t_bncCore 30 30 * 31 31 * Purpose: This class implements the main application … … 58 58 // Constructor 59 59 //////////////////////////////////////////////////////////////////////////// 60 t_ pgmCore::t_pgmCore(int& argc, char* argv[], bool GUIenabled) {60 t_bncCore::t_bncCore(int& argc, char* argv[], bool GUIenabled) { 61 61 _GUIenabled = GUIenabled; 62 62 _logFileFlag = 0; … … 125 125 // Destructor 126 126 //////////////////////////////////////////////////////////////////////////// 127 t_ pgmCore::~t_pgmCore() {127 t_bncCore::~t_bncCore() { 128 128 delete _logStream; 129 129 delete _logFile; … … 161 161 // Write a Program Message 162 162 //////////////////////////////////////////////////////////////////////////// 163 void t_ pgmCore::slotMessage(QByteArray msg, bool showOnScreen) {163 void t_bncCore::slotMessage(QByteArray msg, bool showOnScreen) { 164 164 165 165 QMutexLocker locker(&_mutexMessage); … … 171 171 // Write a Program Message (private, no lock) 172 172 //////////////////////////////////////////////////////////////////////////// 173 void t_ pgmCore::messagePrivate(const QByteArray& msg) {173 void t_bncCore::messagePrivate(const QByteArray& msg) { 174 174 175 175 // First time resolve the log file name … … 213 213 // New GPS Ephemeris 214 214 //////////////////////////////////////////////////////////////////////////// 215 void t_ pgmCore::slotNewGPSEph(gpsephemeris* gpseph) {215 void t_bncCore::slotNewGPSEph(gpsephemeris* gpseph) { 216 216 217 217 QMutexLocker locker(&_mutex); … … 244 244 // New Glonass Ephemeris 245 245 //////////////////////////////////////////////////////////////////////////// 246 void t_ pgmCore::slotNewGlonassEph(glonassephemeris* glonasseph) {246 void t_bncCore::slotNewGlonassEph(glonassephemeris* glonasseph) { 247 247 248 248 QMutexLocker locker(&_mutex); … … 290 290 // New Galileo Ephemeris 291 291 //////////////////////////////////////////////////////////////////////////// 292 void t_ pgmCore::slotNewGalileoEph(galileoephemeris* galileoeph) {292 void t_bncCore::slotNewGalileoEph(galileoephemeris* galileoeph) { 293 293 294 294 QMutexLocker locker(&_mutex); … … 325 325 // Print Header of the output File(s) 326 326 //////////////////////////////////////////////////////////////////////////// 327 void t_ pgmCore::printEphHeader() {327 void t_bncCore::printEphHeader() { 328 328 329 329 bncSettings settings; … … 497 497 // Print One GPS Ephemeris 498 498 //////////////////////////////////////////////////////////////////////////// 499 void t_ pgmCore::printGPSEph(gpsephemeris* ep, bool printFile) {499 void t_bncCore::printGPSEph(gpsephemeris* ep, bool printFile) { 500 500 501 501 t_ephGPS eph; … … 510 510 // Print One Glonass Ephemeris 511 511 //////////////////////////////////////////////////////////////////////////// 512 void t_ pgmCore::printGlonassEph(glonassephemeris* ep, bool printFile) {512 void t_bncCore::printGlonassEph(glonassephemeris* ep, bool printFile) { 513 513 514 514 t_ephGlo eph; … … 524 524 // Print One Galileo Ephemeris 525 525 //////////////////////////////////////////////////////////////////////////// 526 void t_ pgmCore::printGalileoEph(galileoephemeris* ep, bool printFile) {526 void t_bncCore::printGalileoEph(galileoephemeris* ep, bool printFile) { 527 527 528 528 t_ephGal eph; … … 537 537 // Output 538 538 //////////////////////////////////////////////////////////////////////////// 539 void t_ pgmCore::printOutput(bool printFile, QTextStream* stream,539 void t_bncCore::printOutput(bool printFile, QTextStream* stream, 540 540 const QString& strV2, const QString& strV3) { 541 541 … … 574 574 // Set Port Number 575 575 //////////////////////////////////////////////////////////////////////////// 576 void t_ pgmCore::setPort(int port) {576 void t_bncCore::setPort(int port) { 577 577 _port = port; 578 578 if (_port != 0) { … … 580 580 _server = new QTcpServer; 581 581 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); 583 583 } 584 584 connect(_server, SIGNAL(newConnection()), this, SLOT(slotNewConnection())); … … 590 590 // Set Port Number 591 591 //////////////////////////////////////////////////////////////////////////// 592 void t_ pgmCore::setPortCorr(int port) {592 void t_bncCore::setPortCorr(int port) { 593 593 _portCorr = port; 594 594 if (_portCorr != 0) { … … 596 596 _serverCorr = new QTcpServer; 597 597 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); 599 599 } 600 600 connect(_serverCorr, SIGNAL(newConnection()), this, SLOT(slotNewConnectionCorr())); … … 606 606 // New Connection 607 607 //////////////////////////////////////////////////////////////////////////// 608 void t_ pgmCore::slotNewConnection() {608 void t_bncCore::slotNewConnection() { 609 609 _sockets->push_back( _server->nextPendingConnection() ); 610 610 } … … 612 612 // New Connection 613 613 //////////////////////////////////////////////////////////////////////////// 614 void t_ pgmCore::slotNewConnectionCorr() {614 void t_bncCore::slotNewConnectionCorr() { 615 615 _socketsCorr->push_back( _serverCorr->nextPendingConnection() ); 616 616 } … … 618 618 // 619 619 //////////////////////////////////////////////////////////////////////////// 620 void t_ pgmCore::slotQuit() {621 cout << "t_ pgmCore::slotQuit" << endl;620 void t_bncCore::slotQuit() { 621 cout << "t_bncCore::slotQuit" << endl; 622 622 delete _caster; 623 623 qApp->quit(); … … 626 626 // 627 627 //////////////////////////////////////////////////////////////////////////// 628 void t_ pgmCore::slotNewCorrLine(QString line, QString staID, long coTime) {628 void t_bncCore::slotNewCorrLine(QString line, QString staID, long coTime) { 629 629 630 630 QMutexLocker locker(&_mutex); … … 678 678 // Dump Complete Correction Epochs 679 679 //////////////////////////////////////////////////////////////////////////// 680 void t_ pgmCore::dumpCorrs(long minTime, long maxTime) {680 void t_bncCore::dumpCorrs(long minTime, long maxTime) { 681 681 for (long sec = minTime; sec <= maxTime; sec++) { 682 682 QList<QString> allCorrs = _corrs->values(sec); … … 688 688 // Dump all corrections 689 689 //////////////////////////////////////////////////////////////////////////// 690 void t_ pgmCore::dumpCorrs() {690 void t_bncCore::dumpCorrs() { 691 691 QList<QString> allCorrs; 692 692 QMutableMapIterator<long, QString> it(*_corrs); … … 700 700 // Dump List of Corrections 701 701 //////////////////////////////////////////////////////////////////////////// 702 void t_ pgmCore::dumpCorrs(const QList<QString>& allCorrs) {702 void t_bncCore::dumpCorrs(const QList<QString>& allCorrs) { 703 703 emit newCorrections(allCorrs); 704 704 if (_socketsCorr) { … … 727 727 // 728 728 //////////////////////////////////////////////////////////////////////////// 729 void t_ pgmCore::setConfFileName(const QString& confFileName) {729 void t_bncCore::setConfFileName(const QString& confFileName) { 730 730 if (confFileName.isEmpty()) { 731 731 _confFileName = QDir::homePath() + QDir::separator() … … 741 741 // Raw Output 742 742 //////////////////////////////////////////////////////////////////////////// 743 void t_ pgmCore::writeRawData(const QByteArray& data, const QByteArray& staID,743 void t_bncCore::writeRawData(const QByteArray& data, const QByteArray& staID, 744 744 const QByteArray& format) { 745 745 … … 761 761 // Get Glonass Slot Numbers from Global Array 762 762 //////////////////////////////////////////////////////////////////////////// 763 void t_ pgmCore::getGlonassSlotNums(int GLOFreq[]) {763 void t_bncCore::getGlonassSlotNums(int GLOFreq[]) { 764 764 765 765 QMutexLocker locker(&_mutex); … … 774 774 // Store Glonass Slot Numbers to Global Array 775 775 //////////////////////////////////////////////////////////////////////////// 776 void t_ pgmCore::storeGlonassSlotNums(const int GLOFreq[]) {776 void t_bncCore::storeGlonassSlotNums(const int GLOFreq[]) { 777 777 778 778 QMutexLocker locker(&_mutex); … … 787 787 // 788 788 //////////////////////////////////////////////////////////////////////////// 789 void t_ pgmCore::initCombination() {789 void t_bncCore::initCombination() { 790 790 #ifdef USE_COMBINATION 791 791 _bncComb = new bncComb(); … … 799 799 // 800 800 //////////////////////////////////////////////////////////////////////////// 801 void t_ pgmCore::stopCombination() {801 void t_bncCore::stopCombination() { 802 802 #ifdef USE_COMBINATION 803 803 delete _bncComb; … … 808 808 // Check Ephemeris Consistency 809 809 //////////////////////////////////////////////////////////////////////////// 810 void t_ pgmCore::checkEphemeris(gpsephemeris* oldEph, gpsephemeris* newEph) {810 void t_bncCore::checkEphemeris(gpsephemeris* oldEph, gpsephemeris* newEph) { 811 811 if (oldEph->clock_bias != newEph->clock_bias || 812 812 oldEph->clock_drift != newEph->clock_drift ||
Note:
See TracChangeset
for help on using the changeset viewer.