OpenRTM-aist-Python 1.2.1
Classes | Public Member Functions | List of all members
OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile Class Reference

ExecutionContextProfile class. More...

Classes

class  find_participant
 

Public Member Functions

def __init__ (self, kind=RTC.PERIODIC)
 Default Constructor. More...
 
def exit (self)
 Destructor. More...
 
def setObjRef (self, ec_ptr)
 Set the reference to the CORBA object. More...
 
def getObjRef (self)
 Get the reference to the CORBA object. More...
 
def setRate (self, rate)
 Set execution rate(Hz) of ExecutionContext. More...
 
def getRate (self)
 Get execution rate(Hz) of ExecutionContext. More...
 
def getKindString (self, kind=None)
 Converting ExecutionKind enum to string. More...
 
def setKind (self, kind)
 Set the ExecutionKind. More...
 
def getKind (self)
 Get the ExecutionKind. More...
 
def setOwner (self, comp)
 Setting owner component of the execution context. More...
 
def getOwner (self)
 Getting a reference of the owner component. More...
 
def addComponent (self, comp)
 Add an RT-component. More...
 
def removeComponent (self, comp)
 Remove the RT-Component from participant list. More...
 
def getComponentList (self)
 Getting participant RTC list. More...
 
def setProperties (self, props)
 Setting Properties. More...
 
def getProperties (self)
 Setting Properties. More...
 
def getProfile (self)
 Getting Profile. More...
 
def lock (self)
 Getting a lock of RTC::ExecutionContextProfile. More...
 
def unlock (self)
 Release a lock of the RTC::ExecutionContextProfile. More...
 

Detailed Description

ExecutionContextProfile class.

Since
1.2.0

Constructor & Destructor Documentation

def OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile.__init__ (   self,
  kind = RTC.PERIODIC 
)

Default Constructor.

Default Constructor Set the following items to profile.

  • kind : PERIODIC
  • rate : 0.0

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

Member Function Documentation

def OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile.addComponent (   self,
  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

RTC::ReturnCode_t addComponent(RTC::LightweightRTObject_ptr comp);

def OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile.exit (   self)

Destructor.

Destructor

def OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile.getComponentList (   self)

Getting participant RTC list.

This function returns a list of participant RTC of the execution context.

Returns
Participants RTC list

const RTC::RTCList& getComponentList() const;

def OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile.getKind (   self)

Get the ExecutionKind.

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

Returns
ExecutionKind

RTC::ExecutionKind getKind(void) const;

def OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile.getKindString (   self,
  kind = None 
)

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* getKindString(RTC::ExecutionKind kind) const;

def OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile.getObjRef (   self)

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

RTC::ExecutionContextService_ptr getObjRef(void) const;

def OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile.getOwner (   self)

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 const RTC::RTObject_ptr getOwner() const;
def OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile.getProfile (   self)

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

RTC::ExecutionContextProfile* getProfile(void);

def OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile.getProperties (   self)

Setting Properties.

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

Parameters
propsProperties to be set to ExecutionContextProfile::properties.

const coil::Properties getProperties() const;

def OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile.getRate (   self)

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)

double getRate(void) const;

def OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile.lock (   self)

Getting a lock of RTC::ExecutionContextProfile.

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

void lock() const;

def OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile.removeComponent (   self,
  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

RTC::ReturnCode_t removeComponent(RTC::LightweightRTObject_ptr comp);

def OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile.setKind (   self,
  kind 
)

Set the ExecutionKind.

This operation sets the kind of the execution context.

Parameters
kindExecutionKind

RTC::ReturnCode_t setKind(RTC::ExecutionKind kind);

def OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile.setObjRef (   self,
  ec_ptr 
)

Set the reference to the CORBA object.

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

Parameters
ec_ptrThe reference to CORBA object

void setObjRef(RTC::ExecutionContextService_ptr ec_ptr);

def OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile.setOwner (   self,
  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 RTC::ReturnCode_t setOwner(RTC::LightweightRTObject_ptr comp);
def OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile.setProperties (   self,
  props 
)

Setting Properties.

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

Parameters
propsProperties to be set to ExecutionContextProfile::properties.

void setProperties(coil::Properties& props);

def OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile.setRate (   self,
  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.

RTC::ReturnCode_t setRate(double rate);

def OpenRTM_aist.ExecutionContextProfile.ExecutionContextProfile.unlock (   self)

Release a lock of the RTC::ExecutionContextProfile.

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

void unlock() const;


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