Changeset 699 in ntrip for trunk


Ignore:
Timestamp:
Feb 22, 2008, 11:32:46 AM (17 years ago)
Author:
weber
Message:

* empty log message *

Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncgetthread.cpp

    r696 r699  
    377377void bncGetThread::run() {
    378378
    379   t_irc irc = initRun();
    380 
    381   if      (irc == fatal) {
    382     QThread::exit(1);
    383     return;
    384   }
    385   else if (irc != success) {
    386     emit(newMessage(_staID + ": initRun failed, reconnecting"));
    387     tryReconnect();
    388   }
    389 
    390379  bool wrongEpoch = false;
    391380  bool decode = true;
     
    397386  bool begCorrupt = false;
    398387  bool endCorrupt = false;
     388
    399389  _decodeTime = QDateTime::currentDateTime();
    400  
     390  _decodeSucc = QDateTime::currentDateTime();
     391  t_irc irc = initRun();
     392
     393  if      (irc == fatal) {
     394    QThread::exit(1);
     395    return;
     396  }
     397  else if (irc != success) {
     398    emit(newMessage(_staID + ": initRun failed, reconnecting"));
     399    tryReconnect();
     400  }
     401
    401402  if (initPause < _inspSegm) {
    402403    initPause = _inspSegm;
     
    452453            if (numSucc>0) {
    453454              secSucc += _inspSegm;
     455              _decodeSucc = QDateTime::currentDateTime();
    454456              if (secSucc > _adviseReco * 60) {
    455457                secSucc = _adviseReco * 60 + 1;
     
    483485            // ---------------------
    484486            if ( begCorrupt && !endCorrupt && secSucc > _adviseReco * 60 ) {
    485               _endDateCor = QDateTime::currentDateTime().toUTC().date().toString("dd-MM-yy");
    486               _endTimeCor = QDateTime::currentDateTime().toUTC().time().toString("hh:mm:ss");
    487               emit(newMessage(_staID + ": Corrupted recovery threshold exceeded"));
     487              _endDateCor = QDateTime::currentDateTime().addSecs(- _adviseReco * 60).toUTC().date().toString("yy-MM-dd");
     488              _endTimeCor = QDateTime::currentDateTime().addSecs(- _adviseReco * 60).toUTC().time().toString("hh:mm:ss");
     489              emit(newMessage((_staID + ": Corrupted recovery threshold exceeded at " + _endDateCor + " " + _endTimeCor).toAscii()));
    488490              callScript(("End_Corrupted " + _endDateCor + " " + _endTimeCor + " Begin was " + _begDateCor + " " + _begTimeCor).toAscii());
    489491              endCorrupt = true;
     
    496498              // -----------------------
    497499              if ( !begCorrupt && secFail > _adviseFail * 60 ) {
    498                 _begDateCor = QDateTime::currentDateTime().toUTC().date().toString("dd-MM-yy");
    499                 _begTimeCor = QDateTime::currentDateTime().toUTC().time().toString("hh:mm:ss");
    500                 emit(newMessage(_staID + ": Corrupted failure threshold exceeded"));
     500                _begDateCor = _decodeSucc.toUTC().date().toString("yy-MM-dd");
     501                _begTimeCor = _decodeSucc.toUTC().time().toString("hh:mm:ss");
     502                emit(newMessage((_staID + ": Corrupted failure threshold exceeded at " + _begDateCor + " " + _begTimeCor).toAscii()));
    501503                callScript(("Begin_Corrupted " + _begDateCor + " " + _begTimeCor).toAscii());
    502504                begCorrupt = true;
     
    517519        _decodeStart.setTime(QTime());
    518520        if (_inspSegm>0) {
    519           _endDateOut = QDateTime::currentDateTime().toUTC().date().toString("dd-MM-yy");
    520           _endTimeOut = QDateTime::currentDateTime().toUTC().time().toString("hh:mm:ss");
    521           emit(newMessage(_staID + ": Outage recovery threshold exceeded"));
     521          _endDateOut = QDateTime::currentDateTime().addSecs(- _adviseReco * 60).toUTC().date().toString("yy-MM-dd");
     522          _endTimeOut = QDateTime::currentDateTime().addSecs(- _adviseReco * 60).toUTC().time().toString("hh:mm:ss");
     523          emit(newMessage((_staID + ": Outage recovery threshold exceeded at " + _endDateOut + " " + _endTimeOut).toAscii()));
    522524          callScript(("End_Outage " + _endDateOut + " " + _endTimeOut + " Begin was " + _begDateOut + " " + _begTimeOut).toAscii());
    523525        }
     
    625627        _decodeStop.setTime(QTime());
    626628        if (_inspSegm>0) {
    627           _begDateOut = QDateTime::currentDateTime().toUTC().date().toString("dd-MM-yy");
    628           _begTimeOut = QDateTime::currentDateTime().toUTC().time().toString("hh:mm:ss");
    629           emit(newMessage(_staID + ": Outage failure threshold exceeded"));
     629          _begDateOut = _decodeTime.toUTC().date().toString("yy-MM-dd");
     630          _begTimeOut = _decodeTime.toUTC().time().toString("hh:mm:ss");
     631          emit(newMessage((_staID + ": Outage failure threshold exceeded at " + _begDateOut + " " + _begTimeOut).toAscii()));
    630632          callScript(("Begin_Outage " + _begDateOut + " " + _begTimeOut).toAscii());
    631633        }
  • trunk/BNC/bncgetthread.h

    r696 r699  
    9898   QDateTime   _decodePause;
    9999   QDateTime   _decodeTime;
     100   QDateTime   _decodeSucc;
    100101   QMutex      _mutex;
    101102};
Note: See TracChangeset for help on using the changeset viewer.