Public Member Functions | Private Attributes | List of all members
OpenRTM::RTPreemptEC Class Reference

RTPreemptEC クラス More...

#include <RTPreemptEC.h>

Inheritance diagram for OpenRTM::RTPreemptEC:
Inheritance graph
[legend]

Public Member Functions

template<class T >
void getProperty (coil::Properties &prop, const char *key, T &value)
 Thread execution function for ExecutionContext. More...
 
 RTPreemptEC ()
 Default Constructor. More...
 
virtual int svc (void)
 Thread execution function for ExecutionContext. More...
 
virtual ~RTPreemptEC ()
 Destructor. More...
 
- Public Member Functions inherited from RTC::PeriodicExecutionContext
virtual ReturnCode_t activate_component (LightweightRTObject_ptr comp) throw (CORBA::SystemException)
 Activate an RT-component. More...
 
virtual ReturnCode_t add_component (LightweightRTObject_ptr comp) throw (CORBA::SystemException)
 Add an RT-component. More...
 
virtual RTC::ReturnCode_t bindComponent (RTObject_impl *rtc)
 Bind the component. More...
 
virtual int close (unsigned long flags)
 Thread execution function for ExecutionContext. More...
 
virtual ReturnCode_t deactivate_component (LightweightRTObject_ptr comp) throw (CORBA::SystemException)
 Deactivate an RT-component. More...
 
virtual LifeCycleState get_component_state (LightweightRTObject_ptr comp) throw (CORBA::SystemException)
 Get RT-component's state. More...
 
virtual ExecutionKind get_kind (void) throw (CORBA::SystemException)
 Get the ExecutionKind. More...
 
virtual ExecutionContextProfile * get_profile (void) throw (CORBA::SystemException)
 Get the ExecutionContextProfile. More...
 
virtual CORBA::Double get_rate (void) throw (CORBA::SystemException)
 Get execution rate(Hz) of ExecutionContext. More...
 
virtual ExecutionContextService_ptr getObjRef (void)
 Get the reference to the CORBA object. More...
 
virtual CORBA::Boolean is_running (void) throw (CORBA::SystemException)
 Check for ExecutionContext running state. More...
 
virtual int open (void *args)
 Generate internal activity thread for ExecutionContext. More...
 
 PeriodicExecutionContext ()
 Default Constructor. More...
 
 PeriodicExecutionContext (OpenRTM::DataFlowComponent_ptr owner, double rate=1000.0)
 Constructor. More...
 
virtual ReturnCode_t remove_component (LightweightRTObject_ptr comp) throw (CORBA::SystemException)
 Remove the RT-Component from participant list. More...
 
virtual ReturnCode_t reset_component (LightweightRTObject_ptr comp) throw (CORBA::SystemException)
 Reset the RT-component. More...
 
virtual ReturnCode_t set_rate (CORBA::Double rate) throw (CORBA::SystemException)
 Set execution rate(Hz) of ExecutionContext. More...
 
virtual ReturnCode_t start (void) throw (CORBA::SystemException)
 Start the ExecutionContext. More...
 
virtual ReturnCode_t stop (void) throw (CORBA::SystemException)
 Stop the ExecutionContext. More...
 
virtual ~PeriodicExecutionContext (void)
 Destructor. More...
 
- Public Member Functions inherited from RTC::ExecutionContextBase
virtual void tick () throw (CORBA::SystemException)
 Proceed with tick of ExecutionContext. More...
 
virtual ~ExecutionContextBase (void)
 Virtual Destructor. More...
 
- Public Member Functions inherited from coil::Task
virtual void activate ()
 Create a thread. More...
 
virtual void activate ()
 Create a thread. More...
 
virtual void finalize ()
 Finalizing the task. More...
 
virtual void finalize ()
 Finalizing the task. More...
 
virtual void reset ()
 Reset of task count. More...
 
virtual void reset ()
 Reset of task count. More...
 
virtual int resume (void)
 Resuming the suspended task. More...
 
virtual int resume (void)
 Resuming the suspended task. More...
 
virtual int suspend (void)
 Suspending the task. More...
 
virtual int suspend (void)
 Suspending the task. More...
 
 Task ()
 Constructor. More...
 
 Task ()
 Constructor. More...
 
