A non-templated interface of the mixin that can tell when a nodelet is being unloaded. More...
#include <stateful_nodelet.hpp>
Public Member Functions | |
virtual void | requestStop ()=0 |
Call this function to request stopping this nodelet. ok() should return false after calling this. It terminates all ongoing sleeps called by this->sleep() . More... | |
Public Member Functions inherited from cras::InterruptibleSleepInterface | |
InterruptibleSleepInterface () | |
virtual bool | ok () const |
Whether it is OK to continue sleeping. If false, a pending sleep() should stop as soon as possible. More... | |
virtual bool | sleep (const ::ros::Duration &duration) const |
Sleep for the given duration or until ok() returns false. More... | |
virtual | ~InterruptibleSleepInterface () |
Destroy the object waiting for a pending sleep() call to finish. More... | |
Additional Inherited Members | |
Protected Attributes inherited from cras::InterruptibleSleepInterface | |
::ros::WallDuration | pollDuration {0, 1000000} |
How long to wait between querying the ok() status and other conditions. More... | |
A non-templated interface of the mixin that can tell when a nodelet is being unloaded.
sleep()
method that should be used for sleeps inside the nodelet so that they are automatically interrupted on nodelet unload. Definition at line 32 of file stateful_nodelet.hpp.
|
pure virtual |
Call this function to request stopping this nodelet. ok()
should return false after calling this. It terminates all ongoing sleeps called by this->sleep()
.
Implemented in cras::StatefulNodelet< NodeletType >, cras::StatefulNodelet< BaseNodelet >, and cras::StatefulNodelet< ::nodelet::Nodelet >.