Struct StatefulNodeletInterface

Inheritance Relationships

Base Type

Derived Types

Struct Documentation

struct StatefulNodeletInterface : public cras::InterruptibleSleepInterface

A non-templated interface of the mixin that can tell when a nodelet is being unloaded.

Note

InterruptibleSleepInterface also provides a sleep() method that should be used for sleeps inside the nodelet so that they are automatically interrupted on nodelet unload.

Subclassed by cras::StatefulNodelet< ::nodelet::Nodelet >, cras::StatefulNodelet< BaseNodelet >, cras::StatefulNodelet< NodeletType >

Public 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().

Note

This method is automatically called from the destructor (but rather call it as soon as you know the nodelet should be stopped).