Public Member Functions
|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 bool ||setPeriod (Seconds new_period)=0|
| ||Set 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 bool ||isActive () const =0|
| ||Returns whether the thread is active. |
virtual const char * ||getName () const =0|
| ||Read the name of this task. |
|virtual RTOS_TASK * ||getTask ()=0|
| ||Get the RTOS_TASK pointer. |
virtual const RTOS_TASK * ||getTask () const =0|
| ||const version of the above. |
|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 unsigned int ||getPid () const =0|
| ||Returns the Process or Thread ID of this thread, as assigned by the Operating System. |
virtual void ||setMaxOverrun (int m)=0|
virtual int ||getMaxOverrun () const =0|
|virtual void ||setWaitPeriodPolicy (int p)=0|
| ||Set the wait policy of a periodic thread. |
virtual void ||yield ()=0|
| ||Yields (put to the back of the scheduler queue) the calling thread. |
unsigned int ||threadNumber () const |
| ||The unique thread number (within the same process). |
bool ||isSelf () const |
| ||Threads are given an unique number, which follows thread creation order. |
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 56 of file ThreadInterface.hpp.
Returns the Process or Thread ID of this thread, as assigned by the Operating System.
This function tries to return the Thread ID, if the OS supports it, otherwise it returns the process ID. If that is not available either, zero is returned. On Linux systems for example, the Thread ID of the main thread is equal to the Process ID. The Thread ID of every newly created thread is different from the Process ID (and unique).
Implemented in RTT::os::Thread, and RTT::os::MainThread.