Changeset 6141 in ntrip for trunk/BNC/src/bnccore.cpp
- Timestamp:
- Sep 13, 2014, 5:08:22 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bnccore.cpp
r6051 r6141 118 118 _userName = _userName.leftJustified(20, ' ', true); 119 119 120 _corrs = new QMultiMap<bncTime, QString>;120 _corrs = new QMultiMap<bncTime, t_clkCorr>; 121 121 122 122 _dateAndTimeGPS = 0; … … 633 633 //////////////////////////////////////////////////////////////////////////// 634 634 void t_bncCore::slotQuit() { 635 cout << "t_bncCore::slotQuit" << endl;636 635 delete _caster; _caster = 0; 637 636 qApp->quit(); … … 640 639 // 641 640 //////////////////////////////////////////////////////////////////////////// 642 void t_bncCore::slotNewCorrLine(QString line, QString staID, bncTime coTime) { 643 641 void t_bncCore::slotNewOrbCorrections(QList<t_orbCorr> orbCorrections) { 642 emit newOrbCorrections(orbCorrections); 643 } 644 645 // 646 //////////////////////////////////////////////////////////////////////////// 647 void t_bncCore::slotNewClkCorrections(QList<t_clkCorr> clkCorrections) { 644 648 QMutexLocker locker(&_mutex); 649 650 if (clkCorrections.size() == 0) { 651 return; 652 } 653 bncTime coTime = clkCorrections[0]._time; 654 QString staID(clkCorrections[0]._staID.c_str()); 645 655 646 656 // Combination of Corrections … … 648 658 #ifdef USE_COMBINATION 649 659 if (_bncComb) { 650 _bncComb->processC orrLine(staID, line);660 _bncComb->processClkCorrections(clkCorrections); 651 661 } 652 662 #endif … … 677 687 } 678 688 679 _corrs->insert(coTime, QString(line + " " + staID)); 689 for (int ii = 0; ii < clkCorrections.size(); ii++) { 690 _corrs->insert(coTime, clkCorrections[ii]); 691 } 680 692 681 693 // Dump Corrections … … 693 705 //////////////////////////////////////////////////////////////////////////// 694 706 void t_bncCore::dumpCorrs(bncTime minTime, bncTime maxTime) { 695 Q StringListallCorrs;696 QMutableMapIterator<bncTime, QString> it(*_corrs);707 QList<t_clkCorr> allCorrs; 708 QMutableMapIterator<bncTime, t_clkCorr> it(*_corrs); 697 709 while (it.hasNext()) { 698 710 it.next(); … … 709 721 //////////////////////////////////////////////////////////////////////////// 710 722 void t_bncCore::dumpCorrs() { 711 Q StringListallCorrs;712 QMutableMapIterator<bncTime, QString> it(*_corrs);723 QList<t_clkCorr> allCorrs; 724 QMutableMapIterator<bncTime, t_clkCorr> it(*_corrs); 713 725 while (it.hasNext()) { 714 726 allCorrs << it.next().value(); … … 720 732 // Dump List of Corrections 721 733 //////////////////////////////////////////////////////////////////////////// 722 void t_bncCore::dumpCorrs(const Q StringList& allCorrs) {723 emit newC orrections(allCorrs);734 void t_bncCore::dumpCorrs(const QList<t_clkCorr>& allCorrs) { 735 emit newClkCorrections(allCorrs); 724 736 if (_socketsCorr) { 725 QListIterator< QString> it(allCorrs);737 QListIterator<t_clkCorr> it(allCorrs); 726 738 while (it.hasNext()) { 727 QString corrLine = it.next() + "\n"; 728 739 const t_clkCorr& corr = it.next(); 729 740 QMutableListIterator<QTcpSocket*> is(*_socketsCorr); 730 741 while (is.hasNext()) { 731 742 QTcpSocket* sock = is.next(); 732 743 if (sock->state() == QAbstractSocket::ConnectedState) { 733 if (sock->write(corr Line.toAscii()) == -1) {744 if (sock->write(corr.toString().c_str()) == -1) { 734 745 delete sock; 735 746 is.remove();
Note:
See TracChangeset
for help on using the changeset viewer.