Fawkes API  Fawkes Development Version
Roomba500Thread::WorkerThread Class Reference

Worker thread for the Roomba 500 thread. More...

Inheritance diagram for Roomba500Thread::WorkerThread:

List of all members.

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.

Detailed Description

Worker thread for the Roomba 500 thread.

Author:
Tim Niemueller

Constructor & Destructor Documentation

Roomba500Thread::WorkerThread::WorkerThread ( fawkes::Logger logger,
fawkes::Clock clock,
fawkes::RefPtr< Roomba500 roomba,
bool  query_mode 
) [inline]

Constructor.

Parameters:
loggerlogger
clockclock
roombarefptr to Roomba500 instance
query_modetrue 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.


Member Function Documentation

bool Roomba500Thread::WorkerThread::has_fresh_data ( ) [inline]

Check if fresh data is available.

Returns:
true if fresh data is available, false otherwise.

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


The documentation for this class was generated from the following file: