jp.go.aist.rtm.RTC.executionContext
Interface ExecutionContextBase

All Superinterfaces:
ECNewDeleteFunc
All Known Implementing Classes:
ExtTrigExecutionContext, OpenHRPExecutionContext, PeriodicExecutionContext

public interface ExecutionContextBase
extends ECNewDeleteFunc

Periodic Sampled Data Processing(周期実行用)ExecutionContextのベースとなる 抽象クラスです。


Nested Class Summary
static class ExecutionContextBase.transitionModeHolder
          transitionMode保持用クラスです。
 
Method Summary
 ReturnCode_t bindComponent(RTObject_impl rtc)
           bindComponent
 RTObject[] getComponentList()
           Getting participant RTC list
 java.lang.String getKindString(ExecutionKind kind)
           Converting ExecutionKind enum to string
 ExecutionContextService getObjRef()
           Get the reference to the CORBA object
 RTObject getOwner()
           Getting a reference of the owner component
 ExecutionContextProfile getProfile()
           Getting Profile
 Properties getProperties()
           Setting Properties
 double getRate()
           Get execution rate(Hz) of ExecutionContext
 void init(Properties props)
           Initialization function of ExecutionContext class
 void invokeWorker()
           
 void invokeWorkerDo()
           
 void invokeWorkerPostDo()
           
 void invokeWorkerPreDo()
           
 boolean isAllCurrentState(LifeCycleState state)
           
 boolean isAllNextState(LifeCycleState state)
           
 boolean isOneOfCurrentState(LifeCycleState state)
           
 boolean isOneOfNextState(LifeCycleState state)
           
 ReturnCode_t onActivated(RTObjectStateMachine comp, long count)
           
 ReturnCode_t onActivating(LightweightRTObject comp)
           
 ReturnCode_t onAddedComponent(LightweightRTObject rtobj)
           
 ReturnCode_t onAddingComponent(LightweightRTObject rtobj)
           
 ReturnCode_t onDeactivated(RTObjectStateMachine comp, long count)
           
 ReturnCode_t onDeactivating(LightweightRTObject comp)
           
 LifeCycleState onGetComponentState(LifeCycleState state)
           
 ExecutionKind onGetKind(ExecutionKind kind)
           
 ExecutionContextProfile onGetProfile(ExecutionContextProfile profile)
           
 double onGetRate(double rate)
           
 ReturnCode_t onRemovedComponent(LightweightRTObject rtobj)
           
 ReturnCode_t onRemovingComponent(LightweightRTObject rtobj)
           
 ReturnCode_t onReset(RTObjectStateMachine comp, long count)
           
 ReturnCode_t onResetting(LightweightRTObject comp)
           
 ReturnCode_t onSetRate(double rate)
           
 double onSettingRate(double rate)
           
 ReturnCode_t onStarted()
           
 ReturnCode_t onStopped()
           
 ReturnCode_t onStopping()
           
 ReturnCode_t onWaitingActivated(RTObjectStateMachine comp, long count)
           onWaitingActivated() template function
 ReturnCode_t onWaitingDeactivated(RTObjectStateMachine comp, long count)
           onWaitingDeactivated() template function
 ReturnCode_t onWaitingReset(RTObjectStateMachine comp, long count)
           onWaitingReset() template function
 boolean setExecutionRate(Properties props)
           Setting execution rate from given properties.
 ReturnCode_t setKind(ExecutionKind kind)
           Set the ExecutionKind
 void setObjRef(ExecutionContextService ref)
           Sets the reference to the CORBA object
 ReturnCode_t setOwner(LightweightRTObject comp)
           Setting owner component of the execution context
 void setProperties(Properties props)
           Setting Properties
 ReturnCode_t setRate(double rate)
           Set execution rate(Hz) of ExecutionContext
 boolean setTimeout(Properties props, java.lang.String key, TimeValue timevalue)
           Setting state transition timeout from given properties.
 boolean setTransitionMode(Properties props, java.lang.String key, ExecutionContextBase.transitionModeHolder flag)
           Setting state transition mode from given properties.
 
Methods inherited from interface jp.go.aist.rtm.RTC.executionContext.ECNewDeleteFunc
ECDeleteFunc, ECNewFunc
 

Method Detail

init

void init(Properties props)
Initialization function of ExecutionContext class


setObjRef

void setObjRef(ExecutionContextService ref)
Sets the reference to the CORBA object

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

Parameters:
ref - The object reference

bindComponent

ReturnCode_t bindComponent(RTObject_impl rtc)

bindComponent

Parameters:
rtc - RTObject
Returns:
ReturnCode_t

getObjRef

ExecutionContextService getObjRef()
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

setRate

ReturnCode_t 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:
rate - Execution cycle(Unit:Hz)
Returns:
The return code of ReturnCode_t type RTC_OK: Succeed BAD_PARAMETER: Invalid value. The value might be negative.

getRate

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

getKindString

java.lang.String getKindString(ExecutionKind kind)
Converting ExecutionKind enum to string

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

Parameters:
kind - ExecutionKind
Returns:
String of ExecutionKind

setKind

ReturnCode_t setKind(ExecutionKind kind)
Set the ExecutionKind

This operation sets the kind of the execution context.

Parameters:
kind - ExecutionKind

setOwner

ReturnCode_t setOwner(LightweightRTObject comp)
Setting owner component of the execution context

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

Parameters:
comp - an owner RT-Component of this execution context
Returns:
The return code of ReturnCode_t type

getOwner

RTObject getOwner()
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

getComponentList

RTObject[] getComponentList()
Getting participant RTC list

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

Returns:
Participants RTC list

setProperties

void setProperties(Properties props)
Setting Properties

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

Parameters:
props - Properties to be set to ExecutionContextProfile::properties.

getProperties

Properties getProperties()
Setting Properties

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

Returns:
Properties to be set to ExecutionContextProfile::properties.

getProfile

ExecutionContextProfile getProfile()
Getting Profile

This function gets RTC::ExecutionContextProfile.

Returns:
ExecutionContextProfile

setExecutionRate

boolean setExecutionRate(Properties props)
Setting execution rate from given properties.

Parameters:
props - Properties to be set to ExecutionContextProfile::properties.

setTransitionMode

boolean setTransitionMode(Properties props,
                          java.lang.String key,
                          ExecutionContextBase.transitionModeHolder flag)
Setting state transition mode from given properties.

Parameters:
props - Properties to be set to ExecutionContextProfile::properties.
key -
flag -

setTimeout

boolean setTimeout(Properties props,
                   java.lang.String key,
                   TimeValue timevalue)
Setting state transition timeout from given properties.

Parameters:
props - Properties to be set to ExecutionContextProfile::properties.
key -
timevalue -

onStarted

ReturnCode_t onStarted()

onStopping

ReturnCode_t onStopping()

onStopped

ReturnCode_t onStopped()

onGetRate

double onGetRate(double rate)

onSettingRate

double onSettingRate(double rate)

onSetRate

ReturnCode_t onSetRate(double rate)

onAddingComponent

ReturnCode_t onAddingComponent(LightweightRTObject rtobj)

onAddedComponent

ReturnCode_t onAddedComponent(LightweightRTObject rtobj)

onRemovingComponent

ReturnCode_t onRemovingComponent(LightweightRTObject rtobj)

onRemovedComponent

ReturnCode_t onRemovedComponent(LightweightRTObject rtobj)

onActivating

ReturnCode_t onActivating(LightweightRTObject comp)

onActivated

ReturnCode_t onActivated(RTObjectStateMachine comp,
                         long count)

onDeactivating

ReturnCode_t onDeactivating(LightweightRTObject comp)

onDeactivated

ReturnCode_t onDeactivated(RTObjectStateMachine comp,
                           long count)

onResetting

ReturnCode_t onResetting(LightweightRTObject comp)

onReset

ReturnCode_t onReset(RTObjectStateMachine comp,
                     long count)

onGetComponentState

LifeCycleState onGetComponentState(LifeCycleState state)

onGetKind

ExecutionKind onGetKind(ExecutionKind kind)

onGetProfile

ExecutionContextProfile onGetProfile(ExecutionContextProfile profile)

onWaitingActivated

ReturnCode_t onWaitingActivated(RTObjectStateMachine comp,
                                long count)
onWaitingActivated() template function


onWaitingDeactivated

ReturnCode_t onWaitingDeactivated(RTObjectStateMachine comp,
                                  long count)
onWaitingDeactivated() template function


onWaitingReset

ReturnCode_t onWaitingReset(RTObjectStateMachine comp,
                            long count)
onWaitingReset() template function


isAllCurrentState

boolean isAllCurrentState(LifeCycleState state)

isAllNextState

boolean isAllNextState(LifeCycleState state)

isOneOfCurrentState

boolean isOneOfCurrentState(LifeCycleState state)

isOneOfNextState

boolean isOneOfNextState(LifeCycleState state)

invokeWorker

void invokeWorker()

invokeWorkerPreDo

void invokeWorkerPreDo()

invokeWorkerDo

void invokeWorkerDo()

invokeWorkerPostDo

void invokeWorkerPostDo()