iCub-main
|
Tools::Emb_PeriodicEventVerifier. More...
#include <PeriodicEventsVerifier.h>
Classes | |
struct | Impl |
Public Member Functions | |
Emb_PeriodicEventVerifier () | |
Costructor. | |
~Emb_PeriodicEventVerifier () | |
Descructor. | |
bool | init (double period, double tolerance, double min, double max, double step, double reportPeriod, const std::string &name={}) |
Initializes the object with custom parameters. | |
void | tick (double currentTime) |
Signals occurrence of the event to the object. | |
Tools::Emb_PeriodicEventVerifier.
This class let you to verify if a periodic event is triggered with the desired frequency. After its initialization, you need to tick it every event occurrence. The class prints the histogram of effective event timing every @reportPeriod, by yarp logger mechanism and resets the data collected until now.
Definition at line 44 of file PeriodicEventsVerifier.h.
Tools::Emb_PeriodicEventVerifier::Emb_PeriodicEventVerifier | ( | ) |
Costructor.
Definition at line 143 of file PeriodicEventsVerifier.cpp.
Tools::Emb_PeriodicEventVerifier::~Emb_PeriodicEventVerifier | ( | ) |
Descructor.
Definition at line 146 of file PeriodicEventsVerifier.cpp.
bool Tools::Emb_PeriodicEventVerifier::init | ( | double | period, |
double | tolerance, | ||
double | min, | ||
double | max, | ||
double | step, | ||
double | reportPeriod, | ||
const std::string & | name = {} |
||
) |
Initializes the object with custom parameters.
period | is the desired period of the event [expressed in seconds]. |
tolerance | is the acceptable tolerance of the desired period [expressed in seconds]. |
min | is the minimum period you expected [expressed in seconds]. |
max | is the maximum period you expected [expressed in seconds]. |
step | is the step of the histogram. [expressed in seconds]. |
reportPeriod | the class prints the histogram every @reportPeriod seconds. [expressed in seconds]. |
name | used in the print of histogram |
Definition at line 152 of file PeriodicEventsVerifier.cpp.
void Tools::Emb_PeriodicEventVerifier::tick | ( | double | currentTime | ) |
Signals occurrence of the event to the object.
currentTime | the current time [expressed in seconds]. |
Definition at line 157 of file PeriodicEventsVerifier.cpp.