Changeset 1138 in ntrip for trunk/BNC/bncmain.cpp


Ignore:
Timestamp:
Oct 2, 2008, 3:23:09 PM (16 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncmain.cpp

    r1095 r1138  
    115115  else {
    116116
     117    signal(SIGINT, catch_signal);
     118
    117119    bncCaster* caster = new bncCaster(settings.value("outFile").toString(),
    118120                                      settings.value("outPort").toInt());
    119121   
    120122    app.setCaster(caster);
    121 
    122     // Ctrl-C Signal Handling
    123     // ----------------------
    124     signal(SIGINT, catch_signal);
    125 
    126     //// beg test
    127     ////    QTimer::singleShot(30000, &app, SLOT(slotQuit()));
    128     //// end test
    129 
    130123    app.setPort(settings.value("outEphPort").toInt());
    131124    app.setPortCorr(settings.value("corrPort").toInt());
     
    137130    ((bncApp*)qApp)->slotMessage("============ Start BNC ============");
    138131
    139     int iMount = -1;
    140     QListIterator<QString> it(settings.value("mountPoints").toStringList());
    141     while (it.hasNext()) {
    142       ++iMount;
    143       QStringList hlp = it.next().split(" ");
    144       if (hlp.size() <= 1) continue;
    145       QUrl url(hlp[0]);
    146       QByteArray format = hlp[1].toAscii();
    147       QByteArray latitude = hlp[2].toAscii();
    148       QByteArray longitude = hlp[3].toAscii();
    149       QByteArray nmea = hlp[4].toAscii();
    150       bncGetThread* getThread = new bncGetThread(url, format, latitude, longitude, nmea, iMount);
     132    if (false) {
     133      bncGetThread* getThread = new bncGetThread("FFMJ2.raw","RTCM_3");
    151134      app.connect(getThread, SIGNAL(newMessage(QByteArray)),
    152135                  &app, SLOT(slotMessage(const QByteArray)));
    153 
     136     
    154137      caster->addGetThread(getThread);
    155 
     138     
    156139      getThread->start();
    157140    }
    158     if (caster->numStations() == 0) {
    159       return 0;
     141    else {
     142      int iMount = -1;
     143      QListIterator<QString> it(settings.value("mountPoints").toStringList());
     144      while (it.hasNext()) {
     145        ++iMount;
     146        QStringList hlp = it.next().split(" ");
     147        if (hlp.size() <= 1) continue;
     148        QUrl url(hlp[0]);
     149        QByteArray format = hlp[1].toAscii();
     150        QByteArray latitude = hlp[2].toAscii();
     151        QByteArray longitude = hlp[3].toAscii();
     152        QByteArray nmea = hlp[4].toAscii();
     153     
     154        bncGetThread* getThread = new bncGetThread(url, format, latitude, longitude, nmea, iMount);
     155     
     156        app.connect(getThread, SIGNAL(newMessage(QByteArray)),
     157                    &app, SLOT(slotMessage(const QByteArray)));
     158     
     159        caster->addGetThread(getThread);
     160     
     161        getThread->start();
     162      }
     163      if (caster->numStations() == 0) {
     164        return 0;
     165      }
    160166    }
    161167  }
Note: See TracChangeset for help on using the changeset viewer.