source: ntrip/trunk/BNC/src/bncgetthread.cpp@ 10571

Last change on this file since 10571 was 10571, checked in by stuerze, 8 hours ago

minor changes regarding bengetthread

File size: 36.2 KB
RevLine 
[280]1// Part of BNC, a utility for retrieving decoding and
[464]2// converting GNSS data streams from NTRIP broadcasters.
[280]3//
[464]4// Copyright (C) 2007
[280]5// German Federal Agency for Cartography and Geodesy (BKG)
6// http://www.bkg.bund.de
[464]7// Czech Technical University Prague, Department of Geodesy
[280]8// http://www.fsv.cvut.cz
9//
10// Email: euref-ip@bkg.bund.de
11//
12// This program is free software; you can redistribute it and/or
13// modify it under the terms of the GNU General Public License
14// as published by the Free Software Foundation, version 2.
15//
16// This program is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with this program; if not, write to the Free Software
23// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
[35]24
25/* -------------------------------------------------------------------------
[93]26 * BKG NTRIP Client
[35]27 * -------------------------------------------------------------------------
28 *
29 * Class: bncGetThread
30 *
31 * Purpose: Thread that retrieves data from NTRIP caster
32 *
33 * Author: L. Mervart
34 *
35 * Created: 24-Dec-2005
36 *
[7486]37 * Changes:
[35]38 *
39 * -----------------------------------------------------------------------*/
40
[277]41#include <stdlib.h>
[10517]42#include <iostream>
[1044]43#include <iomanip>
[1218]44#include <sstream>
[277]45
[8127]46#include <QComboBox>
47#include <QDialog>
[35]48#include <QFile>
49#include <QTextStream>
[5524]50#include <QMutex>
[8127]51#include <QPushButton>
52#include <QTableWidget>
[356]53#include <QTime>
[35]54
55#include "bncgetthread.h"
[192]56#include "bnctabledlg.h"
[5070]57#include "bnccore.h"
[352]58#include "bncutils.h"
[8417]59#include "bnctime.h"
[423]60#include "bnczerodecoder.h"
[1621]61#include "bncnetqueryv0.h"
[1387]62#include "bncnetqueryv1.h"
63#include "bncnetqueryv2.h"
[1410]64#include "bncnetqueryrtp.h"
[1721]65#include "bncnetqueryudp.h"
[1779]66#include "bncnetqueryudp0.h"
[1753]67#include "bncnetquerys.h"
[1535]68#include "bncsettings.h"
[1558]69#include "latencychecker.h"
[3168]70#include "upload/bncrtnetdecoder.h"
[243]71#include "RTCM/RTCM2Decoder.h"
[297]72#include "RTCM3/RTCM3Decoder.h"
[1318]73#include "serial/qextserialport.h"
[35]74
75using namespace std;
76
[1143]77// Constructor 1
[35]78////////////////////////////////////////////////////////////////////////////
[2519]79bncGetThread::bncGetThread(bncRawFile* rawFile) {
[1138]80
[10517]81 _rawFile = rawFile;
82 _format = rawFile->format();
83 _staID = rawFile->staID();
84 _rawOutput = false;
[2390]85 _ntripVersion = "N";
86
[1555]87 initialize();
[1138]88}
89
[1143]90// Constructor 2
91////////////////////////////////////////////////////////////////////////////
[8082]92bncGetThread::bncGetThread(const QUrl& mountPoint, const QByteArray& format,
93 const QByteArray& latitude, const QByteArray& longitude,
94 const QByteArray& nmea, const QByteArray& ntripVersion) {
95 _rawFile = 0;
[10517]96 _mountPoint = mountPoint;
97 _staID = mountPoint.path().mid(1).toLatin1();
98 _format = format;
99 _latitude = latitude;
100 _longitude = longitude;
101 _nmea = nmea;
[1353]102 _ntripVersion = ntripVersion;
[1139]103
[2386]104 bncSettings settings;
105 if (!settings.value("rawOutFile").toString().isEmpty()) {
106 _rawOutput = true;
[8271]107 }
108 else {
[3734]109 _rawOutput = false;
[2386]110 }
[10420]111
[10517]112 _latencycheck = true; // in order to allow at least to check for reconnect
113
[10420]114 _NMEASampl = settings.value("serialNMEASampling").toInt();
115
[1139]116 initialize();
[3523]117 initDecoder();
[1139]118}
119
[1555]120// Initialization (common part of the constructor)
[1143]121////////////////////////////////////////////////////////////////////////////
[1139]122void bncGetThread::initialize() {
123
[3528]124 bncSettings settings;
125
[1555]126 setTerminationEnabled(true);
127
[7486]128 connect(this, SIGNAL(newMessage(QByteArray,bool)),
[8082]129 BNC_CORE, SLOT(slotMessage(const QByteArray,bool)));
[1555]130
[1525]131 _isToBeDeleted = false;
[8082]132 _query = 0;
133 _nextSleep = 0;
134 _miscMount = settings.value("miscMount").toString();
135 _decoder = 0;
[255]136
[7180]137 // NMEA Port
138 // -----------
139 QListIterator<QString> iSta(settings.value("PPP/staTable").toStringList());
140 int nmeaPort = 0;
141 while (iSta.hasNext()) {
142 QStringList hlp = iSta.next().split(",");
[9559]143 if (hlp.size() < 10) {
[8082]144 continue;
145 }
[8127]146 QByteArray mp = hlp[0].toLatin1();
[7180]147 if (_staID == mp) {
[9559]148 nmeaPort = hlp[9].toInt();
[7180]149 }
150 }
151 if (nmeaPort != 0) {
152 _nmeaServer = new QTcpServer;
[8921]153 _nmeaServer->setProxy(QNetworkProxy::NoProxy);
[8082]154 if (!_nmeaServer->listen(QHostAddress::Any, nmeaPort)) {
[8918]155 QString message = "bncCaster: Cannot listen on port "
[8921]156 + QByteArray::number(nmeaPort) + ": "
157 + _nmeaServer->errorString();
[8918]158 emit newMessage(message.toLatin1(), true);
[8082]159 } else {
160 connect(_nmeaServer, SIGNAL(newConnection()), this,
161 SLOT(slotNewNMEAConnection()));
162 connect(BNC_CORE, SIGNAL(newNMEAstr(QByteArray, QByteArray)), this,
163 SLOT(slotNewNMEAstr(QByteArray, QByteArray)));
[7180]164 _nmeaSockets = new QList<QTcpSocket*>;
165 _nmeaPortsMap[_staID] = nmeaPort;
166 }
167 } else {
168 _nmeaServer = 0;
169 _nmeaSockets = 0;
170 }
171
[1555]172 // Serial Port
173 // -----------
[8082]174 _serialNMEA = NO_NMEA;
[1710]175 _serialOutFile = 0;
[8082]176 _serialPort = 0;
[1710]177
[8082]178 if (!_staID.isEmpty()
179 && settings.value("serialMountPoint").toString() == _staID) {
180 _serialPort = new QextSerialPort(
181 settings.value("serialPortName").toString());
182 _serialPort->setTimeout(0, 100);
[1710]183
184 // Baud Rate
185 // ---------
[1330]186 QString hlp = settings.value("serialBaudRate").toString();
[8082]187 if (hlp == "110") {
[7486]188 _serialPort->setBaudRate(BAUD110);
[8082]189 } else if (hlp == "300") {
[7486]190 _serialPort->setBaudRate(BAUD300);
[8082]191 } else if (hlp == "600") {
[7486]192 _serialPort->setBaudRate(BAUD600);
[8082]193 } else if (hlp == "1200") {
[7486]194 _serialPort->setBaudRate(BAUD1200);
[8082]195 } else if (hlp == "2400") {
[7486]196 _serialPort->setBaudRate(BAUD2400);
[8082]197 } else if (hlp == "4800") {
[7486]198 _serialPort->setBaudRate(BAUD4800);
[8082]199 } else if (hlp == "9600") {
[7486]200 _serialPort->setBaudRate(BAUD9600);
[8082]201 } else if (hlp == "19200") {
[7486]202 _serialPort->setBaudRate(BAUD19200);
[8082]203 } else if (hlp == "38400") {
[7486]204 _serialPort->setBaudRate(BAUD38400);
[8082]205 } else if (hlp == "57600") {
[7486]206 _serialPort->setBaudRate(BAUD57600);
[8082]207 } else if (hlp == "115200") {
[7486]208 _serialPort->setBaudRate(BAUD115200);
[1330]209 }
[1710]210
211 // Parity
212 // ------
[1330]213 hlp = settings.value("serialParity").toString();
[8082]214 if (hlp == "NONE") {
[7486]215 _serialPort->setParity(PAR_NONE);
[8082]216 } else if (hlp == "ODD") {
[7486]217 _serialPort->setParity(PAR_ODD);
[8082]218 } else if (hlp == "EVEN") {
[7486]219 _serialPort->setParity(PAR_EVEN);
[8082]220 } else if (hlp == "SPACE") {
[7486]221 _serialPort->setParity(PAR_SPACE);
[1330]222 }
[1710]223
224 // Data Bits
225 // ---------
[1330]226 hlp = settings.value("serialDataBits").toString();
[8082]227 if (hlp == "5") {
[7486]228 _serialPort->setDataBits(DATA_5);
[8082]229 } else if (hlp == "6") {
[7486]230 _serialPort->setDataBits(DATA_6);
[8082]231 } else if (hlp == "7") {
[7486]232 _serialPort->setDataBits(DATA_7);
[8082]233 } else if (hlp == "8") {
[7486]234 _serialPort->setDataBits(DATA_8);
[1330]235 }
236 hlp = settings.value("serialStopBits").toString();
[8082]237 if (hlp == "1") {
[7486]238 _serialPort->setStopBits(STOP_1);
[8082]239 } else if (hlp == "2") {
[7486]240 _serialPort->setStopBits(STOP_2);
[1330]241 }
[1710]242
243 // Flow Control
244 // ------------
245 hlp = settings.value("serialFlowControl").toString();
[1711]246 if (hlp == "XONXOFF") {
[7486]247 _serialPort->setFlowControl(FLOW_XONXOFF);
[8082]248 } else if (hlp == "HARDWARE") {
[7486]249 _serialPort->setFlowControl(FLOW_HARDWARE);
[8082]250 } else {
[7486]251 _serialPort->setFlowControl(FLOW_OFF);
[1711]252 }
[1710]253
254 // Open Serial Port
255 // ----------------
[8082]256 _serialPort->open(QIODevice::ReadWrite | QIODevice::Unbuffered);
[1331]257 if (!_serialPort->isOpen()) {
258 delete _serialPort;
259 _serialPort = 0;
[1451]260 emit(newMessage((_staID + ": Cannot open serial port\n"), true));
[1331]261 }
[8082]262 connect(_serialPort, SIGNAL(readyRead()), this,
263 SLOT(slotSerialReadyRead()));
[1606]264
[1710]265 // Automatic NMEA
266 // --------------
[6785]267 QString nmeaMode = settings.value("serialAutoNMEA").toString();
268 if (nmeaMode == "Auto") {
[1710]269 _serialNMEA = AUTO_NMEA;
270 QString fName = settings.value("serialFileNMEA").toString();
271 if (!fName.isEmpty()) {
272 _serialOutFile = new QFile(fName);
[8082]273 if (Qt::CheckState(settings.value("rnxAppend").toInt())
274 == Qt::Checked) {
[1710]275 _serialOutFile->open(QIODevice::WriteOnly | QIODevice::Append);
[8082]276 } else {
[1710]277 _serialOutFile->open(QIODevice::WriteOnly);
278 }
[1634]279 }
[1606]280 }
[1710]281 // Manual NMEA
282 // -----------
[10420]283 if ((nmeaMode == "Manual GPGGA") ||
284 (nmeaMode == "Manual GNGGA")) {
[1710]285 _serialNMEA = MANUAL_NMEA;
[6751]286 bncSettings settings;
[8082]287 QString hlp = settings.value("serialHeightNMEA").toString();
[6751]288 if (hlp.isEmpty()) {
289 hlp = "0.0";
290 }
[8127]291 QByteArray _serialHeightNMEA = hlp.toLatin1();
[10420]292 _manualNMEAString = ggaString(_latitude, _longitude, _serialHeightNMEA, nmeaMode);
[1636]293 }
[1318]294 }
295
[8271]296 if (!_staID.isEmpty() && _latencycheck) {
[3532]297 _latencyChecker = new latencyChecker(_staID);
[9124]298 _rtcmObs = false;
299 _rtcmSsrOrb = false;
300 _rtcmSsrClk = false;
301 _rtcmSsrOrbClk = false;
302 _rtcmSsrCbi = false;
303 _rtcmSsrPbi = false;
304 _rtcmSsrVtec = false;
305 _rtcmSsrUra = false;
306 _rtcmSsrHr = false;
307 _rtcmSsrIgs = false;
308 _ssrEpoch = 0;
[8082]309 } else {
[3532]310 _latencyChecker = 0;
311 }
[3523]312}
313
314// Instantiate the decoder
315//////////////////////////////////////////////////////////////////////////////
316t_irc bncGetThread::initDecoder() {
317
[3560]318 _decoder = 0;
319
[9211]320 if (_format.indexOf("RTCM_2") != -1 ||
321 _format.indexOf("RTCM2") != -1 ||
322 _format.indexOf("RTCM 2") != -1) {
[1555]323 emit(newMessage(_staID + ": Get data in RTCM 2.x format", true));
[3560]324 _decoder = new RTCM2Decoder(_staID.data());
[9211]325 } else if (_format.indexOf("RTCM_3") != -1 ||
326 _format.indexOf("RTCM3") != -1 ||
327 _format.indexOf("RTCM 3") != -1) {
[1555]328 emit(newMessage(_staID + ": Get data in RTCM 3.x format", true));
[3558]329 RTCM3Decoder* newDecoder = new RTCM3Decoder(_staID, _rawFile);
[3560]330 _decoder = newDecoder;
[7486]331 connect((RTCM3Decoder*) newDecoder, SIGNAL(newMessage(QByteArray,bool)),
[8082]332 this, SIGNAL(newMessage(QByteArray,bool)));
[10503]333 } else if (_format == "ZERO") {
334 emit(newMessage(_staID + ": Forward data in original format", true));
335 _decoder = new bncZeroDecoder(_staID, false);
336 }
337 else if (_format == "ZERO2FILE") {
338 emit(newMessage(_staID + ": Get data in original format and store it", true));
339 _decoder = new bncZeroDecoder(_staID, true);
340 }
341 else if (_format.indexOf("RTNET") != -1) {
[3168]342 emit(newMessage(_staID + ": Get data in RTNet format", true));
[3560]343 _decoder = new bncRtnetDecoder();
[8082]344 } else {
[1555]345 emit(newMessage(_staID + ": Unknown data format " + _format, true));
346 _isToBeDeleted = true;
[3523]347 return failure;
[1555]348 }
349
[319]350 msleep(100); //sleep 0.1 sec
[7486]351
[8082]352 _decoder->initRinex(_staID, _mountPoint, _latitude, _longitude, _nmea,
353 _ntripVersion);
[3560]354
355 if (_rawFile) {
356 _decodersRaw[_staID] = _decoder;
[3530]357 }
358
[3523]359 return success;
[35]360}
361
[3523]362// Current decoder in use
363////////////////////////////////////////////////////////////////////////////
364GPSDecoder* bncGetThread::decoder() {
[3560]365 if (!_rawFile) {
366 return _decoder;
[8082]367 } else {
[3560]368 if (_decodersRaw.contains(_staID) || initDecoder() == success) {
369 return _decodersRaw[_staID];
370 }
[3523]371 }
[3560]372 return 0;
[3523]373}
374
[35]375// Destructor
376////////////////////////////////////////////////////////////////////////////
377bncGetThread::~bncGetThread() {
[1928]378 if (isRunning()) {
379 wait();
380 }
[1527]381 if (_query) {
382 _query->stop();
[1708]383 _query->deleteLater();
[1527]384 }
[3560]385 if (_rawFile) {
386 QMapIterator<QString, GPSDecoder*> it(_decodersRaw);
387 while (it.hasNext()) {
388 it.next();
389 delete it.value();
390 }
[10234]391 _decodersRaw.clear();
[8082]392 } else {
[3560]393 delete _decoder;
394 }
[2519]395 delete _rawFile;
[1607]396 delete _serialOutFile;
[1328]397 delete _serialPort;
[1557]398 delete _latencyChecker;
[1556]399 emit getThreadFinished(_staID);
[35]400}
401
[7486]402//
[1390]403////////////////////////////////////////////////////////////////////////////
404void bncGetThread::terminate() {
[1525]405 _isToBeDeleted = true;
[7854]406
[8082]407 if (_nmeaPortsMap.contains(_staID)) {
[7854]408 _nmeaPortsMap.remove(_staID);
[1559]409 }
[7854]410 if (_nmeaServer) {
411 delete _nmeaServer;
412 }
413 if (_nmeaSockets) {
414 delete _nmeaSockets;
415 }
[7858]416
[9688]417#ifdef BNC_DEBUG
[7859]418 if (BNC_CORE->mode() != t_bncCore::interactive) {
[8082]419 while (!isFinished()) {
420 wait();
421 }
[7859]422 delete this;
[8082]423 } else {
424 if (!isRunning()) {
425 delete this;
426 }
[7858]427 }
[9688]428#else
429 if (!isRunning()) {delete this;}
430#endif
[7858]431
[1390]432}
433
[136]434// Run
435////////////////////////////////////////////////////////////////////////////
436void bncGetThread::run() {
437
[35]438 while (true) {
[629]439 try {
[1555]440 if (_isToBeDeleted) {
[9852]441 emit(newMessage(_staID + ": is to be deleted", true));
[9854]442 QThread::exit(4);
[1555]443 this->deleteLater();
444 return;
[629]445 }
[621]446
[1555]447 if (tryReconnect() != success) {
[3532]448 if (_latencyChecker) {
449 _latencyChecker->checkReconnect();
450 }
[1555]451 continue;
[621]452 }
[1555]453
454 // Delete old observations
455 // -----------------------
[3560]456 if (_rawFile) {
457 QMapIterator<QString, GPSDecoder*> itDec(_decodersRaw);
458 while (itDec.hasNext()) {
459 itDec.next();
460 GPSDecoder* decoder = itDec.value();
461 decoder->_obsList.clear();
462 }
[8082]463 } else {
[3560]464 _decoder->_obsList.clear();
465 }
[621]466
[1555]467 // Read Data
468 // ---------
[1377]469 QByteArray data;
[8082]470 if (_query) {
[1377]471 _query->waitForReadyRead(data);
[8082]472 } else if (_rawFile) {
[2527]473 data = _rawFile->readChunk();
[3523]474 _format = _rawFile->format();
[8082]475 _staID = _rawFile->staID();
[2388]476
[5903]477 QCoreApplication::processEvents();
478
[7976]479 if (data.isEmpty() || BNC_CORE->sigintReceived) {
[10470]480 emit(newMessage("No more data or SIGINT/SIGTERM received", true));
[10221]481 BNC_CORE->stopPPP();
[5068]482 BNC_CORE->stopCombination();
[9191]483 sleep(2);
[9854]484 ::exit(5);
[1555]485 }
[1138]486 }
[8123]487
[1555]488 qint64 nBytes = data.size();
[1138]489
[1555]490 // Timeout, reconnect
491 // ------------------
492 if (nBytes == 0) {
[3532]493 if (_latencyChecker) {
494 _latencyChecker->checkReconnect();
495 }
[1555]496 emit(newMessage(_staID + ": Data timeout, reconnecting", true));
[2355]497 msleep(10000); //sleep 10 sec, G. Weber
[1555]498 continue;
[8082]499 } else {
[567]500 emit newBytes(_staID, nBytes);
[5648]501 emit newRawData(_staID, data);
[1555]502 }
[567]503
[1555]504 // Output Data
505 // -----------
[2386]506 if (_rawOutput) {
[7486]507 BNC_CORE->writeRawData(data, _staID, _format);
[2386]508 }
[2385]509
[1555]510 if (_serialPort) {
[1633]511 slotSerialReadyRead();
[1555]512 _serialPort->write(data);
513 }
[7486]514
[1555]515 // Decode Data
516 // -----------
517 vector<string> errmsg;
[3526]518 if (!decoder()) {
519 _isToBeDeleted = true;
520 continue;
521 }
[7753]522
[3523]523 t_irc irc = decoder()->Decode(data.data(), data.size(), errmsg);
[1137]524
[7753]525 if (irc != success) {
526 continue;
527 }
[1555]528 // Perform various scans and checks
529 // --------------------------------
[3532]530 if (_latencyChecker) {
[8271]531 _latencyChecker->checkOutage(irc);
[8082]532 QListIterator<int> it(decoder()->_typeList);
[8271]533 _ssrEpoch = static_cast<int>(decoder()->corrGPSEpochTime());
[8730]534 if (_ssrEpoch != -1) {
[9124]535 if (_rtcmSsrOrb) {
[8730]536 _latencyChecker->checkCorrLatency(_ssrEpoch, 1057);
[9124]537 _rtcmSsrOrb = false;
[8082]538 }
[9124]539 if (_rtcmSsrClk) {
[8730]540 _latencyChecker->checkCorrLatency(_ssrEpoch, 1058);
[9124]541 _rtcmSsrClk = false;
[8082]542 }
[9124]543 if (_rtcmSsrOrbClk) {
[8730]544 _latencyChecker->checkCorrLatency(_ssrEpoch, 1060);
[9124]545 _rtcmSsrOrbClk = false;
[8082]546 }
[9124]547 if (_rtcmSsrCbi) {
[8730]548 _latencyChecker->checkCorrLatency(_ssrEpoch, 1059);
[9124]549 _rtcmSsrCbi = false;
[8082]550 }
[9124]551 if (_rtcmSsrPbi) {
[8730]552 _latencyChecker->checkCorrLatency(_ssrEpoch, 1265);
[9124]553 _rtcmSsrPbi = false;
[8082]554 }
[9124]555 if (_rtcmSsrVtec) {
[8730]556 _latencyChecker->checkCorrLatency(_ssrEpoch, 1264);
[9124]557 _rtcmSsrVtec = false;
[8082]558 }
[9124]559 if (_rtcmSsrUra) {
[8730]560 _latencyChecker->checkCorrLatency(_ssrEpoch, 1061);
[9124]561 _rtcmSsrUra = false;
[8082]562 }
[9124]563 if (_rtcmSsrHr) {
[8730]564 _latencyChecker->checkCorrLatency(_ssrEpoch, 1062);
[9124]565 _rtcmSsrHr = false;
[8082]566 }
[9124]567 if (_rtcmSsrIgs) {
568 _latencyChecker->checkCorrLatency(_ssrEpoch, 4076);
569 _rtcmSsrIgs = false;
570 }
[8082]571 }
572 while (it.hasNext()) {
573 int rtcmType = it.next();
574 if ((rtcmType >= 1001 && rtcmType <= 1004) || // legacy RTCM OBS
575 (rtcmType >= 1009 && rtcmType <= 1012) || // legacy RTCM OBS
[9285]576 (rtcmType >= 1070 && rtcmType <= 1137)) { // MSM RTCM OBS
[9124]577 _rtcmObs = true;
[8082]578 } else if ((rtcmType >= 1057 && rtcmType <= 1068) ||
[9124]579 (rtcmType >= 1240 && rtcmType <= 1270) ||
[10533]580 (rtcmType == 4076)) {
[8082]581 switch (rtcmType) {
582 case 1057: case 1063: case 1240: case 1246: case 1252: case 1258:
[9124]583 _rtcmSsrOrb = true;
[8082]584 break;
585 case 1058: case 1064: case 1241: case 1247: case 1253: case 1259:
[9124]586 _rtcmSsrClk = true;
[8082]587 break;
588 case 1060: case 1066: case 1243: case 1249: case 1255: case 1261:
[9124]589 _rtcmSsrOrbClk = true;
[8082]590 break;
[9017]591 case 1059: case 1065: case 1242: case 1248: case 1254: case 1260:
[9124]592 _rtcmSsrCbi = true;
[8082]593 break;
594 case 1265: case 1266: case 1267: case 1268: case 1269: case 1270:
[9124]595 _rtcmSsrPbi = true;
[8082]596 break;
597 case 1264:
[9124]598 _rtcmSsrVtec = true;
[8082]599 break;
600 case 1061: case 1067: case 1244: case 1250: case 1256: case 1262:
[9124]601 _rtcmSsrUra = true;
[8082]602 break;
603 case 1062: case 1068: case 1245: case 1251: case 1257: case 1263:
[9124]604 _rtcmSsrHr = true;
[8082]605 break;
[9124]606 case 4076:
607 _rtcmSsrIgs = true;
608 break;
[8082]609 }
610 }
611 }
[9124]612 if (_rtcmObs) {
[8082]613 _latencyChecker->checkObsLatency(decoder()->_obsList);
614 }
[3532]615 emit newLatency(_staID, _latencyChecker->currentLatency());
616 }
[7753]617 miscScanRTCM();
[1138]618
[1555]619 // Loop over all observations (observations output)
620 // ------------------------------------------------
[6137]621 QListIterator<t_satObs> it(decoder()->_obsList);
[5524]622
[6137]623 QList<t_satObs> obsListHlp;
[5524]624
[1555]625 while (it.hasNext()) {
[6137]626 const t_satObs& obs = it.next();
[2711]627
[1555]628 // Check observation epoch
629 // -----------------------
[5739]630 if (!_rawFile) {
[8011]631 bool wrongObservationEpoch = checkForWrongObsEpoch(obs._time);
632 if (wrongObservationEpoch) {
[8021]633 QString prn(obs._prn.toString().c_str());
[9544]634 QString type = QString("%1").arg(obs._type);
635 emit(newMessage(_staID + " (" + prn.toLatin1() + ")" + ": Wrong observation epoch(s)" + "( MT: " + type.toLatin1() + ")", false));
[1555]636 continue;
[940]637 }
[686]638 }
[6812]639
[3305]640 // Check observations coming twice (e.g. KOUR0 Problem)
641 // ----------------------------------------------------
[3535]642 if (!_rawFile) {
[8011]643 QString prn(obs._prn.toString().c_str());
[8417]644 bncTime obsTime = obs._time;
645 QMap<QString, bncTime>::const_iterator it = _prnLastEpo.find(prn);
[3535]646 if (it != _prnLastEpo.end()) {
[8417]647 bncTime oldTime = it.value();
[8082]648 if (obsTime < oldTime) {
[8417]649 emit(newMessage(_staID + ": old observation " + prn.toLatin1(), false));
[3535]650 continue;
[8082]651 } else if (obsTime == oldTime) {
[9131]652 emit(newMessage(_staID + ": observation coming more than once " + prn.toLatin1(), false));
[3535]653 continue;
654 }
[3302]655 }
[3535]656 _prnLastEpo[prn] = obsTime;
[3301]657 }
658
[3528]659 decoder()->dumpRinexEpoch(obs, _format);
660
[5524]661 // Save observations
662 // -----------------
663 obsListHlp.append(obs);
664 }
[2030]665
[5524]666 // Emit signal
667 // -----------
668 if (!_isToBeDeleted && obsListHlp.size() > 0) {
669 emit newObs(_staID, obsListHlp);
[249]670 }
[5524]671
[10571]672 }
673 catch (Exception& exc) {
[3311]674 emit(newMessage(_staID + " " + exc.what(), true));
675 _isToBeDeleted = true;
[10571]676 }
677 catch (std::exception& exc) {
678 emit(newMessage(_staID + " " + exc.what(), true));
[1559]679 _isToBeDeleted = true;
[1555]680 }
[10571]681 catch (const string& error) {
682 emit(newMessage(_staID + " ERROR: " + error.c_str(), true));
683 _isToBeDeleted = true;
684 }
685 catch (const char* error) {
686 emit(newMessage(_staID + " ERROR: " + error, true));
687 _isToBeDeleted = true;
688 }
689 catch (QString error) {
690 emit(newMessage(_staID + " ERROR: " + error.toStdString().c_str(), true));
691 _isToBeDeleted = true;
692 }
693 catch (...) {
694 emit(newMessage(_staID + " bncGetThread: unknown exception", true));
695 _isToBeDeleted = true;
696 }
[35]697 }
698}
699
[7486]700// Try Re-Connect
[136]701////////////////////////////////////////////////////////////////////////////
[1555]702t_irc bncGetThread::tryReconnect() {
703
704 // Easy Return
705 // -----------
706 if (_query && _query->status() == bncNetQuery::running) {
707 _nextSleep = 0;
[3560]708 if (_rawFile) {
709 QMapIterator<QString, GPSDecoder*> itDec(_decodersRaw);
710 while (itDec.hasNext()) {
711 itDec.next();
712 GPSDecoder* decoder = itDec.value();
713 decoder->setRinexReconnectFlag(false);
714 }
[8082]715 } else {
[3560]716 _decoder->setRinexReconnectFlag(false);
717 }
[1555]718 return success;
[408]719 }
[1555]720
721 // Start a new query
722 // -----------------
[2519]723 if (!_rawFile) {
[1555]724
[138]725 sleep(_nextSleep);
[1555]726 if (_nextSleep == 0) {
727 _nextSleep = 1;
[8082]728 } else {
[1555]729 _nextSleep = 2 * _nextSleep;
[442]730 if (_nextSleep > 256) {
731 _nextSleep = 256;
[152]732 }
[1816]733#ifdef MLS_SOFTWARE
[1817]734 if (_nextSleep > 4) {
735 _nextSleep = 4;
[1816]736 }
737#endif
[138]738 }
[8123]739 delete _query;
[8082]740 if (_ntripVersion == "U") {
[1721]741 _query = new bncNetQueryUdp();
[8082]742 } else if (_ntripVersion == "R") {
[1555]743 _query = new bncNetQueryRtp();
[8082]744 } else if (_ntripVersion == "S") {
[1753]745 _query = new bncNetQueryS();
[8082]746 } else if (_ntripVersion == "N") {
[1621]747 _query = new bncNetQueryV0();
[8082]748 } else if (_ntripVersion == "UN") {
[1779]749 _query = new bncNetQueryUdp0();
[8082]750 } else if (_ntripVersion == "2") {
[3337]751 _query = new bncNetQueryV2(false);
[8082]752 } else if (_ntripVersion == "2s") {
[3337]753 _query = new bncNetQueryV2(true);
[8082]754 } else {
[1555]755 _query = new bncNetQueryV1();
756 }
[6770]757 if (_nmea == "yes") {
758 if (_serialNMEA == MANUAL_NMEA) {
759 _query->startRequest(_mountPoint, _manualNMEAString);
[10421]760 _lastNMEA = QDateTime::currentDateTime();
[8082]761 } else if (_serialNMEA == AUTO_NMEA) {
[6770]762 if (_serialPort) {
763 int nb = _serialPort->bytesAvailable();
764 if (nb > 0) {
765 QByteArray data = _serialPort->read(nb);
766 int i1 = data.indexOf("$GPGGA");
767 if (i1 == -1) {
768 i1 = data.indexOf("$GNGGA");
769 }
770 if (i1 != -1) {
771 int i2 = data.indexOf("*", i1);
772 if (i2 != -1 && data.size() > i2 + 1) {
773 QByteArray gga = data.mid(i1, i2 - i1 + 3);
774 _query->startRequest(_mountPoint, gga);
[10421]775 _lastNMEA = QDateTime::currentDateTime();
[6770]776 }
777 }
778 }
779 }
780 }
[8082]781 } else {
[1555]782 _query->startRequest(_mountPoint, "");
783 }
[6770]784
[1555]785 if (_query->status() != bncNetQuery::running) {
786 return failure;
787 }
[138]788 }
[658]789
[3560]790 if (_rawFile) {
791 QMapIterator<QString, GPSDecoder*> itDec(_decodersRaw);
792 while (itDec.hasNext()) {
793 itDec.next();
794 GPSDecoder* decoder = itDec.value();
795 decoder->setRinexReconnectFlag(false);
796 }
[8082]797 } else {
798 _decoder->setRinexReconnectFlag(false);
[658]799 }
[1555]800
801 return success;
[658]802}
[1044]803
[1555]804// RTCM scan output
[1044]805//////////////////////////////////////////////////////////////////////////////
[7423]806void bncGetThread::miscScanRTCM() {
[1044]807
[8082]808 if (!decoder()) {
[3558]809 return;
810 }
811
[1555]812 bncSettings settings;
[8082]813 if (Qt::CheckState(settings.value("miscScanRTCM").toInt()) == Qt::Checked) {
[1574]814
[8082]815 if (_miscMount == _staID || _miscMount == "ALL") {
[1575]816 // RTCM message types
817 // ------------------
[4476]818 for (int ii = 0; ii < decoder()->_typeList.size(); ii++) {
[8082]819 QString type = QString("%1 ").arg(decoder()->_typeList[ii]);
[9865]820 emit(newMessage(_staID + ": Received message type " + type.toLatin1(), true));
[1574]821 }
[7486]822
[4476]823 // Check Observation Types
824 // -----------------------
825 for (int ii = 0; ii < decoder()->_obsList.size(); ii++) {
[10221]826 t_satObs& obs = decoder()->_obsList[ii];
[6137]827 QVector<QString>& rnxTypes = _rnxTypes[obs._prn.system()];
[4476]828 bool allFound = true;
[6137]829 for (unsigned iFrq = 0; iFrq < obs._obs.size(); iFrq++) {
[6579]830 if (obs._obs[iFrq]->_codeValid) {
831 QString rnxStr('C');
832 rnxStr.append(obs._obs[iFrq]->_rnxType2ch.c_str());
[8082]833 if (_format.indexOf("RTCM_2") != -1
834 || _format.indexOf("RTCM2") != -1
835 || _format.indexOf("RTCM 2") != -1) {
[6580]836 rnxStr = t_rnxObsFile::type3to2(obs._prn.system(), rnxStr);
837 }
[6579]838 if (rnxTypes.indexOf(rnxStr) == -1) {
839 rnxTypes.push_back(rnxStr);
840 allFound = false;
841 }
[4476]842 }
[6579]843 if (obs._obs[iFrq]->_phaseValid) {
844 QString rnxStr('L');
845 rnxStr.append(obs._obs[iFrq]->_rnxType2ch.c_str());
[8082]846 if (_format.indexOf("RTCM_2") != -1
847 || _format.indexOf("RTCM2") != -1
848 || _format.indexOf("RTCM 2") != -1) {
[6580]849 rnxStr = t_rnxObsFile::type3to2(obs._prn.system(), rnxStr);
850 }
[6579]851 if (rnxTypes.indexOf(rnxStr) == -1) {
852 rnxTypes.push_back(rnxStr);
853 allFound = false;
854 }
855 }
[8082]856 if (obs._obs[iFrq]->_dopplerValid) {
[6579]857 QString rnxStr('D');
858 rnxStr.append(obs._obs[iFrq]->_rnxType2ch.c_str());
[8082]859 if (_format.indexOf("RTCM_2") != -1
860 || _format.indexOf("RTCM2") != -1
861 || _format.indexOf("RTCM 2") != -1) {
[6580]862 rnxStr = t_rnxObsFile::type3to2(obs._prn.system(), rnxStr);
863 }
[6579]864 if (rnxTypes.indexOf(rnxStr) == -1) {
865 rnxTypes.push_back(rnxStr);
866 allFound = false;
867 }
868 }
[8082]869 if (obs._obs[iFrq]->_snrValid) {
[6579]870 QString rnxStr('S');
871 rnxStr.append(obs._obs[iFrq]->_rnxType2ch.c_str());
[8082]872 if (_format.indexOf("RTCM_2") != -1
873 || _format.indexOf("RTCM2") != -1
874 || _format.indexOf("RTCM 2") != -1) {
[6580]875 rnxStr = t_rnxObsFile::type3to2(obs._prn.system(), rnxStr);
876 }
[6579]877 if (rnxTypes.indexOf(rnxStr) == -1) {
878 rnxTypes.push_back(rnxStr);
879 allFound = false;
880 }
881 }
[4476]882 }
883 if (!allFound) {
[7486]884 QString msg;
[4477]885 QTextStream str(&msg);
[9559]886 str << obs._prn.system() << QString(" %1 ").arg(rnxTypes.size());
[4476]887 for (int iType = 0; iType < rnxTypes.size(); iType++) {
[4478]888 str << " " << rnxTypes[iType];
[4476]889 }
[10564]890 emit(newMessage(_staID + ": Observation Types: " + msg.toLatin1(), true));
[4476]891 }
892 }
893
[1574]894 // RTCMv3 antenna descriptor
895 // -------------------------
[4476]896 for (int ii = 0; ii < decoder()->_antType.size(); ii++) {
[8236]897 QString ant1 = QString(": Antenna Descriptor: %1 ").arg(decoder()->_antType[ii].descriptor);
898 emit(newMessage(_staID + ant1.toLatin1(), true));
899 if (strlen(decoder()->_antType[ii].serialnumber)) {
900 QString ant2 = QString(": Antenna Serial Number: %1 ").arg(decoder()->_antType[ii].serialnumber);
901 emit(newMessage(_staID + ant2.toLatin1(), true));
902 }
[1574]903 }
[1555]904
[1575]905 // RTCM Antenna Coordinates
906 // ------------------------
[8082]907 for (int ii = 0; ii < decoder()->_antList.size(); ii++) {
[1574]908 QByteArray antT;
[8236]909 if (decoder()->_antList[ii].type == GPSDecoder::t_antRefPoint::ARP) {
[1574]910 antT = "ARP";
[8236]911 } else if (decoder()->_antList[ii].type == GPSDecoder::t_antRefPoint::APC) {
[1574]912 antT = "APC";
913 }
[1575]914 QByteArray ant1, ant2, ant3;
[8236]915 ant1 = QString("%1 ").arg(decoder()->_antList[ii].xx, 0, 'f', 4).toLatin1();
916 ant2 = QString("%1 ").arg(decoder()->_antList[ii].yy, 0, 'f', 4).toLatin1();
917 ant3 = QString("%1 ").arg(decoder()->_antList[ii].zz, 0, 'f', 4).toLatin1();
[1575]918 emit(newMessage(_staID + ": " + antT + " (ITRF) X " + ant1 + "m", true));
919 emit(newMessage(_staID + ": " + antT + " (ITRF) Y " + ant2 + "m", true));
920 emit(newMessage(_staID + ": " + antT + " (ITRF) Z " + ant3 + "m", true));
[3595]921 double hh = 0.0;
[3523]922 if (decoder()->_antList[ii].height_f) {
[3595]923 hh = decoder()->_antList[ii].height;
[8127]924 QByteArray ant4 = QString("%1 ").arg(hh, 0, 'f', 4).toLatin1();
[8082]925 emit(newMessage(
926 _staID + ": Antenna height above marker " + ant4 + "m", true));
[1575]927 }
[7486]928 emit(newAntCrd(_staID, decoder()->_antList[ii].xx,
[8082]929 decoder()->_antList[ii].yy, decoder()->_antList[ii].zz, hh, antT));
[1218]930 }
[6864]931
[8197]932 // RTCMv3 receiver descriptor
933 // --------------------------
934 for (int ii = 0; ii < decoder()->_recType.size(); ii++) {
[8236]935 QString rec1 = QString(": Receiver Descriptor: %1 ").arg(decoder()->_recType[ii].descriptor);
936 QString rec2 = QString(": Receiver Firmware Version: %1 ").arg(decoder()->_recType[ii].firmware);
937 QString rec3 = QString(": Receiver Serial Number: %1 ").arg(decoder()->_recType[ii].serialnumber);
938 emit(newMessage(_staID + rec1.toLatin1(), true));
939 emit(newMessage(_staID + rec2.toLatin1(), true));
940 emit(newMessage(_staID + rec3.toLatin1(), true));
[8197]941 }
942
[6864]943 // RTCM GLONASS slots
944 // ------------------
945 if (decoder()->_gloFrq.size()) {
946 bool allFound = true;
947 QString slot = decoder()->_gloFrq;
[8082]948 slot.replace(" ", " ").replace(" ", ":");
[6864]949 if (_gloSlots.indexOf(slot) == -1) {
950 _gloSlots.append(slot);
951 allFound = false;
952 }
953 if (!allFound) {
954 _gloSlots.sort();
[8082]955 emit(newMessage(
[8127]956 _staID + ": GLONASS Slot:Freq " + _gloSlots.join(" ").toLatin1(),
[8082]957 true));
[6864]958 }
959 }
[10564]960 if (fmod(decoder()->corrGPSEpochTime(), 60.0) == 0.0) {
961 // Service CRS
962 // -----------
963 for (int ii = 0; ii < decoder()->_serviceCrs.size(); ii++) {
964 QString servicecrsname = QString(": Service CRS Name: %1 ").arg(decoder()->_serviceCrs[ii]._name);
965 QString coordinateEpoch = QString(": Service CRS Coordinate Epoch: %1 ").arg(decoder()->_serviceCrs[ii]._coordinateEpoch);
966 //QString ce = QString(": CE: %1 ").arg(decoder()->_serviceCrs[ii]._CE);
967 emit(newMessage(_staID + servicecrsname.toLatin1(), true));
968 emit(newMessage(_staID + coordinateEpoch.toLatin1(), true));
969 //emit(newMessage(_staID + ce.toLatin1(), true));
970 }
[10517]971
[10564]972 // RTCM CRS
973 // -----------
974 for (int ii = 0; ii < decoder()->_rtcmCrs.size(); ii++) {
975 QString rtcmcrsname = QString(": RTCM CRS Name: %1 ").arg(decoder()->_rtcmCrs[ii]._name);
976 QString anchor = QString(": RTCM CRS Anchor: %1 ").arg(decoder()->_rtcmCrs[ii]._anchor);
977 QString platenumber = QString(": RTCM CRS Plate Number: %1 ").arg(decoder()->_rtcmCrs[ii]._plateNumber);
978 emit(newMessage(_staID + rtcmcrsname.toLatin1(), true));
979 emit(newMessage(_staID + anchor.toLatin1(), true));
980 emit(newMessage(_staID + platenumber.toLatin1(), true));
981 for (int i = 0; i<decoder()->_rtcmCrs[ii]._databaseLinks.size(); i++) {
982 QString dblink = QString(": Database Link: %1 ").arg(decoder()->_rtcmCrs[ii]._databaseLinks[i]);
983 emit(newMessage(_staID + dblink.toLatin1(), true));
984 }
[10533]985 }
986
[10564]987 // Helmert Parameters
988 //-------------------
989 for (int ii = 0; ii < decoder()->_helmertPar.size(); ii++) {
990 t_helmertPar& helmertPar = decoder()->_helmertPar[ii];
991 bncTime t; t.setmjd(0, helmertPar._mjd); QString dateStr = QString::fromStdString(t.datestr());
992 QString sourcename = QString(": MT1301 Source Name: %1 ").arg(helmertPar._sourceName);
993 QString targetname = QString(": MT1301 Target Name: %1 ").arg(helmertPar._targetName);
994 QString sysidentnum = QString(": MT1301 Sys Ident Num: %1 ").arg(helmertPar._sysIdentNum);
995 QString trafomessageind = QString(": MT1301 Trafo Ident Num: %1 ").arg(helmertPar.IndtoString());
996 QString epoch = QString(": MT1301 t0: MJD %1 (%2) ").arg(helmertPar._mjd).arg(dateStr);
997 QString partrans = QString(": MT1301 Helmert Par Trans: dx = %1, dy = %2, dz = %3, dxr = %4, dyr = %5, dzr = %6")
998 .arg(helmertPar._dx).arg(helmertPar._dy).arg(helmertPar._dz)
999 .arg(helmertPar._dxr).arg(helmertPar._dyr).arg(helmertPar._dzr);
1000 QString parrot = QString(": MT1301 Helmert Par Rot: ox = %1, oy = %2, oz = %3, oxr = %4, oyr = %5, ozr = %6")
1001 .arg(helmertPar._ox).arg(helmertPar._oy).arg(helmertPar._oz)
1002 .arg(helmertPar._oxr).arg(helmertPar._oyr).arg(helmertPar._ozr);
1003 QString parscale = QString(": MT1301 Helmert Par Scale: sc = %1, scr = %2").arg(helmertPar._sc).arg(helmertPar._scr);
1004 emit(newMessage(_staID + sourcename.toLatin1(), true));
1005 emit(newMessage(_staID + targetname.toLatin1(), true));
1006 emit(newMessage(_staID + sysidentnum.toLatin1(), true));
1007 emit(newMessage(_staID + trafomessageind.toLatin1(), true));
1008 emit(newMessage(_staID + epoch.toLatin1(), true));
1009 emit(newMessage(_staID + partrans.toLatin1(), true));
1010 emit(newMessage(_staID + parrot.toLatin1(), true));
1011 emit(newMessage(_staID + parscale.toLatin1(), true));
1012 }
[10533]1013 }
[1218]1014 }
[1044]1015 }
[1575]1016
[1770]1017#ifdef MLS_SOFTWARE
[3523]1018 for (int ii=0; ii <decoder()->_antList.size(); ii++) {
[8082]1019 QByteArray antT;
1020 if (decoder()->_antList[ii].type == GPSDecoder::t_antInfo::ARP) {
1021 antT = "ARP";
1022 }
1023 else if (decoder()->_antList[ii].type == GPSDecoder::t_antInfo::APC) {
1024 antT = "APC";
1025 }
1026 double hh = 0.0;
1027 if (decoder()->_antList[ii].height_f) {
1028 hh = decoder()->_antList[ii].height;
1029 }
1030 emit(newAntCrd(_staID, decoder()->_antList[ii].xx,
1031 decoder()->_antList[ii].yy, decoder()->_antList[ii].zz,
1032 hh, antT));
[1770]1033 }
[2356]1034
[3523]1035 for (int ii = 0; ii <decoder()->_typeList.size(); ii++) {
1036 emit(newRTCMMessage(_staID, decoder()->_typeList[ii]));
[2356]1037 }
[1770]1038#endif
1039
[6864]1040 decoder()->_gloFrq.clear();
[3523]1041 decoder()->_typeList.clear();
1042 decoder()->_antType.clear();
[8197]1043 decoder()->_recType.clear();
[3523]1044 decoder()->_antList.clear();
[1044]1045}
[1555]1046
[1606]1047// Handle Data from Serial Port
1048////////////////////////////////////////////////////////////////////////////
1049void bncGetThread::slotSerialReadyRead() {
[6770]1050
[1607]1051 if (_serialPort) {
[6770]1052
[6773]1053 if (_nmea == "yes" && _serialNMEA == MANUAL_NMEA) {
[10420]1054 if (_NMEASampl) {
[10421]1055 int dt = _lastNMEA.secsTo(QDateTime::currentDateTime());
[10420]1056 if (dt && (fmod(double(dt), double(_NMEASampl)) == 0.0)) {
[6773]1057 _query->sendNMEA(_manualNMEAString);
[10421]1058 _lastNMEA = QDateTime::currentDateTime();
[6773]1059 }
1060 }
1061 }
1062
[1633]1063 int nb = _serialPort->bytesAvailable();
1064 if (nb > 0) {
1065 QByteArray data = _serialPort->read(nb);
[1711]1066
[6695]1067 if (_nmea == "yes" && _serialNMEA == AUTO_NMEA) {
[1725]1068 int i1 = data.indexOf("$GPGGA");
[6651]1069 if (i1 == -1) {
1070 i1 = data.indexOf("$GNGGA");
1071 }
[1725]1072 if (i1 != -1) {
[6751]1073 int i2 = data.indexOf("*", i1);
[1725]1074 if (i2 != -1 && data.size() > i2 + 1) {
[6751]1075 QByteArray gga = data.mid(i1, i2 - i1 + 3);
[10421]1076 if (_NMEASampl) {
1077 int dt = _lastNMEA.secsTo(QDateTime::currentDateTime());
1078 if (dt && (fmod(double(dt), double(_NMEASampl)) == 0.0)) {
1079 _query->sendNMEA(gga);
1080 _lastNMEA = QDateTime::currentDateTime();
1081 }
1082 }
[6751]1083 }
1084 }
[1711]1085 }
1086
[1633]1087 if (_serialOutFile) {
1088 _serialOutFile->write(data);
1089 _serialOutFile->flush();
1090 }
[1607]1091 }
1092 }
[1606]1093}
[7180]1094
1095void bncGetThread::slotNewNMEAConnection() {
1096 _nmeaSockets->push_back(_nmeaServer->nextPendingConnection());
[8082]1097 emit(newMessage(
[8127]1098 QString("New PPP client on port: # %1").arg(_nmeaSockets->size()).toLatin1(),
[8082]1099 true));
[7180]1100}
1101
1102//
1103////////////////////////////////////////////////////////////////////////////
1104void bncGetThread::slotNewNMEAstr(QByteArray staID, QByteArray str) {
1105 if (_nmeaPortsMap.contains(staID)) {
1106 int nmeaPort = _nmeaPortsMap.value(staID);
1107 QMutableListIterator<QTcpSocket*> is(*_nmeaSockets);
1108 while (is.hasNext()) {
1109 QTcpSocket* sock = is.next();
1110 if (sock->localPort() == nmeaPort) {
1111 if (sock->state() == QAbstractSocket::ConnectedState) {
1112 sock->write(str);
[8082]1113 } else if (sock->state() != QAbstractSocket::ConnectingState) {
[7180]1114 delete sock;
1115 is.remove();
1116 }
1117 }
1118 }
1119 }
1120}
Note: See TracBrowser for help on using the repository browser.