RTT::os::MainThread Class Reference

#include <MainThread.hpp>

Inheritance diagram for RTT::os::MainThread:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual int getMaxOverrun () const
virtual int getMaxOverrun () const
virtual const char * getName () const
virtual const char * getName () const
virtual Seconds getPeriod () const
virtual Seconds getPeriod () const
virtual nsecs getPeriodNS () const
virtual nsecs getPeriodNS () const
virtual int getPriority () const
virtual int getPriority () const
virtual int getScheduler () const
virtual int getScheduler () const
virtual const RTOS_TASKgetTask () const
virtual RTOS_TASKgetTask ()
virtual const RTOS_TASKgetTask () const
virtual RTOS_TASKgetTask ()
virtual bool isActive () const
virtual bool isActive () const
virtual bool isRunning () const
virtual bool isRunning () const
virtual void setMaxOverrun (int m)
virtual void setMaxOverrun (int m)
virtual bool setPeriod (Seconds period)
virtual bool setPeriod (Seconds period)
virtual bool setPriority (int priority)
virtual bool setPriority (int priority)
virtual bool setScheduler (int sched_type)
virtual bool setScheduler (int sched_type)
virtual void setWaitPeriodPolicy (int p)
virtual void setWaitPeriodPolicy (int p)
virtual bool start ()
virtual bool start ()
virtual bool stop ()
virtual bool stop ()
unsigned int threadNumber () const
unsigned int threadNumber () const
virtual void yield ()
virtual void yield ()
virtual ~MainThread ()
virtual ~MainThread ()

Static Public Member Functions

static ThreadInterfaceInstance ()
static ThreadInterfaceInstance ()
static void Release ()
static void Release ()

Private Member Functions

 MainThread ()
 MainThread ()

Private Attributes

RTOS_TASK main_task

Static Private Attributes

static boost::shared_ptr
< ThreadInterface
mt

Detailed Description

A class which represents the main() thread.

Definition at line 52 of file install/include/rtt/os/MainThread.hpp.


Constructor & Destructor Documentation

RTT::os::MainThread::MainThread (  )  [private]

Definition at line 50 of file MainThread.cpp.

RTT::os::MainThread::~MainThread (  )  [virtual]

Definition at line 54 of file MainThread.cpp.

RTT::os::MainThread::MainThread (  )  [private]
virtual RTT::os::MainThread::~MainThread (  )  [virtual]

Member Function Documentation

virtual int RTT::os::MainThread::getMaxOverrun (  )  const [virtual]
int RTT::os::MainThread::getMaxOverrun (  )  const [virtual]

Implements RTT::os::ThreadInterface.

Definition at line 118 of file MainThread.cpp.

virtual const char* RTT::os::MainThread::getName (  )  const [virtual]

Returns "main".

Implements RTT::os::ThreadInterface.

const char * RTT::os::MainThread::getName (  )  const [virtual]

Returns "main".

Implements RTT::os::ThreadInterface.

Definition at line 82 of file MainThread.cpp.

virtual Seconds RTT::os::MainThread::getPeriod (  )  const [virtual]

Returns zero.

Implements RTT::os::ThreadInterface.

Seconds RTT::os::MainThread::getPeriod (  )  const [virtual]

Returns zero.

Implements RTT::os::ThreadInterface.

Definition at line 75 of file MainThread.cpp.

virtual nsecs RTT::os::MainThread::getPeriodNS (  )  const [virtual]

Returns zero.

Implements RTT::os::ThreadInterface.

nsecs RTT::os::MainThread::getPeriodNS (  )  const [virtual]

Returns zero.

Implements RTT::os::ThreadInterface.

Definition at line 77 of file MainThread.cpp.

virtual int RTT::os::MainThread::getPriority (  )  const [virtual]

The priority of this Thread.

Returns:
The priority given upon construction of this thread or set with setPriority. The returned number has to be interpreted in the current OS scheduler.
See also:
setScheduler

Implements RTT::os::ThreadInterface.

