iCub-main
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
Tools::Emb_PeriodicEventVerifier Class Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Emb_PeriodicEventVerifier()

Tools::Emb_PeriodicEventVerifier::Emb_PeriodicEventVerifier ( )

Costructor.

Definition at line 143 of file PeriodicEventsVerifier.cpp.

◆ ~Emb_PeriodicEventVerifier()

Tools::Emb_PeriodicEventVerifier::~Emb_PeriodicEventVerifier ( )

Descructor.

Definition at line 146 of file PeriodicEventsVerifier.cpp.

Member Function Documentation

◆ init()

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.

Parameters
periodis the desired period of the event [expressed in seconds].
toleranceis the acceptable tolerance of the desired period [expressed in seconds].
minis the minimum period you expected [expressed in seconds].
maxis the maximum period you expected [expressed in seconds].
stepis the step of the histogram. [expressed in seconds].
reportPeriodthe class prints the histogram every @reportPeriod seconds. [expressed in seconds].
nameused in the print of histogram
Returns
true/false on success/failure.
Note
the number of histogram columns are: ((@max-@min)/@step ) +2

Definition at line 152 of file PeriodicEventsVerifier.cpp.

◆ tick()

void Tools::Emb_PeriodicEventVerifier::tick ( double  currentTime)

Signals occurrence of the event to the object.

Parameters
currentTimethe current time [expressed in seconds].

Definition at line 157 of file PeriodicEventsVerifier.cpp.


The documentation for this class was generated from the following files: