iSpike  2.1
Spike conversion library for robotics
ispike::ISpikeThread Class Reference

#include <ISpikeThread.hpp>

Inheritance diagram for ispike::ISpikeThread:
ispike::Reader ispike::Writer ispike::AngleReader ispike::VisualReader ispike::AngleWriter ispike::FileAngleReader ispike::YarpAngleReader ispike::FileVisualReader ispike::YarpVisualReader ispike::FileAngleWriter ispike::YarpAngleWriter

List of all members.

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

Detailed Description

Methods common to all threads in iSpike along with error setting and retrieval

Definition at line 16 of file ISpikeThread.hpp.


Constructor & Destructor Documentation

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.


Member Function Documentation

Clears the error in the thread

Definition at line 31 of file ISpikeThread.hpp.

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.

Returns true if thread is running

Definition at line 40 of file ISpikeThread.hpp.

Returns true if thread has been requested to stop.

Definition at line 43 of file ISpikeThread.hpp.

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]
virtual void ispike::ISpikeThread::workerFunction ( ) [protected, pure virtual]

Thread run method


Member Data Documentation

boost::mutex ispike::ISpikeThread::threadMutex [protected]

Controls thread access to critical components

Definition at line 69 of file ISpikeThread.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines