#include <rtt/os/ThreadInterface.hpp>

The periodicity is the time between the starting of two runs or zero for non periodic threads.
Definition at line 53 of file ThreadInterface.hpp.
Public Types | |
| typedef double | Seconds |
| typedef long | secs |
| typedef long | msecs |
| typedef long long | nsecs |
Public Member Functions | |
| ThreadInterface () | |
| virtual | ~ThreadInterface () |
| virtual bool | run (RunnableInterface *r)=0 |
| Run the functionality of one RunnableInterface object. | |
| virtual bool | start ()=0 |
| Start the Thread. | |
| virtual bool | stop ()=0 |
| Stop the Thread. | |
| virtual Seconds | getPeriod () const =0 |
| Get the periodicity in Seconds. | |
| virtual nsecs | getPeriodNS () const =0 |
| Get the periodicity in nanoseconds. | |
| virtual bool | isRunning () const =0 |
| Returns whether the thread is running. | |
| virtual const char * | getName () const =0 |
| Read the name of this task. | |
| virtual RTOS_TASK * | getTask ()=0 |
| Get the RTOS_TASK pointer. | |
| virtual bool | setScheduler (int sched_type)=0 |
| Change the scheduler policy in which this thread runs. | |
| virtual int | getScheduler () const =0 |
| Get the scheduler policy in which this thread runs. | |
| virtual bool | setPriority (int priority)=0 |
| Set the priority of this Thread. | |
| virtual int | getPriority () const =0 |
| The priority of this Thread. | |
| virtual void | yield ()=0 |
| Yields (but to the back of the scheduler queue) the calling thread. | |
| unsigned int | threadNumber () const |
| The unique thread number. | |
Protected Attributes | |
| int | threadnb |
| Threads are given an unique number, which follows thread creation order. | |
| virtual bool run | ( | RunnableInterface * | r | ) | [pure virtual] |
Run the functionality of one RunnableInterface object.
Only one RunnableInterface object can be run, the old one is disconnected.
| r | The object to run or zero to clear. |
Implemented in NonPeriodicActivity, MainThread, PeriodicThread, and SingleThread.
Referenced by RunnableInterface::RunnableInterface().
| virtual bool start | ( | ) | [pure virtual] |
Start the Thread.
The Thread is running
Implemented in NonPeriodicActivity, MainThread, PeriodicThread, SingleThread, and SimulationThread.
Referenced by Timer::Timer().
| virtual bool stop | ( | ) | [pure virtual] |
Stop the Thread.
finalize() is called when the Thread is stopped.
Implemented in NonPeriodicActivity, MainThread, PeriodicThread, and SingleThread.
| virtual Seconds getPeriod | ( | ) | const [pure virtual] |
Get the periodicity in Seconds.
Return zero if non periodic.
Implemented in NonPeriodicActivity, MainThread, PeriodicThread, and SingleThread.
Referenced by Timer::initialize().
| virtual nsecs getPeriodNS | ( | ) | const [pure virtual] |
Get the periodicity in nanoseconds.
Return zero if non periodic.
Implemented in MainThread, PeriodicThread, and SingleThread.
| virtual RTOS_TASK* getTask | ( | ) | [pure virtual] |
Get the RTOS_TASK pointer.
Implemented in MainThread, PeriodicThread, and SingleThread.
| virtual bool setScheduler | ( | int | sched_type | ) | [pure virtual] |
Change the scheduler policy in which this thread runs.
| sched_type | An OS-specific value which selects a scheduler. Orocos requires that these two values are available: |
Implemented in MainThread, PeriodicThread, and SingleThread.
| virtual int getScheduler | ( | ) | const [pure virtual] |
Get the scheduler policy in which this thread runs.
Implemented in MainThread, PeriodicThread, and SingleThread.
| virtual bool setPriority | ( | int | priority | ) | [pure virtual] |
Set the priority of this Thread.
| priority | The priority given upon construction of this thread. It has to be interpreted in the current OS scheduler. |
Implemented in MainThread, PeriodicThread, and SingleThread.
| virtual int getPriority | ( | ) | const [pure virtual] |
The priority of this Thread.
Implemented in MainThread, PeriodicThread, and SingleThread.
Referenced by CompletionProcessor::CompletionProcessor().
int threadnb [protected] |
Threads are given an unique number, which follows thread creation order.
Definition at line 182 of file ThreadInterface.hpp.
Referenced by ThreadInterface::ThreadInterface(), and ThreadInterface::threadNumber().
1.5.3