Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  24 Sep 2018, Lars Martin, Suggestion, Self-resetting alarm class 
    Reply  24 Sep 2018, Lukas Gerritzen, Suggestion, Self-resetting alarm class 
       Reply  25 Sep 2018, Stefan Ritt, Suggestion, Self-resetting alarm class 
          Reply  26 Dec 2018, Konstantin Olchanski, Suggestion, Self-resetting alarm class 
    Reply  25 Sep 2018, Stefan Ritt, Suggestion, Self-resetting alarm class 
Message ID: 1422     Entry time: 26 Dec 2018     In reply to: 1399
Author: Konstantin Olchanski 
Topic: Suggestion 
Subject: Self-resetting alarm class 
> > If you run an external script anyway, you can also call "odbedit -c alarm" to
> > reset all alarms. Or you could try to set the "Triggered" entry of that certain
> > alarm to 0 (again, with odbedit), that could also work.
> 
> That would not really help, because you cannot trigger a script AFTER an alarm occurred. Having 
> "self-resetting" alarms is actually not a bad idea. I could add a flag "Auto reset" which is false by 
> default and can be set to true for this functionality. Will keep that in mind for the next 
> development cycle.
> 

I second, this is a good idea. Sometimes I want "sticky" alarms that stay on to indicate that a bad thing happened in the 
past, sometimes I want self-resetting alarms that go away when a bad thing turns back into a good thing.

When I do this in a frontend, I manually trigger the alarm and manually clear the alarm, i.e. you can see this
done in ~addaq/online/src/fectrl.cxx

Use al_trigger_alarm() and al_reset_alarm().

This can also be done through the json-rpc interface - both calls are available as rpc commands - and so easy to use 
from javascript. (but there is no simple unix command line tool to issue json-rpc requests. ouch. must write one now.)

K.O.
ELOG V3.1.4-2e1708b5