OpenRTM-aist  1.2.1
Classes | Public Member Functions | List of all members
RTC_impl::ExecutionContextProfile Class Reference

ExecutionContextProfile class. More...

#include <ExecutionContextProfile.h>

Public Member Functions

 ExecutionContextProfile (RTC::ExecutionKind kind=RTC::PERIODIC)
 Default Constructor. More...
 
virtual ~ExecutionContextProfile (void)
 Destructor. More...
 
void setObjRef (RTC::ExecutionContextService_ptr ec_ptr)
 Setting a CORBA object reference. More...
 
RTC::ExecutionContextService_ptr getObjRef (void) const
 Get the reference to the CORBA object. More...
 
RTC::ReturnCode_t setRate (double rate)
 Set execution rate(Hz) of ExecutionContext. More...
 
RTC::ReturnCode_t setPeriod (double period)
 
RTC::ReturnCode_t setPeriod (coil::TimeValue period)
 
double getRate (void) const
 Get execution rate(Hz) of ExecutionContext. More...
 
coil::TimeValue getPeriod (void) const
 
const char * getKindString (RTC::ExecutionKind kind) const
 Converting ExecutionKind enum to string. More...
 
const char * getKindString () const
 
RTC::ReturnCode_t setKind (RTC::ExecutionKind kind)
 Set the ExecutionKind. More...
 
RTC::ExecutionKind getKind (void) const
 Get the ExecutionKind. More...
 
RTC::ReturnCode_t setOwner (RTC::LightweightRTObject_ptr comp)
 Setting owner component of the execution context. More...
 
const RTC::RTObject_ptr getOwner () const
 Getting a reference of the owner component. More...
 
RTC::ReturnCode_t addComponent (RTC::LightweightRTObject_ptr comp)
 Add an RT-component. More...
 
RTC::ReturnCode_t removeComponent (RTC::LightweightRTObject_ptr comp)
 Remove the RT-Component from participant list. More...
 
const RTC::RTCList & getComponentList () const
 Getting participant RTC list. More...
 
void setProperties (coil::Properties &props)
 Setting Properties. More...
 
const coil::Properties getProperties () const
 Setting Properties. More...
 
RTC::ExecutionContextProfile * getProfile (void)
 Getting Profile. More...
 
const RTC::ExecutionContextProfile & getProfile (void) const
 Getting Profile. More...
 
void lock () const
 Getting a lock of RTC::ExecutionContextProfile. More...
 
void unlock () const
 Release a lock of the RTC::ExecutionContextProfile. More...
 

Detailed Description

ExecutionContextProfile class.

Periodic Sampled Data Processing (for the execution cycles) ExecutionContext class

Since
0.4.0

Constructor & Destructor Documentation

RTC_impl::ExecutionContextProfile::ExecutionContextProfile ( RTC::ExecutionKind  kind = RTC::PERIODIC)

Default Constructor.

Default Constructor Set the following items to profile.

  • kind : PERIODIC
  • rate : 0.0
virtual RTC_impl::ExecutionContextProfile::~ExecutionContextProfile ( void  )
virtual

Destructor.

Destructor

Member Function Documentation

RTC::ReturnCode_t RTC_impl::ExecutionContextProfile::addComponent ( RTC::LightweightRTObject_ptr  comp)

Add an RT-component.

The operation causes the given RTC to begin participating in the execution context. The newly added RTC will receive a call to LightweightRTComponent::attach_context and then enter the Inactive state. BAD_PARAMETER will be invoked, if the given RT-Component is null or if the given RT-Component is other than DataFlowComponent.

Parameters
compThe target RT-Component for add
Returns
The return code of ReturnCode_t type

Referenced by getKindString().

const RTC::RTCList& RTC_impl::ExecutionContextProfile::getComponentList ( ) const

Getting participant RTC list.

This function returns a list of participant RTC of the execution context. Since the function returns a reference to the member variable of component list, user have to lock by ExecutionContextProfile::lock() before using the list, and user also have to release the unlock by ExecutionContextProfile::unlock().

Returns
Participants RTC list

Referenced by getKindString().

RTC::ExecutionKind RTC_impl::ExecutionContextProfile::getKind ( void  ) const

Get the ExecutionKind.

This operation shall report the execution kind of the execution context.

Returns
ExecutionKind

Referenced by getKindString().

const char* RTC_impl::ExecutionContextProfile::getKindString ( RTC::ExecutionKind  kind) const

Converting ExecutionKind enum to string.

This function converts enumeration (PERIODIC, EVENT_DRIVEN, OTHER) defined in RTC::ExecutionKind to string.

Parameters
kindExecutionKind
Returns
String of ExecutionKind
const char* RTC_impl::ExecutionContextProfile::getKindString ( ) const
inline
RTC::ExecutionContextService_ptr RTC_impl::ExecutionContextProfile::getObjRef ( void  ) const

