|
iSpike
2.1
Spike conversion library for robotics
|
#include <ISpikeThread.hpp>
Public Member Functions | |
| ISpikeThread () | |
| virtual | ~ISpikeThread () |
| void | clearError () |
| string | getErrorMessage () |
| bool | isError () |
| bool | isRunning () |
| bool | isStopRequested () |
| void | requestStop () |
| void | setError (string errorMsg) |
| void | setRunning (bool running) |
| virtual void | start ()=0 |
Protected Member Functions | |
| virtual void | workerFunction ()=0 |
| boost::shared_ptr< boost::thread > | getThreadPointer () const |
| void | setThreadPointer (boost::shared_ptr< boost::thread > threadPointer) |
Protected Attributes | |
| boost::mutex | threadMutex |
Methods common to all threads in iSpike along with error setting and retrieval
Definition at line 16 of file ISpikeThread.hpp.
| ispike::ISpikeThread::ISpikeThread | ( | ) | [inline] |
Constructor
Definition at line 20 of file ISpikeThread.hpp.
| virtual ispike::ISpikeThread::~ISpikeThread | ( | ) | [inline, virtual] |
Virtual destructor
Definition at line 28 of file ISpikeThread.hpp.
| void ispike::ISpikeThread::clearError | ( | ) | [inline] |
Clears the error in the thread
Definition at line 31 of file ISpikeThread.hpp.
| string ispike::ISpikeThread::getErrorMessage | ( | ) | [inline] |
Returns the message associated with an error
Definition at line 34 of file ISpikeThread.hpp.
| boost::shared_ptr<boost::thread> ispike::ISpikeThread::getThreadPointer | ( | ) | const [inline, protected] |
Returns pointer to thread
Definition at line 63 of file ISpikeThread.hpp.
| bool ispike::ISpikeThread::isError | ( | ) | [inline] |
Returns true if an error has occurred
Definition at line 37 of file ISpikeThread.hpp.
| bool ispike::ISpikeThread::isRunning | ( | ) | [inline] |
Returns true if thread is running
Definition at line 40 of file ISpikeThread.hpp.
| bool ispike::ISpikeThread::isStopRequested | ( | ) | [inline] |
Returns true if thread has been requested to stop.
Definition at line 43 of file ISpikeThread.hpp.
| void ispike::ISpikeThread::requestStop | ( | ) | [inline] |
Asks thread to stop running
Definition at line 46 of file ISpikeThread.hpp.
| void ispike::ISpikeThread::setError | ( | string | errorMsg | ) | [inline] |
Sets an error in the thread
Definition at line 49 of file ISpikeThread.hpp.
| void ispike::ISpikeThread::setRunning | ( | bool | running | ) | [inline] |
Sets running state to true
Definition at line 52 of file ISpikeThread.hpp.
| void ispike::ISpikeThread::setThreadPointer | ( | boost::shared_ptr< boost::thread > | threadPointer | ) | [inline, protected] |
Sets thread pointer
Definition at line 66 of file ISpikeThread.hpp.
| virtual void ispike::ISpikeThread::start | ( | ) | [pure virtual] |
Initialises the channel and starts the conversion thread
Implemented in ispike::FileAngleReader, ispike::YarpVisualReader, ispike::YarpAngleWriter, ispike::FileVisualReader, ispike::YarpAngleReader, and ispike::FileAngleWriter.
| virtual void ispike::ISpikeThread::workerFunction | ( | ) | [protected, pure virtual] |
Thread run method
boost::mutex ispike::ISpikeThread::threadMutex [protected] |
Controls thread access to critical components
Definition at line 69 of file ISpikeThread.hpp.