#include <ThreadInterface.hpp>
Public Member Functions | |
virtual int | getMaxOverrun () const =0 |
virtual int | getMaxOverrun () const =0 |
virtual const char * | getName () const =0 |
virtual const char * | getName () const =0 |
virtual Seconds | getPeriod () const =0 |
virtual Seconds | getPeriod () const =0 |
virtual nsecs | getPeriodNS () const =0 |
virtual nsecs | getPeriodNS () const =0 |
virtual int | getPriority () const =0 |
virtual int | getPriority () const =0 |
virtual int | getScheduler () const =0 |
virtual int | getScheduler () const =0 |
virtual const RTOS_TASK * | getTask () const =0 |
virtual RTOS_TASK * | getTask ()=0 |
virtual const RTOS_TASK * | getTask () const =0 |
virtual RTOS_TASK * | getTask ()=0 |
virtual bool | isActive () const =0 |
virtual bool | isActive () const =0 |
virtual bool | isRunning () const =0 |
virtual bool | isRunning () const =0 |
bool | isSelf () const |
bool | isSelf () const |
virtual void | setMaxOverrun (int m)=0 |
virtual void | setMaxOverrun (int m)=0 |
virtual bool | setPeriod (Seconds new_period)=0 |
virtual bool | setPeriod (Seconds new_period)=0 |
virtual bool | setPriority (int priority)=0 |
virtual bool | setPriority (int priority)=0 |
virtual bool | setScheduler (int sched_type)=0 |
virtual bool | setScheduler (int sched_type)=0 |
virtual void | setWaitPeriodPolicy (int p)=0 |
virtual void | setWaitPeriodPolicy (int p)=0 |
virtual bool | start ()=0 |
virtual bool | start ()=0 |
virtual bool | stop ()=0 |
virtual bool | stop ()=0 |
ThreadInterface () | |
ThreadInterface () | |
unsigned int | threadNumber () const |
unsigned int | threadNumber () const |
virtual void | yield ()=0 |
virtual void | yield ()=0 |
virtual | ~ThreadInterface () |
virtual | ~ThreadInterface () |
Protected Attributes | |
int | threadnb |
A thread which is being run. The periodicity is the time between the starting of two runs or zero for non periodic threads.
Definition at line 50 of file install/include/rtt/os/ThreadInterface.hpp.
ThreadInterface::ThreadInterface | ( | ) |
Definition at line 45 of file ThreadInterface.cpp.
ThreadInterface::~ThreadInterface | ( | ) | [virtual] |
Definition at line 51 of file ThreadInterface.cpp.
RTT::os::ThreadInterface::ThreadInterface | ( | ) |
virtual RTT::os::ThreadInterface::~ThreadInterface | ( | ) | [virtual] |
virtual int RTT::os::ThreadInterface::getMaxOverrun | ( | ) | const [pure virtual] |
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual int RTT::os::ThreadInterface::getMaxOverrun | ( | ) | const [pure virtual] |
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual const char* RTT::os::ThreadInterface::getName | ( | ) | const [pure virtual] |
Read the name of this task
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual const char* RTT::os::ThreadInterface::getName | ( | ) | const [pure virtual] |
Read the name of this task
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual Seconds RTT::os::ThreadInterface::getPeriod | ( | ) | const [pure virtual] |
Get the periodicity in Seconds. Return zero if non periodic.
Implemented in RTT::Activity, RTT::os::MainThread, RTT::os::Thread, RTT::Activity, RTT::os::MainThread, and RTT::os::Thread.
virtual Seconds RTT::os::ThreadInterface::getPeriod | ( | ) | const [pure virtual] |
Get the periodicity in Seconds. Return zero if non periodic.
Implemented in RTT::Activity, RTT::os::MainThread, RTT::os::Thread, RTT::Activity, RTT::os::MainThread, and RTT::os::Thread.
virtual nsecs RTT::os::ThreadInterface::getPeriodNS | ( | ) | const [pure virtual] |
Get the periodicity in nanoseconds. Return zero if non periodic.
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual nsecs RTT::os::ThreadInterface::getPeriodNS | ( | ) | const [pure virtual] |
Get the periodicity in nanoseconds. Return zero if non periodic.
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual int RTT::os::ThreadInterface::getPriority | ( | ) | const [pure virtual] |
The priority of this Thread.
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual int RTT::os::ThreadInterface::getPriority | ( | ) | const [pure virtual] |
The priority of this Thread.
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual int RTT::os::ThreadInterface::getScheduler | ( | ) | const [pure virtual] |
Get the scheduler policy in which this thread runs.
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual int RTT::os::ThreadInterface::getScheduler | ( | ) | const [pure virtual] |
Get the scheduler policy in which this thread runs.
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual const RTOS_TASK* RTT::os::ThreadInterface::getTask | ( | ) | const [pure virtual] |
const version of the above.
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual RTOS_TASK* RTT::os::ThreadInterface::getTask | ( | ) | [pure virtual] |
Get the RTOS_TASK pointer.
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual const RTOS_TASK* RTT::os::ThreadInterface::getTask | ( | ) | const [pure virtual] |
const version of the above.
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual RTOS_TASK* RTT::os::ThreadInterface::getTask | ( | ) | [pure virtual] |
Get the RTOS_TASK pointer.
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual bool RTT::os::ThreadInterface::isActive | ( | ) | const [pure virtual] |
Returns whether the thread is active. A thread is active between the invocation of start() and the invocation of stop().
Implemented in RTT::Activity, RTT::os::MainThread, RTT::os::Thread, RTT::Activity, RTT::os::MainThread, and RTT::os::Thread.
virtual bool RTT::os::ThreadInterface::isActive | ( | ) | const [pure virtual] |
Returns whether the thread is active. A thread is active between the invocation of start() and the invocation of stop().
Implemented in RTT::Activity, RTT::os::MainThread, RTT::os::Thread, RTT::Activity, RTT::os::MainThread, and RTT::os::Thread.
virtual bool RTT::os::ThreadInterface::isRunning | ( | ) | const [pure virtual] |
Returns whether the thread is running. A thread is running if it is executing its loop() function or in the process of periodically calling step(). Hence for periodic threads, isRunning() == isActive() while for non-periodic threads, isRunning() is only true if isActive() and it is executing loop().
Implemented in RTT::Activity, RTT::extras::FileDescriptorActivity, RTT::extras::SimulationThread, RTT::os::MainThread, RTT::os::Thread, RTT::Activity, RTT::extras::FileDescriptorActivity, RTT::extras::SimulationThread, RTT::os::MainThread, and RTT::os::Thread.
virtual bool RTT::os::ThreadInterface::isRunning | ( | ) | const [pure virtual] |
Returns whether the thread is running. A thread is running if it is executing its loop() function or in the process of periodically calling step(). Hence for periodic threads, isRunning() == isActive() while for non-periodic threads, isRunning() is only true if isActive() and it is executing loop().
Implemented in RTT::Activity, RTT::extras::FileDescriptorActivity, RTT::extras::SimulationThread, RTT::os::MainThread, RTT::os::Thread, RTT::Activity, RTT::extras::FileDescriptorActivity, RTT::extras::SimulationThread, RTT::os::MainThread, and RTT::os::Thread.
bool RTT::os::ThreadInterface::isSelf | ( | ) | const |
bool ThreadInterface::isSelf | ( | ) | const |
Definition at line 58 of file ThreadInterface.cpp.
virtual void RTT::os::ThreadInterface::setMaxOverrun | ( | int | m | ) | [pure virtual] |
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual void RTT::os::ThreadInterface::setMaxOverrun | ( | int | m | ) | [pure virtual] |
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual bool RTT::os::ThreadInterface::setPeriod | ( | Seconds | new_period | ) | [pure virtual] |
Set the periodicity in Seconds.
new_period | A positive number expressing the period |
Implemented in RTT::Activity, RTT::os::MainThread, RTT::os::Thread, RTT::Activity, RTT::os::MainThread, and RTT::os::Thread.
virtual bool RTT::os::ThreadInterface::setPeriod | ( | Seconds | new_period | ) | [pure virtual] |
Set the periodicity in Seconds.
new_period | A positive number expressing the period |
Implemented in RTT::Activity, RTT::os::MainThread, RTT::os::Thread, RTT::Activity, RTT::os::MainThread, and RTT::os::Thread.
virtual bool RTT::os::ThreadInterface::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 RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual bool RTT::os::ThreadInterface::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 RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual bool RTT::os::ThreadInterface::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:
|
Your OS can in addition provide other sched_type's which map more naturally to the schedulers present. If your OS does not make a distinction between real-time and other, both values may map to the same scheduler type.
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual bool RTT::os::ThreadInterface::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:
|
Your OS can in addition provide other sched_type's which map more naturally to the schedulers present. If your OS does not make a distinction between real-time and other, both values may map to the same scheduler type.
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual void RTT::os::ThreadInterface::setWaitPeriodPolicy | ( | int | p | ) | [pure virtual] |
Set the wait policy of a periodic thread
The | wait policy between ORO_WAIT_ABS (absolute wait) and ORO_WAIT_REL (relative wait) |
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual void RTT::os::ThreadInterface::setWaitPeriodPolicy | ( | int | p | ) | [pure virtual] |
Set the wait policy of a periodic thread
The | wait policy between ORO_WAIT_ABS (absolute wait) and ORO_WAIT_REL (relative wait) |
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual bool RTT::os::ThreadInterface::start | ( | ) | [pure virtual] |
Start the Thread.
Implemented in RTT::Activity, RTT::extras::FileDescriptorActivity, RTT::extras::IRQActivity, RTT::extras::SimulationThread, RTT::os::MainThread, RTT::os::Thread, RTT::Activity, RTT::extras::FileDescriptorActivity, RTT::extras::IRQActivity, RTT::extras::SimulationThread, RTT::os::MainThread, and RTT::os::Thread.
virtual bool RTT::os::ThreadInterface::start | ( | ) | [pure virtual] |
Start the Thread.
Implemented in RTT::Activity, RTT::extras::FileDescriptorActivity, RTT::extras::IRQActivity, RTT::extras::SimulationThread, RTT::os::MainThread, RTT::os::Thread, RTT::Activity, RTT::extras::FileDescriptorActivity, RTT::extras::IRQActivity, RTT::extras::SimulationThread, RTT::os::MainThread, and RTT::os::Thread.
virtual bool RTT::os::ThreadInterface::stop | ( | ) | [pure virtual] |
Stop the Thread.
Implemented in RTT::Activity, RTT::extras::FileDescriptorActivity, RTT::os::MainThread, RTT::os::Thread, RTT::Activity, RTT::extras::FileDescriptorActivity, RTT::os::MainThread, and RTT::os::Thread.
virtual bool RTT::os::ThreadInterface::stop | ( | ) | [pure virtual] |
Stop the Thread.
Implemented in RTT::Activity, RTT::extras::FileDescriptorActivity, RTT::os::MainThread, RTT::os::Thread, RTT::Activity, RTT::extras::FileDescriptorActivity, RTT::os::MainThread, and RTT::os::Thread.
unsigned int RTT::os::ThreadInterface::threadNumber | ( | ) | const [inline] |
The unique thread number (within the same process).
Reimplemented in RTT::os::MainThread, and RTT::os::MainThread.
Definition at line 199 of file rtt/os/ThreadInterface.hpp.
unsigned int RTT::os::ThreadInterface::threadNumber | ( | ) | const [inline] |
The unique thread number (within the same process).
Reimplemented in RTT::os::MainThread, and RTT::os::MainThread.
Definition at line 186 of file install/include/rtt/os/ThreadInterface.hpp.
virtual void RTT::os::ThreadInterface::yield | ( | ) | [pure virtual] |
Yields (put to the back of the scheduler queue) the calling thread.
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
virtual void RTT::os::ThreadInterface::yield | ( | ) | [pure virtual] |
Yields (put to the back of the scheduler queue) the calling thread.
Implemented in RTT::os::MainThread, RTT::os::Thread, RTT::os::MainThread, and RTT::os::Thread.
int RTT::os::ThreadInterface::threadnb [protected] |
Threads are given an unique number, which follows thread creation order.
Definition at line 198 of file install/include/rtt/os/ThreadInterface.hpp.