Changeset 696 in ntrip


Ignore:
Timestamp:
Feb 20, 2008, 3:58:50 PM (16 years ago)
Author:
weber
Message:

* empty log message *

Location:
trunk/BNC
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncgetthread.cpp

    r695 r696  
    483483            // ---------------------
    484484            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");
    485487              emit(newMessage(_staID + ": Corrupted recovery threshold exceeded"));
    486               callScript("End_Corrupted");
     488              callScript(("End_Corrupted " + _endDateCor + " " + _endTimeCor + " Begin was " + _begDateCor + " " + _begTimeCor).toAscii());
    487489              endCorrupt = true;
    488490              begCorrupt = false;
     
    494496              // -----------------------
    495497              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");
    496500                emit(newMessage(_staID + ": Corrupted failure threshold exceeded"));
    497                 callScript("Begin_Corrupted");
     501                callScript(("Begin_Corrupted " + _begDateCor + " " + _begTimeCor).toAscii());
    498502                begCorrupt = true;
    499503                endCorrupt = false;
     
    513517        _decodeStart.setTime(QTime());
    514518        if (_inspSegm>0) {
     519          _endDateOut = QDateTime::currentDateTime().toUTC().date().toString("dd-MM-yy");
     520          _endTimeOut = QDateTime::currentDateTime().toUTC().time().toString("hh:mm:ss");
    515521          emit(newMessage(_staID + ": Outage recovery threshold exceeded"));
    516           callScript("End_Outage");
     522          callScript(("End_Outage " + _endDateOut + " " + _endTimeOut + " Begin was " + _begDateOut + " " + _begTimeOut).toAscii());
    517523        }
    518524      }
     
    619625        _decodeStop.setTime(QTime());
    620626        if (_inspSegm>0) {
     627          _begDateOut = QDateTime::currentDateTime().toUTC().date().toString("dd-MM-yy");
     628          _begTimeOut = QDateTime::currentDateTime().toUTC().time().toString("hh:mm:ss");
    621629          emit(newMessage(_staID + ": Outage failure threshold exceeded"));
    622           callScript("Begin_Outage");
     630          callScript(("Begin_Outage " + _begDateOut + " " + _begTimeOut).toAscii());
    623631        }
    624632      }
  • trunk/BNC/bncgetthread.h

    r686 r696  
    7676   QByteArray  _nmea;
    7777   QString     _adviseScript;
     78   QString     _begDateCor;
     79   QString     _begTimeCor;
     80   QString     _begDateOut;
     81   QString     _begTimeOut;
     82   QString     _endDateCor;
     83   QString     _endTimeCor;
     84   QString     _endDateOut;
     85   QString     _endTimeOut;
    7886   int         _obsRate;
    7987   int         _inspSegm;
  • trunk/BNC/bnchelp.html

    r694 r696  
    411411<p><a name="advscript"><h4>3.8.4 Advisory Script - optional </h4></p>
    412412<p>
    413 As mentioned previously, BNC can trigger a shell script or a batch file to be executed when one of the events described are reported. This script can be used to email an advisory note to network operator or stream providers. To enable this feature, specify the full path to the script or batch file in the 'Script' field. The affected mountpoint and type of event reported ('Begin_Outage', 'End_Outage', 'Begin_Corrupted' or 'End_Corrupted') will then be passed on to the script as command line parameters (\%1 and \%2 on Windows systems or \$1 and \$2 on UNIX/Linuxsystems).
     413As mentioned previously, BNC can trigger a shell script or a batch file to be executed when one of the events described are reported. This script can be used to email an advisory note to network operator or stream providers. To enable this feature, specify the full path to the script or batch file in the 'Script' field. The affected mountpoint and type of event reported ('Begin_Outage', 'End_Outage', 'Begin_Corrupted' or 'End_Corrupted') will then be passed on to the script as command line parameters (\%1 and \%2 on Windows systems or \$1 and \$2 on Unix/Linux systems).
    414414</p>
    415415<p>
     
    422422#!/bin/bash
    423423sleep $((60*RANDOM/32767))
    424 cat | mail -s "BNC: $2 Stream $1" email@address &lt;&lt;!
     424cat | mail -s "NABU: $1" email@address &lt;&lt;!
    425425Advisory Note to BNC User,
    426 Please note a $2 advisory from BNC for stream $1 dated `date`.
     426Please note the following advisory received from BNC.
     427Stream: $*
    427428Regards, BNC
    428429!
Note: See TracChangeset for help on using the changeset viewer.