A class which represents the main() thread. More...
#include <rtt/os/MainThread.hpp>
Public Member Functions | |
virtual bool | run (OS::RunnableInterface *r) |
Always fails. | |
virtual bool | start () |
Always fails. | |
virtual bool | stop () |
Always fails. | |
virtual Seconds | getPeriod () const |
Returns zero. | |
virtual bool | setPeriod (Seconds period) |
Returns always false. | |
virtual nsecs | getPeriodNS () const |
Returns zero. | |
virtual bool | isRunning () const |
Returns always true. | |
virtual bool | isActive () const |
Returns always true. | |
virtual const char * | getName () const |
Returns "main". | |
virtual RTOS_TASK * | getTask () |
Get the RTOS_TASK pointer. | |
virtual bool | setScheduler (int sched_type) |
Change the scheduler policy in which this thread runs. | |
virtual int | getScheduler () const |
Get the scheduler policy in which this thread runs. | |
virtual bool | setPriority (int priority) |
Set the priority of this Thread. | |
virtual int | getPriority () const |
The priority of this Thread. | |
virtual void | yield () |
Yields (put to the back of the scheduler queue) the calling thread. | |
unsigned int | threadNumber () const |
Returns zero, the number of the main() thread. | |
Static Public Member Functions | |
static ThreadInterface * | Instance () |
Return an object which represents the main thread. | |
static void | Release () |
This is called to cleanup the main thread. | |
Protected Attributes | |
int | threadnb |
Threads are given an unique number, which follows thread creation order. |
A class which represents the main() thread.
Definition at line 52 of file MainThread.hpp.
virtual int RTT::OS::MainThread::getPriority | ( | ) | const [virtual] |
The priority of this Thread.
Implements RTT::OS::ThreadInterface.
virtual int RTT::OS::MainThread::getScheduler | ( | ) | const [virtual] |
Get the scheduler policy in which this thread runs.
Implements RTT::OS::ThreadInterface.
virtual RTOS_TASK* RTT::OS::MainThread::getTask | ( | ) | [virtual] |
Get the RTOS_TASK pointer.
Implements RTT::OS::ThreadInterface.
static ThreadInterface* RTT::OS::MainThread::Instance | ( | ) | [static] |
Return an object which represents the main thread.
Only after this call, OS calls may be done.
static void RTT::OS::MainThread::Release | ( | ) | [static] |
This is called to cleanup the main thread.
After this call, no OS calls may be done.
virtual bool RTT::OS::MainThread::setPriority | ( | int | priority | ) | [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. |
Implements RTT::OS::ThreadInterface.
virtual bool RTT::OS::MainThread::setScheduler | ( | int | sched_type | ) | [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.
Implements RTT::OS::ThreadInterface.
int RTT::OS::ThreadInterface::threadnb [protected, inherited] |
Threads are given an unique number, which follows thread creation order.
Definition at line 191 of file ThreadInterface.hpp.