int RTT::os::MainThread::getPriority (  )  const [virtual]

The priority of this Thread.

Returns:
The priority given upon construction of this thread or set with setPriority. The returned number has to be interpreted in the current OS scheduler.
See also:
setScheduler

Implements RTT::os::ThreadInterface.

Definition at line 104 of file MainThread.cpp.

virtual int RTT::os::MainThread::getScheduler (  )  const [virtual]

Get the scheduler policy in which this thread runs.

Returns:
An OS-specific value which represents the used scheduler.
See also:
setScheduler

Implements RTT::os::ThreadInterface.

int RTT::os::MainThread::getScheduler (  )  const [virtual]

Get the scheduler policy in which this thread runs.

Returns:
An OS-specific value which represents the used scheduler.
See also:
setScheduler

Implements RTT::os::ThreadInterface.

Definition at line 94 of file MainThread.cpp.

virtual const RTOS_TASK* RTT::os::MainThread::getTask (  )  const [virtual]

const version of the above.

Implements RTT::os::ThreadInterface.

virtual RTOS_TASK* RTT::os::MainThread::getTask (  )  [virtual]

Get the RTOS_TASK pointer.

Note:
Using this function leads to non-portable code. It is here for users which wish to tweak OS specific thread settings.

Implements RTT::os::ThreadInterface.

const RTOS_TASK * RTT::os::MainThread::getTask (  )  const [virtual]

const version of the above.

Implements RTT::os::ThreadInterface.

Definition at line 86 of file MainThread.cpp.

RTOS_TASK * RTT::os::MainThread::getTask (  )  [virtual]

Get the RTOS_TASK pointer.

Note:
Using this function leads to non-portable code. It is here for users which wish to tweak OS specific thread settings.

Implements RTT::os::ThreadInterface.

Definition at line 84 of file MainThread.cpp.

static ThreadInterface* RTT::os::MainThread::Instance (  )  [static]

Return an object which represents the main thread. Only after this call, OS calls may be done.

ThreadInterface * RTT::os::MainThread::Instance (  )  [static]

Return an object which represents the main thread. Only after this call, OS calls may be done.

Definition at line 58 of file MainThread.cpp.

virtual bool RTT::os::MainThread::isActive (  )  const [virtual]

Returns always true.

Implements RTT::os::ThreadInterface.

bool RTT::os::MainThread::isActive (  )  const [virtual]

Returns always true.

Implements RTT::os::ThreadInterface.

Definition at line 80 of file MainThread.cpp.

virtual bool RTT::os::MainThread::isRunning (  )  const [virtual]

Returns always true.

Implements RTT::os::ThreadInterface.

bool RTT::os::MainThread::isRunning (  )  const [virtual]

Returns always true.

Implements RTT::os::ThreadInterface.

Definition at line 79 of file MainThread.cpp.

static void RTT::os::MainThread::Release (  )  [static]

This is called to cleanup the main thread. After this call, no OS calls may be done.

void RTT::os::MainThread::Release (  )  [static]

This is called to cleanup the main thread. After this call, no OS calls may be done.

Definition at line 66 of file MainThread.cpp.

virtual void RTT::os::MainThread::setMaxOverrun ( int  m  )  [virtual]
void RTT::os::MainThread::setMaxOverrun ( int  m  )  [virtual]

Implements RTT::os::ThreadInterface.

Definition at line 114 of file MainThread.cpp.

virtual bool RTT::os::MainThread::setPeriod ( Seconds  period  )  [virtual]

Returns always false.

Implements RTT::os::ThreadInterface.

bool RTT::os::MainThread::setPeriod ( Seconds  period  )  [virtual]

Returns always false.

Implements RTT::os::ThreadInterface.

Definition at line 109 of file MainThread.cpp.

virtual bool RTT::os::MainThread::setPriority ( int  priority  )  [virtual]

Set the priority of this Thread.

Parameters:
priority The priority given upon construction of this thread. It has to be interpreted in the current OS scheduler.
See also:
setScheduler

