Changeset 668 in ntrip for trunk/BNC/bncgetthread.cpp
- Timestamp:
- Jan 30, 2008, 5:32:02 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncgetthread.cpp
r659 r668 107 107 // ---------------- 108 108 _inspSegm = settings.value("inspSegm").toInt(); 109 _ noticeFail = settings.value("noticeFail").toInt();110 _ noticeReco = settings.value("noticeReco").toInt();111 _ noticeScript = settings.value("noticeScript").toString();112 expandEnvVar(_ noticeScript);109 _adviseFail = settings.value("adviseFail").toInt(); 110 _adviseReco = settings.value("adviseReco").toInt(); 111 _adviseScript = settings.value("adviseScript").toString(); 112 expandEnvVar(_adviseScript); 113 113 114 114 // RINEX writer … … 395 395 initPause = _inspSegm; 396 396 } 397 if ( _ noticeFail < 1 && _noticeReco < 1 ) {397 if ( _adviseFail < 1 && _adviseReco < 1 ) { 398 398 initPause = 0; 399 399 } … … 448 448 if (numSucc>0) { 449 449 secSucc += _inspSegm; 450 if (secSucc > _ noticeReco * 60) {451 secSucc = _ noticeReco * 60 + 1;450 if (secSucc > _adviseReco * 60) { 451 secSucc = _adviseReco * 60 + 1; 452 452 } 453 453 numSucc = 0; … … 459 459 secFail += _inspSegm; 460 460 secSucc = 0; 461 if (secFail > _ noticeFail * 60) {462 secFail = _ noticeFail * 60 + 1;461 if (secFail > _adviseFail * 60) { 462 secFail = _adviseFail * 60 + 1; 463 463 } 464 464 if (!_decodePause.isValid()) { … … 478 478 // End corrupt threshold 479 479 // --------------------- 480 if ( begCorrupt && !endCorrupt && secSucc > _ noticeReco * 60 ) {480 if ( begCorrupt && !endCorrupt && secSucc > _adviseReco * 60 ) { 481 481 emit(newMessage(_staID + ": End_Corrupted, Recovery threshold exceeded")); 482 482 callScript("End_Corrupted"); … … 489 489 // Begin corrupt threshold 490 490 // ----------------------- 491 if ( !begCorrupt && secFail > _ noticeFail * 60 ) {491 if ( !begCorrupt && secFail > _adviseFail * 60 ) { 492 492 emit(newMessage(_staID + ": Begin_Corrupted, Failure threshold exceeded")); 493 493 callScript("Begin_Corrupted"); … … 505 505 // End outage threshold 506 506 // -------------------- 507 if ( _decodeStart.isValid() && _decodeStart.secsTo(QDateTime::currentDateTime()) > _ noticeReco * 60 ) {507 if ( _decodeStart.isValid() && _decodeStart.secsTo(QDateTime::currentDateTime()) > _adviseReco * 60 ) { 508 508 _decodeStart.setDate(QDate()); 509 509 _decodeStart.setTime(QTime()); … … 610 610 // Begin outage threshold 611 611 // ---------------------- 612 if ( _decodeStop.isValid() && _decodeStop.secsTo(QDateTime::currentDateTime()) > _ noticeFail * 60 ) {612 if ( _decodeStop.isValid() && _decodeStop.secsTo(QDateTime::currentDateTime()) > _adviseFail * 60 ) { 613 613 _decodeStop.setDate(QDate()); 614 614 _decodeStop.setTime(QTime()); … … 626 626 } 627 627 628 // Call notice advisoryscript628 // Call advisory notice script 629 629 //////////////////////////////////////////////////////////////////////////// 630 630 void bncGetThread::callScript(const char* _comment) { 631 if (!_ noticeScript.isEmpty()) {631 if (!_adviseScript.isEmpty()) { 632 632 #ifdef WIN32 633 QProcess::startDetached(_ noticeScript, QStringList() << _staID << _comment) ;633 QProcess::startDetached(_adviseScript, QStringList() << _staID << _comment) ; 634 634 #else 635 QProcess::startDetached("nohup", QStringList() << _ noticeScript << _staID << _comment) ;635 QProcess::startDetached("nohup", QStringList() << _adviseScript << _staID << _comment) ; 636 636 #endif 637 637 }
Note:
See TracChangeset
for help on using the changeset viewer.