21 const float& window_period,
22 const bool& use_realtime_clock
24 : current_diagnostics()
27 , minimum_interval(100000.0)
28 , maximum_interval(0.0)
29 , period(window_period)
30 , use_realtime_clock(use_realtime_clock)
31 #if defined(ECL_HAS_RT_TIMERS)
32 , last_incoming((use_realtime_clock) ?
ecl::TimeStamp::realtime_now() :
ecl::TimeStamp())
34 , last_incoming(
ecl::TimeStamp())
42 #if defined(ECL_HAS_RT_TIMERS) 43 ecl::TimeStamp new_incoming = (
use_realtime_clock) ? ecl::TimeStamp::realtime_now() : ecl::TimeStamp();
45 ecl::TimeStamp new_incoming = ecl::TimeStamp();
47 ecl::TimeStamp time_since_last = new_incoming -
last_incoming;
54 last_incoming = new_incoming;
58 #if defined(ECL_HAS_RT_TIMERS) 59 ecl::TimeStamp now = ecl::TimeStamp::realtime_now();
61 ecl::TimeStamp now = ecl::TimeStamp();
FrequencyDiagnostics current_diagnostics
ecl::TimeStamp last_incoming
Embedded control libraries.
Data relevant to frequencies of an incoming stream.
void update()
Let the diagnostics know that new data has arrived.
ecl::TimeStamp minimum_interval
ecl::TimeStamp maximum_interval
const FrequencyDiagnostics & analyse()
Analyse the recent updates to generate monitoring statistics.
ecl::TimeStamp last_anyalsed
FrequencyMonitor(const float &window_period=2.0, const bool &use_realtime_clock=false)
Setup the frequency monitor.
unsigned int incoming_counter