OpenRTM-aist 2.1.0
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static 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.
 
virtual ~ExecutionContextProfile ()
 Destructor.
 
void setObjRef (RTC::ExecutionContextService_ptr ec_ptr)
 Setting a CORBA object reference.
 
RTC::ExecutionContextService_ptr getObjRef () const
 Get the reference to the CORBA object.
 
RTC::ReturnCode_t setRate (double rate)
 Set execution rate(Hz) of ExecutionContext.
 
RTC::ReturnCode_t setPeriod (std::chrono::nanoseconds period)
 
double getRate () const
 Get execution rate(Hz) of ExecutionContext.
 
std::chrono::nanoseconds getPeriod () const
 
const char * getKindString () const
 
RTC::ReturnCode_t setKind (RTC::ExecutionKind kind)
 Set the ExecutionKind.
 
RTC::ExecutionKind getKind () const
 Get the ExecutionKind.
 
RTC::ReturnCode_t setOwner (RTC::LightweightRTObject_ptr comp)
 Setting owner component of the execution context.
 
RTC::RTObject_ptr getOwner () const
 Getting a reference of the owner component.
 
RTC::ReturnCode_t addComponent (RTC::LightweightRTObject_ptr comp)
 Add an RT-component.
 
RTC::ReturnCode_t removeComponent (RTC::LightweightRTObject_ptr comp)
 Remove the RT-Component from participant list.
 
const RTC::RTCList & getComponentList () const
 Getting participant RTC list.
 
void setProperties (coil::Properties &props)
 Setting Properties.
 
coil::Properties getProperties () const
 Setting Properties.
 
RTC::ExecutionContextProfile * getProfile ()
 Getting Profile.
 
const RTC::ExecutionContextProfile & getProfile () const
 Getting Profile.
 
void lock () const
 Getting a lock of RTC::ExecutionContextProfile.
 
void unlock () const
 Release a lock of the RTC::ExecutionContextProfile.
 

Static Public Member Functions

static const char * getKindString (RTC::ExecutionKind kind)
 Converting ExecutionKind enum to string.
 

Detailed Description

ExecutionContextProfile class.

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

Since
0.4.0

Constructor & Destructor Documentation

◆ ExecutionContextProfile()

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

Default Constructor.

◆ ~ExecutionContextProfile()

virtual RTC_impl::ExecutionContextProfile::~ExecutionContextProfile ( )
virtual

Destructor.

Member Function Documentation

◆ addComponent()

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

◆ getComponentList()

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

◆ getKind()

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

Get the ExecutionKind.

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

Returns
ExecutionKind

◆ getKindString() [1/2]

const char * RTC_impl::ExecutionContextProfile::getKindString ( ) const
inline

References getKindString().

Referenced by getKindString().

◆ getKindString() [2/2]

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

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

◆ getObjRef()

RTC::ExecutionContextService_ptr RTC_impl::ExecutionContextProfile::getObjRef ( ) const

Get the reference to the CORBA object.

◆ getOwner()

RTC::RTObject_ptr RTC_impl::ExecutionContextProfile::getOwner ( ) const

Getting a reference of the owner component.

◆ getPeriod()

std::chrono::nanoseconds RTC_impl::ExecutionContextProfile::getPeriod ( ) const

◆ getProfile() [1/2]

RTC::ExecutionContextProfile * RTC_impl::ExecutionContextProfile::getProfile ( )

Getting Profile.

◆ getProfile() [2/2]

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

Getting Profile.

◆ getProperties()

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

Setting Properties.

◆ getRate()

double RTC_impl::ExecutionContextProfile::getRate ( ) 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)

◆ lock()

void RTC_impl::ExecutionContextProfile::lock ( ) const

Getting a lock of RTC::ExecutionContextProfile.

◆ removeComponent()

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

◆ setKind()

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

Set the ExecutionKind.

This operation sets the kind of the execution context.

Parameters
kindExecutionKind

◆ setObjRef()

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

Setting a CORBA object reference.

◆ setOwner()

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

Setting owner component of the execution context.

◆ setPeriod()

RTC::ReturnCode_t RTC_impl::ExecutionContextProfile::setPeriod ( std::chrono::nanoseconds  period)

◆ setProperties()

void RTC_impl::ExecutionContextProfile::setProperties ( coil::Properties &  props)

Setting Properties.

◆ setRate()

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.

◆ unlock()

void RTC_impl::ExecutionContextProfile::unlock ( ) const

Release a lock of the RTC::ExecutionContextProfile.


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