2 #include "ErrorHandler/MessageAnalyzer/ma_cell.h"
3 #include "ErrorHandler/MessageAnalyzer/ma_condition.h"
7 using namespace novadaq::errorhandler;
24 , boost::smatch
const & w
33 time_t latest = msg.
time().tv_sec;
36 if( on && cond.persistent() )
43 while (latest - msgs.front().time().tv_sec > cond.timespan())
47 while( msgs.size() > (size_t)cond.trigger_count() )
51 bool new_state =
false;
53 if( msgs.size() == (size_t)cond.trigger_count() )
55 new_state = cond.at_least() ?
true :
false;
58 boost::mutex::scoped_lock lock(cond.timing_events().lock);
64 time_t t0 = msgs.front().time().tv_sec;
65 t_event = t0 + cond.timespan() + 1;
66 cond.timing_events().event_queue().push(
ma_timing_event(t_event, cond, s_idx, t_idx));
68 else if ( cond.at_most() )
71 boost::mutex::scoped_lock lock(cond.timing_events().lock);
79 time_t t0 = msgs.front().time().tv_sec;
80 t_event = t0 + cond.timespan() + 1;
81 cond.timing_events().event_queue().push(
ma_timing_event(t_event, cond, s_idx, t_idx));
99 bool new_status = cond.at_most() ?
true : ( cond.persistent() ?
true : false );
102 if ( new_status == on )
110 void ma_cell::reset()
timeval time() const
Get the message timestamp
Qt wrapper around MessageFacility message