Implements RTT::os::ThreadInterface.

bool RTT::os::MainThread::setPriority ( int  priority  )  [virtual]

Set the priority of this Thread.

Parameters:
priority The priority given upon construction of this thread. It has to be interpreted in the current OS scheduler.
See also:
setScheduler

Implements RTT::os::ThreadInterface.

Definition at line 99 of file MainThread.cpp.

virtual bool RTT::os::MainThread::setScheduler ( int  sched_type  )  [virtual]

Change the scheduler policy in which this thread runs.

Parameters:
sched_type An OS-specific value which selects a scheduler. Orocos requires that these two values are available:

  • ORO_SCHED_RT: Hint the OS that this thread should be scheduled as a priority or real-time process.
  • ORO_SCHED_OTHER: Hint the OS that this thread should not be scheduled as a priority or real-time process.

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.

Returns:
true if the change could be made.

Implements RTT::os::ThreadInterface.

bool RTT::os::MainThread::setScheduler ( int  sched_type  )  [virtual]

Change the scheduler policy in which this thread runs.

Parameters:
sched_type An OS-specific value which selects a scheduler. Orocos requires that these two values are available:

  • ORO_SCHED_RT: Hint the OS that this thread should be scheduled as a priority or real-time process.
  • ORO_SCHED_OTHER: Hint the OS that this thread should not be scheduled as a priority or real-time process.

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.

Returns:
true if the change could be made.

Implements RTT::os::ThreadInterface.

Definition at line 88 of file MainThread.cpp.

virtual void RTT::os::MainThread::setWaitPeriodPolicy ( int  p  )  [virtual]

Set the wait policy of a periodic thread

Parameters:
The wait policy between ORO_WAIT_ABS (absolute wait) and ORO_WAIT_REL (relative wait)

Implements RTT::os::ThreadInterface.

void RTT::os::MainThread::setWaitPeriodPolicy ( int  p  )  [virtual]

Set the wait policy of a periodic thread

Parameters:
The wait policy between ORO_WAIT_ABS (absolute wait) and ORO_WAIT_REL (relative wait)

Implements RTT::os::ThreadInterface.

Definition at line 123 of file MainThread.cpp.

virtual bool RTT::os::MainThread::start (  )  [virtual]

Always fails.

Implements RTT::os::ThreadInterface.

bool RTT::os::MainThread::start (  )  [virtual]

Always fails.

Implements RTT::os::ThreadInterface.

Definition at line 71 of file MainThread.cpp.

virtual bool RTT::os::MainThread::stop (  )  [virtual]

Always fails.

Implements RTT::os::ThreadInterface.

bool RTT::os::MainThread::stop (  )  [virtual]

Always fails.

Implements RTT::os::ThreadInterface.

Definition at line 73 of file MainThread.cpp.

unsigned int RTT::os::MainThread::threadNumber (  )  const

Returns zero, the number of the main() thread.

Reimplemented from RTT::os::ThreadInterface.

unsigned int RTT::os::MainThread::threadNumber (  )  const

Returns zero, the number of the main() thread.

Reimplemented from RTT::os::ThreadInterface.

Definition at line 133 of file MainThread.cpp.

virtual void RTT::os::MainThread::yield (  )  [virtual]

Yields (put to the back of the scheduler queue) the calling thread.

Implements RTT::os::ThreadInterface.

void RTT::os::MainThread::yield (  )  [virtual]

Yields (put to the back of the scheduler queue) the calling thread.

Implements RTT::os::ThreadInterface.

Definition at line 128 of file MainThread.cpp.


Member Data Documentation

Definition at line 61 of file install/include/rtt/os/MainThread.hpp.

static boost::shared_ptr< ThreadInterface > RTT::os::MainThread::mt [static, private]

We use a shared_ptr such that under exception conditions, the program is still cleaned up.

Definition at line 60 of file install/include/rtt/os/MainThread.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Jan 11 09:50:10 2013