Changeset 1138 in ntrip for trunk/BNC/bncmain.cpp
- Timestamp:
- Oct 2, 2008, 3:23:09 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncmain.cpp
r1095 r1138 115 115 else { 116 116 117 signal(SIGINT, catch_signal); 118 117 119 bncCaster* caster = new bncCaster(settings.value("outFile").toString(), 118 120 settings.value("outPort").toInt()); 119 121 120 122 app.setCaster(caster); 121 122 // Ctrl-C Signal Handling123 // ----------------------124 signal(SIGINT, catch_signal);125 126 //// beg test127 //// QTimer::singleShot(30000, &app, SLOT(slotQuit()));128 //// end test129 130 123 app.setPort(settings.value("outEphPort").toInt()); 131 124 app.setPortCorr(settings.value("corrPort").toInt()); … … 137 130 ((bncApp*)qApp)->slotMessage("============ Start BNC ============"); 138 131 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"); 151 134 app.connect(getThread, SIGNAL(newMessage(QByteArray)), 152 135 &app, SLOT(slotMessage(const QByteArray))); 153 136 154 137 caster->addGetThread(getThread); 155 138 156 139 getThread->start(); 157 140 } 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 } 160 166 } 161 167 }
Note:
See TracChangeset
for help on using the changeset viewer.