Base class implementing boost thread functionality. More...
#include <ThreadSLAM.h>

Public Member Functions | |
| bool | alive (unsigned int ms) |
| void | terminateThread (void) |
| ThreadSLAM (obvious::TsdGrid &grid) | |
| void | unblock (void) |
| virtual | ~ThreadSLAM () |
Protected Member Functions | |
| virtual void | eventLoop (void)=0 |
Protected Attributes | |
| obvious::TsdGrid & | _grid |
| boost::condition_variable_any | _sleepCond |
| boost::mutex | _sleepMutex |
| bool | _stayActive |
| boost::thread * | _thread |
Base class implementing boost thread functionality.
Definition at line 19 of file ThreadSLAM.h.
| ohm_tsd_slam::ThreadSLAM::ThreadSLAM | ( | obvious::TsdGrid & | grid | ) |
Constructor
Definition at line 6 of file ThreadSLAM.cpp.
| ohm_tsd_slam::ThreadSLAM::~ThreadSLAM | ( | ) | [virtual] |
Destructor
Definition at line 14 of file ThreadSLAM.cpp.
| bool ohm_tsd_slam::ThreadSLAM::alive | ( | unsigned int | ms | ) |
alive Method to determine the state of the thread. Function tries to call the thread until the given time runs out
| ms | Wait time |
Definition at line 24 of file ThreadSLAM.cpp.
| virtual void ohm_tsd_slam::ThreadSLAM::eventLoop | ( | void | ) | [protected, pure virtual] |
eventLoop Abstract method connected to the boost threading functionality
Implemented in ohm_tsd_slam::ThreadLocalize, ohm_tsd_slam::ThreadMapping, and ohm_tsd_slam::ThreadGrid.
| void ohm_tsd_slam::ThreadSLAM::terminateThread | ( | void | ) |
terminateThread Function to terminate the thread
Definition at line 29 of file ThreadSLAM.cpp.
| void ohm_tsd_slam::ThreadSLAM::unblock | ( | void | ) |
unblock Method to set the thread from sleep to run mode
Definition at line 19 of file ThreadSLAM.cpp.
obvious::TsdGrid& ohm_tsd_slam::ThreadSLAM::_grid [protected] |
Reference to representation
Definition at line 83 of file ThreadSLAM.h.
boost::condition_variable_any ohm_tsd_slam::ThreadSLAM::_sleepCond [protected] |
Boost condition variable for sleeping mode
Definition at line 73 of file ThreadSLAM.h.
boost::mutex ohm_tsd_slam::ThreadSLAM::_sleepMutex [protected] |
Boost sleeping mutex
Definition at line 68 of file ThreadSLAM.h.
bool ohm_tsd_slam::ThreadSLAM::_stayActive [protected] |
Shutdown flag
Definition at line 78 of file ThreadSLAM.h.
boost::thread* ohm_tsd_slam::ThreadSLAM::_thread [protected] |
Boost threading object
Definition at line 63 of file ThreadSLAM.h.