mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
mrs_lib::Profiler Class Reference

Public Member Functions

 Profiler ()
 the basic constructor
 
 Profiler (ros::NodeHandle &nh, std::string node_name, bool profiler_enabled)
 the full constructor More...
 
 Profiler (const Profiler &other)
 the copy constructor More...
 
Profileroperator= (const Profiler &other)
 the assignment operator More...
 
Routine createRoutine (std::string name, double expected_rate, double threshold, ros::TimerEvent event)
 create a routine for a periodic function More...
 
Routine createRoutine (std::string name)
 create a routine for an aperiodic function More...
 

Constructor & Destructor Documentation

◆ Profiler() [1/2]

mrs_lib::Profiler::Profiler ( ros::NodeHandle &  nh,
std::string  node_name,
bool  profiler_enabled 
)

the full constructor

Parameters
nhnode handle
node_namethe node name
profiler_enabledif profiling is enabled

◆ Profiler() [2/2]

mrs_lib::Profiler::Profiler ( const Profiler other)

the copy constructor

Parameters
otherthe other object

Member Function Documentation

◆ createRoutine() [1/2]

Routine mrs_lib::Profiler::createRoutine ( std::string  name)

create a routine for an aperiodic function

Parameters
namethe function name
Returns
the Routine

◆ createRoutine() [2/2]

Routine mrs_lib::Profiler::createRoutine ( std::string  name,
double  expected_rate,
double  threshold,
ros::TimerEvent  event 
)

create a routine for a periodic function

Parameters
namethe function name
expected_ratethe expected rate in Hz
thresholdthe delay threshold to mark it as "late" in s
eventthe ros Timer event
Returns
the Routine

◆ operator=()

Profiler & mrs_lib::Profiler::operator= ( const Profiler other)

the assignment operator

Parameters
otherthe other object
Returns
this object

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