OpenRTM-aist 2.1.0
|
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. | |
ExecutionContextProfile class.
Periodic Sampled Data Processing (for the execution cycles) ExecutionContext class
|
explicit |
Default Constructor.
|
virtual |
Destructor.
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.
comp | The target RT-Component for add |
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().
RTC::ExecutionKind RTC_impl::ExecutionContextProfile::getKind | ( | ) | const |
Get the ExecutionKind.
This operation shall report the execution kind of the execution context.
|
inline |
References getKindString().
Referenced by getKindString().
|
static |
Converting ExecutionKind enum to string.
This function converts enumeration (PERIODIC, EVENT_DRIVEN, OTHER) defined in RTC::ExecutionKind to string.
kind | ExecutionKind |
RTC::ExecutionContextService_ptr RTC_impl::ExecutionContextProfile::getObjRef | ( | ) | const |
Get the reference to the CORBA object.
RTC::RTObject_ptr RTC_impl::ExecutionContextProfile::getOwner | ( | ) | const |
Getting a reference of the owner component.
std::chrono::nanoseconds RTC_impl::ExecutionContextProfile::getPeriod | ( | ) | const |
RTC::ExecutionContextProfile * RTC_impl::ExecutionContextProfile::getProfile | ( | ) |
Getting Profile.
const RTC::ExecutionContextProfile & RTC_impl::ExecutionContextProfile::getProfile | ( | ) | const |
Getting Profile.
coil::Properties RTC_impl::ExecutionContextProfile::getProperties | ( | ) | const |
Setting Properties.
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.
void RTC_impl::ExecutionContextProfile::lock | ( | ) | const |
Getting a lock of RTC::ExecutionContextProfile.
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.
comp | The target RT-Component for delete |
RTC::ReturnCode_t RTC_impl::ExecutionContextProfile::setKind | ( | RTC::ExecutionKind | kind | ) |
Set the ExecutionKind.
This operation sets the kind of the execution context.
kind | ExecutionKind |
void RTC_impl::ExecutionContextProfile::setObjRef | ( | RTC::ExecutionContextService_ptr | ec_ptr | ) |
Setting a CORBA object reference.
RTC::ReturnCode_t RTC_impl::ExecutionContextProfile::setOwner | ( | RTC::LightweightRTObject_ptr | comp | ) |
Setting owner component of the execution context.
RTC::ReturnCode_t RTC_impl::ExecutionContextProfile::setPeriod | ( | std::chrono::nanoseconds | period | ) |
void RTC_impl::ExecutionContextProfile::setProperties | ( | coil::Properties & | props | ) |
Setting Properties.
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.
rate | Execution cycle(Unit:Hz) |
void RTC_impl::ExecutionContextProfile::unlock | ( | ) | const |
Release a lock of the RTC::ExecutionContextProfile.