Changeset 14498 for trunk/FACT++/src


Ignore:
Timestamp:
10/19/12 14:31:47 (12 years ago)
Author:
tbretz
Message:
Added the possibility to send at least one custom alarm from dimctrl.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/smartfact.cc

    r14415 r14498  
    438438
    439439    EventHist fControlMessageHist;
     440    EventHist fControlAlarmHist;
    440441    int32_t   fControlScriptDepth;
    441442
     
    705706            return GetCurrentState();
    706707
    707         if (d.GetQoS()==90)
     708        if (d.GetQoS()==MessageImp::kAlarm)
     709        {
     710            if (d.GetSize()==1)
     711                for (auto it=fControlAlarmHist.begin(); it!=fControlAlarmHist.end(); it++)
     712                    it->time = Time(Time::none);
     713            else
     714                fControlAlarmHist.add(d.GetText(), d.GetTime());
     715        }
     716
     717        if (d.GetQoS()==MessageImp::kComment)
    708718            HandleControlMessageImp(d);
    709719
     
    22932303        newerr |= SetError(fFreeSpace<50000000000,
    22942304                           "Less than 50GB disk space left.");
     2305
     2306        for (auto it=fControlAlarmHist.begin(); it!=fControlAlarmHist.end(); it++)
     2307        {
     2308            newerr |= SetError(it->time.IsValid(), it->msg);
     2309            if (!it->time)
     2310                fControlAlarmHist.erase(it);
     2311        }
    22952312
    22962313        fLastRunFinishedWithZeroEvents = false;
Note: See TracChangeset for help on using the changeset viewer.