Changeset 392 in ntrip


Ignore:
Timestamp:
Feb 2, 2007, 10:45:47 AM (18 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bnccaster.cpp

    r387 r392  
    9292  if (_waitTime < 1) {
    9393    _waitTime = 1;
     94  }
     95
     96  if ( settings.value("rnxPath").toString().isEmpty() ) {
     97    _rinexWriters = 0;
     98  }
     99  else {
     100    _rinexWriters = new QMap<QString, bncRinex*>;
    94101  }
    95102
     
    115122  delete _sockets;
    116123  delete _epochs;
     124  delete _rinexWriters;
    117125}
    118126
     
    122130  QMutexLocker locker(&_mutex);
    123131
    124   if (_rinexWriters.find(staID) != _rinexWriters.end()) {
    125     bncRinex* rnx = _rinexWriters.find(staID).value();
     132  if (_rinexWriters && _rinexWriters->find(staID) != _rinexWriters->end()) {
     133    bncRinex* rnx = _rinexWriters->find(staID).value();
    126134    rnx->setReconnectFlag(true);
    127135  }
     
    149157  // Prepare RINEX Output
    150158  // --------------------
    151   if (_rinexWriters.find(obs->StatID) == _rinexWriters.end()) {
    152     _rinexWriters.insert(obs->StatID, new bncRinex(obs->StatID,
    153                                                    mountPoint, format, latitude, longitude, nmea));
    154   }
    155   bncRinex* rnx = _rinexWriters.find(obs->StatID).value();
    156   if (_samplingRate == 0 || iSec % _samplingRate == 0) {
    157     rnx->deepCopy(obs);
    158   }
    159   rnx->dumpEpoch(_newTime);
     159  if (_rinexWriters) {
     160    if (_rinexWriters->find(obs->StatID) == _rinexWriters->end()) {
     161      _rinexWriters->insert(obs->StatID, new bncRinex(obs->StatID, mountPoint,
     162                                           format, latitude, longitude, nmea));
     163    }
     164    bncRinex* rnx = _rinexWriters->find(obs->StatID).value();
     165    if (_samplingRate == 0 || iSec % _samplingRate == 0) {
     166      rnx->deepCopy(obs);
     167    }
     168    rnx->dumpEpoch(_newTime);
     169  }
    160170
    161171  // First time, set the _lastDumpSec immediately
  • trunk/BNC/bnccaster.h

    r382 r392  
    7070   QList<QTcpSocket*>*            _sockets;
    7171   QList<QByteArray>              _staIDs;
    72    QMap<QString, bncRinex*>       _rinexWriters;
     72   QMap<QString, bncRinex*>*      _rinexWriters;
    7373   QList<bncGetThread*>           _threads;
    7474   int                            _samplingRate;
Note: See TracChangeset for help on using the changeset viewer.