A mixin that can tell when a nodelet is being unloaded.
More...
#include <stateful_nodelet.hpp>
template<typename NodeletType = ::nodelet::Nodelet>
class cras::StatefulNodelet< NodeletType >
A mixin that can tell when a nodelet is being unloaded.
- Template Parameters
-
NodeletType | Type of the base nodelet. |
Definition at line 49 of file stateful_nodelet.hpp.
◆ ~StatefulNodelet()
template<typename NodeletType = ::nodelet::Nodelet>
◆ ok()
template<typename NodeletType = ::nodelet::Nodelet>
Whether it is OK to continue sleeping. If false, a pending sleep()
should stop as soon as possible.
- Returns
- Whether it is OK to continue.
- Note
- Always override this function as its default implementation returns false (used in case this function is called after the descendant parts of the objects have already been destructed).
Reimplemented from cras::InterruptibleSleepInterface.
◆ requestStop()
template<typename NodeletType = ::nodelet::Nodelet>
Call this function to request stopping this nodelet. ok()
should return false after calling this. It terminates all ongoing sleeps called by this->sleep()
.
- Note
- This method is automatically called from the destructor (but rather call it as soon as you know the nodelet should be stopped).
Implements cras::StatefulNodeletInterface.
◆ shutdown()
template<typename NodeletType = ::nodelet::Nodelet>
◆ shouldStop
template<typename NodeletType = ::nodelet::Nodelet>
The documentation for this class was generated from the following file: