RAUL  0.8.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Raul::Slave Class Referenceabstract

Thread driven by (realtime safe) signals. More...

#include <Slave.hpp>

Inheritance diagram for Raul::Slave:
Inheritance graph
Collaboration diagram for Raul::Slave:
Collaboration graph

Public Member Functions

void whip ()
 Tell the slave to do whatever work it does. More...
 
- Public Member Functions inherited from Raul::Thread
virtual void start ()
 Launch and start the thread.
 
virtual void stop ()
 Stop and terminate the thread.
 
virtual void join ()
 
void set_scheduling (int policy, unsigned int priority)
 
const std::string & name () const
 
void set_name (const std::string &name)
 
bool is_context (unsigned context) const
 
void set_context (unsigned context)
 

Protected Member Functions

virtual void _whipped ()=0
 Worker method. More...
 
- Protected Member Functions inherited from Raul::Thread
 Thread (const std::string &name="")
 
 Thread (pthread_t thread, const std::string &name="")
 Must be called from thread.
 

Protected Attributes

Semaphore _whip
 
- Protected Attributes inherited from Raul::Thread
bool _exit_flag
 

Additional Inherited Members

- Static Public Member Functions inherited from Raul::Thread
static Threadcreate (const std::string &name="")
 
static Threadcreate_for_this_thread (const std::string &name="")
 Must be called from thread.
 
static Threadget ()
 Return the calling thread. More...
 

Detailed Description

Thread driven by (realtime safe) signals.

Use this to perform some task in a separate thread you want to 'drive' from a realtime (or otherwise) thread.

Member Function Documentation

◆ whip()

void Raul::Slave::whip ( )
inline

Tell the slave to do whatever work it does.

Realtime safe.

References Raul::Semaphore::post().

◆ _whipped()

virtual void Raul::Slave::_whipped ( )
protectedpure virtual

Worker method.

This is called once from this thread every time whip() is called. Implementations likely want to put a single (non loop) chunk of code here, e.g. to process an event.

References Raul::Semaphore::wait().


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