Get the reference to the CORBA object.

Get the reference to the CORBA object as ExecutioncontextService of this object.

Returns
The reference to CORBA object
const RTC::RTObject_ptr RTC_impl::ExecutionContextProfile::getOwner ( ) const

Getting a reference of the owner component.

This function returns a reference of the owner RT-Component of this execution context

Returns
a reference of the owner RT-Component

Referenced by getKindString().

coil::TimeValue RTC_impl::ExecutionContextProfile::getPeriod ( void  ) const
RTC::ExecutionContextProfile* RTC_impl::ExecutionContextProfile::getProfile ( void  )

Getting Profile.

This function gets RTC::ExecutionContextProfile. The ownership of the obtained ExecutionContextProfile is given to caller. The caller should release obtained object when it is unneccessary anymore.

Returns
RTC::ExecutionContextProfile

Referenced by getKindString().

const RTC::ExecutionContextProfile& RTC_impl::ExecutionContextProfile::getProfile ( void  ) const

Getting Profile.

This function gets RTC::ExecutionContextProfile.

Returns
RTC::ExecutionContextProfile
const coil::Properties RTC_impl::ExecutionContextProfile::getProperties ( ) const

Setting Properties.

This function sets ExecutionContextProfile::properties by coil::Properties.

Parameters
propsProperties to be set to ExecutionContextProfile::properties.

Referenced by getKindString().

double RTC_impl::ExecutionContextProfile::getRate ( void  ) const

Get execution rate(Hz) of ExecutionContext.

This operation shall return the rate (in hertz) at which its Active participating RTCs are being invoked.

Returns
Execution cycle(Unit:Hz)
void RTC_impl::ExecutionContextProfile::lock ( ) const

Getting a lock of RTC::ExecutionContextProfile.

This function locks RTC::ExecutionContextProfile in the object. The lock should be released when the lock is unneccessary.

Referenced by getKindString().

RTC::ReturnCode_t RTC_impl::ExecutionContextProfile::removeComponent ( RTC::LightweightRTObject_ptr  comp)

Remove the RT-Component from participant list.

This operation causes a participant RTC to stop participating in the execution context. The removed RTC will receive a call to LightweightRTComponent::detach_context. BAD_PARAMETER will be returned, if the given RT-Component is not participating in the participant list.

Parameters
compThe target RT-Component for delete
Returns
The return code of ReturnCode_t type

Referenced by getKindString().

RTC::ReturnCode_t RTC_impl::ExecutionContextProfile::setKind ( RTC::ExecutionKind  kind)

Set the ExecutionKind.

This operation sets the kind of the execution context.

Parameters
kindExecutionKind

Referenced by getKindString().

void RTC_impl::ExecutionContextProfile::setObjRef ( RTC::ExecutionContextService_ptr  ec_ptr)

Setting a CORBA object reference.

This operation sets a object reference to ExecutionContextService. After setting a new object reference, old reference is released. The object reference have to be valid reference.

Parameters
ec_ptrA CORBA object reference of ExecutionContextService
RTC::ReturnCode_t RTC_impl::ExecutionContextProfile::setOwner ( RTC::LightweightRTObject_ptr  comp)

Setting owner component of the execution context.

This function sets an RT-Component to be owner of the execution context.

Parameters
compan owner RT-Component of this execution context
Returns
The return code of ReturnCode_t type

Referenced by getKindString().

RTC::ReturnCode_t RTC_impl::ExecutionContextProfile::setPeriod ( double  period)
RTC::ReturnCode_t RTC_impl::ExecutionContextProfile::setPeriod ( coil::TimeValue  period)
void RTC_impl::ExecutionContextProfile::setProperties ( coil::Properties props)

Setting Properties.

This function sets ExecutionContextProfile::properties by coil::Properties.

Parameters
propsProperties to be set to ExecutionContextProfile::properties.

Referenced by getKindString().

RTC::ReturnCode_t RTC_impl::ExecutionContextProfile::setRate ( double  rate)

Set execution rate(Hz) of ExecutionContext.

This operation shall set the rate (in hertz) at which this context’s Active participating RTCs are being called. If the execution kind of the context is PERIODIC, a rate change shall result in the invocation of on_rate_changed on any RTCs realizing DataFlowComponentAction that are registered with any RTCs participating in the context.

Parameters
rateExecution cycle(Unit:Hz)
Returns
The return code of ReturnCode_t type RTC_OK: Succeed BAD_PARAMETER: Invalid value. The value might be negative.
void RTC_impl::ExecutionContextProfile::unlock ( ) const

Release a lock of the RTC::ExecutionContextProfile.

This function release the lock of RTC::ExecutionContextProfile in the object.

Referenced by getKindString().


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