Fawkes API
Fawkes Development Version
|
Worker thread for the Roomba 500 thread. More...
Public Member Functions | |
WorkerThread (fawkes::Logger *logger, fawkes::Clock *clock, fawkes::RefPtr< Roomba500 > roomba, bool query_mode) | |
Constructor. | |
~WorkerThread () | |
Destructor. | |
virtual void | loop () |
Code to execute in the thread. | |
bool | has_fresh_data () |
Check if fresh data is available. |
Worker thread for the Roomba 500 thread.
Roomba500Thread::WorkerThread::WorkerThread | ( | fawkes::Logger * | logger, |
fawkes::Clock * | clock, | ||
fawkes::RefPtr< Roomba500 > | roomba, | ||
bool | query_mode | ||
) | [inline] |
Constructor.
logger | logger |
clock | clock |
roomba | refptr to Roomba500 instance |
query_mode | true to query data instead of streaming it. |
Definition at line 54 of file thread_roomba_500.cpp.
References Roomba500::STREAM_INTERVAL_MS.
Roomba500Thread::WorkerThread::~WorkerThread | ( | ) | [inline] |
Destructor.
Definition at line 73 of file thread_roomba_500.cpp.
bool Roomba500Thread::WorkerThread::has_fresh_data | ( | ) | [inline] |
Check if fresh data is available.
Definition at line 118 of file thread_roomba_500.cpp.
Referenced by Roomba500Thread::write_blackboard().
virtual void Roomba500Thread::WorkerThread::loop | ( | ) | [inline, virtual] |
Code to execute in the thread.
Implement this method to hold the code you want to be executed continously. If you do not implement this method, the default is that the thread will exit. This is useful if you choose to only implement once().
Reimplemented from fawkes::Thread.
Definition at line 80 of file thread_roomba_500.cpp.
References fawkes::MultiLogger::log_warn().