virtual int wait (void)
 Waiting for the thread terminate. More...
 
virtual int wait (void)
 Waiting for the thread terminate. More...
 
virtual ~Task ()
 Destructor. More...
 
virtual ~Task ()
 Destructor. More...
 

Private Attributes

int m_policy
 
int m_priority
 
int m_waitoffset
 

Additional Inherited Members

- Static Public Member Functions inherited from coil::Task
static void * svc_run (void *args=0)
 Start thread Execution. More...
 
static unsigned int WINAPI svc_run (void *args=0)
 Start thread Execution. More...
 
- Protected Types inherited from RTC::PeriodicExecutionContext
typedef std::vector< Comp >::iterator CompItr
 
typedef RTC_Utils::StateHolder< ExecContextStateECStates
 
typedef LifeCycleState ExecContextState
 
- Protected Attributes inherited from RTC::PeriodicExecutionContext
std::vector< Compm_comps
 List of the participating component. More...
 
bool m_nowait
 Flag of ExecutionContext to run immediately (to run without waiting) More...
 
coil::TimeValue m_period
 Execution cycle of ExecutionContext. More...
 
ExecutionContextProfile m_profile
 ExecutionContextProfile. More...
 
coil::Mutex m_profileMutex
 
ExecutionContextService_var m_ref
 Reference to ExecutionContextService object. More...
 
bool m_running
 The running state of ExecutionContext true: running, false: stopped. More...
 
bool m_svc
 The thread running flag of ExecutionContext. More...
 
Worker m_worker
 A condition variable for external triggered worker. More...
 
Logger rtclog
 Logger stream. More...
 

Detailed Description

RTPreemptEC クラス

This class is real-time ExecutionContext which utilizes RT-Prempt kernel. This ExecutionContext is a real-time ExecutionContext which utilizes real-time scheduler functionality of "RT-Preempt" Linux kernel (patched or originally embedded).

Give the following configurations in your rtc.conf to use this EC.

exec_cxt.periodic.type: RTPreemptEC
exec_cxt.periodic.rate: 1000
exec_cxt.priority: 50
manager.modules.load_path: <path to RTPreemptRC.so>
manager.modules.preload: RTPreemptEC.so

Since this functionality requires root authority, your RTC which uses this EC have to be executed as root.

The following RTPreemptEC specific options are available.

NOTICE: When performing comparatively quick cycle (tens of ms or more) using this EC, log-level have to be lower than DEBUG (logger.log_level: NORMAL or etc.). Moreover, even if "logger.enable=No" is set, if "logger.log_level=PRANOID" is set, execution of onExecute() takes longer time and it may cause deadline-miss. So caution is needed.

Since
1.0.1

Definition at line 126 of file RTPreemptEC.h.

Constructor & Destructor Documentation

OpenRTM::RTPreemptEC::RTPreemptEC ( )

Default Constructor.

Default Constructor

Definition at line 41 of file RTPreemptEC.cpp.

OpenRTM::RTPreemptEC::~RTPreemptEC ( )
virtual

Destructor.

Destructor

Definition at line 83 of file RTPreemptEC.cpp.

Member Function Documentation

template<class T >
void OpenRTM::RTPreemptEC::getProperty ( coil::Properties prop,
const char *  key,
T &  value 
)
inline

Thread execution function for ExecutionContext.

Thread execution function for ExecutionContext. Invoke the registered components operation.

Returns
The execution result

Definition at line 201 of file RTPreemptEC.h.

int OpenRTM::RTPreemptEC::svc ( void  )
virtual

Thread execution function for ExecutionContext.

Thread execution function for ExecutionContext. Invoke the registered components operation.

Returns
The execution result

Reimplemented from RTC::PeriodicExecutionContext.

Definition at line 94 of file RTPreemptEC.cpp.

Member Data Documentation

int OpenRTM::RTPreemptEC::m_policy
private

Definition at line 215 of file RTPreemptEC.h.

int OpenRTM::RTPreemptEC::m_priority
private

Definition at line 214 of file RTPreemptEC.h.

int OpenRTM::RTPreemptEC::m_waitoffset
private

Definition at line 216 of file RTPreemptEC.h.


The documentation for this class was generated from the following files:


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Jun 10 2019 14:08:01