A diagnostic task that monitors the frequency of an event. More...
#include <update_functions.h>
Public Member Functions | |
void | clear () |
Resets the statistics. | |
FrequencyStatus (const FrequencyStatusParam ¶ms) | |
Constructs a FrequencyStatus class with the given parameters. | |
virtual void | run (diagnostic_updater::DiagnosticStatusWrapper &stat) |
Fills out this Task's DiagnosticStatusWrapper. | |
void | tick () |
Signals that an event has occurred. | |
Private Attributes | |
int | count_ |
int | hist_indx_ |
boost::mutex | lock_ |
const FrequencyStatusParam | params_ |
std::vector< int > | seq_nums_ |
std::vector< ros::Time > | times_ |
A diagnostic task that monitors the frequency of an event.
This diagnostic task monitors the frequency of calls to its tick method, and creates corresponding diagnostics. It will report a warning if the frequency is outside acceptable bounds, and report an error if there have been no events in the latest window.
Definition at line 103 of file update_functions.h.
diagnostic_updater::FrequencyStatus::FrequencyStatus | ( | const FrequencyStatusParam & | params | ) | [inline] |
Constructs a FrequencyStatus class with the given parameters.
Definition at line 119 of file update_functions.h.
void diagnostic_updater::FrequencyStatus::clear | ( | ) | [inline] |
Resets the statistics.
Definition at line 130 of file update_functions.h.
virtual void diagnostic_updater::FrequencyStatus::run | ( | diagnostic_updater::DiagnosticStatusWrapper & | stat | ) | [inline, virtual] |
Fills out this Task's DiagnosticStatusWrapper.
Implements diagnostic_updater::DiagnosticTask.
Definition at line 155 of file update_functions.h.
void diagnostic_updater::FrequencyStatus::tick | ( | ) | [inline] |
Signals that an event has occurred.
Definition at line 148 of file update_functions.h.
int diagnostic_updater::FrequencyStatus::count_ [private] |
Definition at line 108 of file update_functions.h.
int diagnostic_updater::FrequencyStatus::hist_indx_ [private] |
Definition at line 111 of file update_functions.h.
boost::mutex diagnostic_updater::FrequencyStatus::lock_ [private] |
Definition at line 112 of file update_functions.h.
const FrequencyStatusParam diagnostic_updater::FrequencyStatus::params_ [private] |
Definition at line 106 of file update_functions.h.
std::vector<int> diagnostic_updater::FrequencyStatus::seq_nums_ [private] |
Definition at line 110 of file update_functions.h.
std::vector<ros::Time> diagnostic_updater::FrequencyStatus::times_ [private] |
Definition at line 109 of file update_functions.h.