Changeset 298 in ntrip


Ignore:
Timestamp:
Nov 12, 2006, 4:44:10 PM (17 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncrinex.cpp

    r292 r298  
    4040 * -----------------------------------------------------------------------*/
    4141
     42#include <iostream.h>
     43
    4244#include <stdlib.h>
    4345
     
    5557#include "bncutils.h"
    5658#include "bncconst.h"
     59#include "bnctabledlg.h"
    5760#include "RTCM3/rtcm3torinex.h"
    5861
     
    97100      if (_headerLines.last().indexOf("END OF HEADER") != -1) {
    98101        break;
     102      }
     103    }
     104  }
     105
     106  // Try to download the skeleton file
     107  // ---------------------------------
     108  else {
     109    QStringList table;
     110    bncTableDlg::getFullTable(_mountPoint.host(), _mountPoint.port(),
     111                              table, false);
     112    QString net;
     113    QStringListIterator it(table);
     114    while (it.hasNext()) {
     115      QString line = it.next();
     116      if (line.indexOf("STR") == 0) {
     117        QStringList tags = line.split(";");
     118        if (tags.at(1) == _mountPoint.path().mid(1).toAscii()) {
     119          net = tags.at(7);
     120          break;
     121        }
     122      }
     123    }
     124    QString sklDir;
     125    it.toFront();
     126    while (it.hasNext()) {
     127      QString line = it.next();
     128      if (line.indexOf("NET") == 0) {
     129        QStringList tags = line.split(";");
     130        if (tags.at(1) == net) {
     131          sklDir = tags.at(6);
     132          cout << _mountPoint.path().mid(1).toAscii().data() << " "
     133               << sklDir.toAscii().data() << endl;
     134          break;
     135        }         
    99136      }
    100137    }
  • trunk/BNC/bnctabledlg.cpp

    r280 r298  
    119119////////////////////////////////////////////////////////////////////////////
    120120t_irc bncTableDlg::getFullTable(const QString& casterHost,
    121                                 int casterPort, QStringList& allLines) {
     121                                int casterPort, QStringList& allLines,
     122                                bool alwaysRead) {
     123
     124  static QMap<QString, QStringList> allTables;
     125
     126  if (!alwaysRead && allTables.find(casterHost) != allTables.end()) {
     127    allLines = allTables.find(casterHost).value();
     128    return success;
     129  }
    122130
    123131  allLines.clear();
     
    168176  delete socket;
    169177
     178  allTables.insert(casterHost, allLines);
    170179  return success;
    171180}
Note: See TracChangeset for help on using the changeset viewer.