public class PeriodicExecutionContext extends ExecutionContextServicePOA implements java.lang.Runnable, ObjectCreator<ExecutionContextBase>, ObjectDestructor, ExecutionContextBase
Periodic Sampled Data Processing(周期実行用)ExecutionContextクラスです。
| Modifier and Type | Class and Description | 
|---|---|
protected class  | 
PeriodicExecutionContext.Comp
ExecutionContextにattachされたコンポーネントのメソッド呼出用クラスです。 
 | 
protected class  | 
PeriodicExecutionContext.DFP
DataFlowComponentのAction定義用抽象クラスです。 
 | 
protected class  | 
PeriodicExecutionContext.DFPBase
DataFlowComponentのAction定義用抽象クラスです。 
 | 
protected class  | 
PeriodicExecutionContext.find_comp
管理対象コンポーネント検索用ヘルパークラスです。 
 | 
ExecutionContextBase.transitionModeHolder| Modifier and Type | Field and Description | 
|---|---|
(package private) TimeValue | 
m_activationTimeout  | 
protected java.util.Vector<PeriodicExecutionContext.Comp> | 
m_comps
ExecutionContextにatttachされているコンポーネントのリストです。 
 | 
protected java.util.ArrayList<java.lang.Integer> | 
m_cpu  | 
(package private) TimeValue | 
m_deactivationTimeout  | 
protected boolean | 
m_nowait  | 
protected ExecutionContextProfile | 
m_profile
ExecutionContextProfileです。 
 | 
protected ExecutionContextService | 
m_ref
ExecutionContextServiceとしてのCORBAオブジェクト参照です。 
 | 
(package private) TimeValue | 
m_resetTimeout  | 
(package private) boolean | 
m_syncActivation  | 
(package private) boolean | 
m_syncDeactivation  | 
(package private) boolean | 
m_syncReset  | 
protected java.lang.Thread | 
m_thread  | 
protected long | 
m_usec
ExecutionContextの動作周期です。 
 | 
protected ExecutionContextWorker | 
m_worker
ExecutionContextWorkerです。 
 | 
protected Logbuf | 
rtcout
Logging用フォーマットオブジェクト 
 | 
protected boolean | 
ticked_  | 
| Constructor and Description | 
|---|
PeriodicExecutionContext()
 Default Constructor 
 | 
_all_interfaces, _invoke, _this, _thisTimeValue m_activationTimeout
TimeValue m_deactivationTimeout
TimeValue m_resetTimeout
boolean m_syncActivation
boolean m_syncDeactivation
boolean m_syncReset
protected java.util.Vector<PeriodicExecutionContext.Comp> m_comps
ExecutionContextにatttachされているコンポーネントのリストです。
protected ExecutionContextWorker m_worker
ExecutionContextWorkerです。
protected ExecutionContextProfile m_profile
ExecutionContextProfileです。
protected long m_usec
ExecutionContextの動作周期です。
protected ExecutionContextService m_ref
ExecutionContextServiceとしてのCORBAオブジェクト参照です。
protected boolean m_nowait
protected java.lang.Thread m_thread
protected boolean ticked_
protected java.util.ArrayList<java.lang.Integer> m_cpu
protected Logbuf rtcout
Logging用フォーマットオブジェクト
public PeriodicExecutionContext()
Default Constructor Set the following items to profile. - kind : PERIODIC - rate : 0.0
public ExecutionContextService __this()
__this()
public void setObjRef(ExecutionContextService ref)
本オブジェクトのExecutionContextServiceとしてのCORBAオブジェクト参照を設定します。
setObjRef in interface ExecutionContextBaseref - CORBAオブジェクト参照public ExecutionContextService getRef()
本オブジェクトのExecutionContextServiceとしてのCORBAオブジェクト参照を設定します。
public int open()
ExecutionContext用のスレッドを生成します。
public int svc()
ExecutionContext用のスレッドの実行関数です。 登録されたコンポーネントの処理を呼び出します。
public void run()
スレッド実行関数です。
run in interface java.lang.Runnablepublic int close(long flags)
スレッド終了関数です。
public boolean is_running()
ExecutionContextが実行中かどうかを取得します。
is_running in interface ExecutionContextOperationspublic boolean isRunning()
public boolean onIsRunning(boolean running)
public ReturnCode_t onStarting()
public ReturnCode_t onStarted()
onStarted in interface ExecutionContextBasepublic ReturnCode_t onStopping()
onStopping in interface ExecutionContextBasepublic ReturnCode_t onStopped()
onStopped in interface ExecutionContextBasepublic double onGetRate(double rate)
onGetRate in interface ExecutionContextBasepublic double onSettingRate(double rate)
onSettingRate in interface ExecutionContextBasepublic ReturnCode_t onSetRate(double rate)
onSetRate in interface ExecutionContextBasepublic ReturnCode_t onAddingComponent(LightweightRTObject rtobj)
onAddingComponent in interface ExecutionContextBasepublic ReturnCode_t onAddedComponent(LightweightRTObject rtobj)
onAddedComponent in interface ExecutionContextBasepublic ReturnCode_t onRemovingComponent(LightweightRTObject rtobj)
onRemovingComponent in interface ExecutionContextBasepublic ReturnCode_t onRemovedComponent(LightweightRTObject rtobj)
onRemovedComponent in interface ExecutionContextBasepublic ReturnCode_t onActivating(LightweightRTObject comp)
onActivating in interface ExecutionContextBasepublic ReturnCode_t onActivated(RTObjectStateMachine comp, long count)
onActivated in interface ExecutionContextBasepublic ReturnCode_t onDeactivating(LightweightRTObject comp)
onDeactivating in interface ExecutionContextBasepublic ReturnCode_t onDeactivated(RTObjectStateMachine comp, long count)
onDeactivated in interface ExecutionContextBasepublic ReturnCode_t onResetting(LightweightRTObject comp)
onResetting in interface ExecutionContextBasepublic ReturnCode_t onReset(RTObjectStateMachine comp, long count)
onReset in interface ExecutionContextBasepublic boolean threadRunning()
public LifeCycleState onGetComponentState(LifeCycleState state)
onGetComponentState in interface ExecutionContextBasepublic ExecutionKind onGetKind(ExecutionKind kind)
onGetKind in interface ExecutionContextBasepublic ExecutionContextProfile onGetProfile(ExecutionContextProfile profile)
onGetProfile in interface ExecutionContextBasepublic ReturnCode_t onWaitingActivated(RTObjectStateMachine comp, long count)
onWaitingActivated in interface ExecutionContextBasepublic ReturnCode_t onWaitingDeactivated(RTObjectStateMachine comp, long count)
ExecutionContextBaseonWaitingDeactivated in interface ExecutionContextBasepublic ReturnCode_t onWaitingReset(RTObjectStateMachine comp, long count)
ExecutionContextBaseonWaitingReset in interface ExecutionContextBasepublic ReturnCode_t start()
ExecutionContext をスタートします。
start in interface ExecutionContextOperationspublic ReturnCode_t stop()
ExecutionContext をストップします。
stop in interface ExecutionContextOperationspublic double get_rate()
ExecutionContextの実行周期(Hz)を取得します。
get_rate in interface ExecutionContextOperationspublic TimeValue getPeriod()
public ReturnCode_t set_rate(double rate)
ExecutionContextの実行周期(Hz)を設定します。
set_rate in interface ExecutionContextOperationsrate - 実行周期(Hz)public ReturnCode_t activate_component(LightweightRTObject comp)
コンポーネントをアクティブ化します。
activate_component in interface ExecutionContextOperationscomp - アクティブ化対象コンポーネントpublic ReturnCode_t activateComponent(LightweightRTObject comp)
public ReturnCode_t waitForActivated(RTObjectStateMachine rtobj)
public ReturnCode_t deactivate_component(LightweightRTObject comp)
コンポーネントを非アクティブ化します。
deactivate_component in interface ExecutionContextOperationscomp - 非アクティブ化対象コンポーネントpublic ReturnCode_t deactivateComponent(LightweightRTObject comp)
public ReturnCode_t waitForDeactivated(RTObjectStateMachine rtobj)
public ReturnCode_t reset_component(LightweightRTObject comp)
コンポーネントをリセットします。
reset_component in interface ExecutionContextOperationscomp - リセット対象コンポーネントpublic ReturnCode_t resetComponent(LightweightRTObject comp)
public ReturnCode_t waitForReset(RTObjectStateMachine rtobj)
public LifeCycleState get_component_state(LightweightRTObject comp)
コンポーネントの状態を取得します。
get_component_state in interface ExecutionContextOperationscomp - 状態取得対象コンポーネントpublic LifeCycleState getComponentState(LightweightRTObject comp)
public final java.lang.String getStateString(LifeCycleState state)
public ExecutionKind get_kind()
ExecutionKindを取得します。
get_kind in interface ExecutionContextOperationspublic ExecutionKind getKind()
public ReturnCode_t add_component(LightweightRTObject comp)
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.
add_component in interface ExecutionContextOperationscomp - 
   The target RT-Component for addpublic ReturnCode_t addComponent(LightweightRTObject comp)
public ReturnCode_t bindComponent(RTObject_impl rtc)
Bind the component.
bindComponent in interface ExecutionContextBasertc - 
  RT-Component's instancespublic ReturnCode_t remove_component(LightweightRTObject comp)
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.
remove_component in interface ExecutionContextOperationscomp - 
   The target RT-Component for deletepublic ReturnCode_t removeComponent(LightweightRTObject comp)
public ExecutionContextProfile get_profile()
ExecutionContextProfile を取得します。
get_profile in interface ExecutionContextServiceOperationspublic static void PeriodicExecutionContextInit(Manager manager)
このExecutionContextを生成するFactoryクラスを ExecutionContext用ObjectManagerに登録します。
manager - Managerオブジェクトpublic ExecutionContextBase creator_()
creator_ in interface ObjectCreator<ExecutionContextBase>public void destructor_(java.lang.Object obj)
destructor_ in interface ObjectDestructorobj - 
   The target instances for destructionpublic ExecutionContextBase ECNewFunc()
ExecutionContextのインスタンスを取得します。
ECNewFunc in interface ECNewDeleteFuncpublic java.lang.Object ECDeleteFunc(ExecutionContextBase comp)
ExecutionContextのインスタンスを破棄します。
ECDeleteFunc in interface ECNewDeleteFunccomp - 破棄対象ExecutionContextインスタンスpublic void init(Properties props)
init in interface ExecutionContextBasepublic ExecutionContextService getObjRef()
Get the reference to the CORBA object as ExecutioncontextService of this object.
getObjRef in interface ExecutionContextBasepublic ReturnCode_t setRate(double rate)
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.
setRate in interface ExecutionContextBaserate - 
   Execution cycle(Unit:Hz)public double getRate()
This operation shall return the rate (in hertz) at which its Active participating RTCs are being invoked.
getRate in interface ExecutionContextBasepublic final java.lang.String getKindString(ExecutionKind kind)
This function converts enumeration (PERIODIC, EVENT_DRIVEN, OTHER) defined in RTC::ExecutionKind to string.
getKindString in interface ExecutionContextBasekind - 
   ExecutionKindpublic ReturnCode_t setKind(ExecutionKind kind)
This operation sets the kind of the execution context.
setKind in interface ExecutionContextBasekind - 
   kind ExecutionKindpublic ReturnCode_t setOwner(LightweightRTObject comp)
This function sets an RT-Component to be owner of the execution context.
setOwner in interface ExecutionContextBasecomp - 
   an owner RT-Component of this execution contextpublic RTObject getOwner()
This function returns a reference of the owner RT-Component of this execution context
getOwner in interface ExecutionContextBasepublic RTObject[] getComponentList()
This function returns a list of participant RTC of the execution context.
getComponentList in interface ExecutionContextBasepublic void setProperties(Properties props)
This function sets ExecutionContextProfile::properties by Properties.
setProperties in interface ExecutionContextBaseprops - 
   Properties to be set to ExecutionContextProfile::properties.public Properties getProperties()
This function sets ExecutionContextProfile::properties by Properties.
getProperties in interface ExecutionContextBasepublic ExecutionContextProfile getProfile()
This function gets ExecutionContextProfile.
getProfile in interface ExecutionContextBasepublic boolean setTimeout(Properties props, java.lang.String key, TimeValue timevalue)
ExecutionContextBasesetTimeout in interface ExecutionContextBaseprops - 
   Properties to be set to ExecutionContextProfile::properties.public boolean setExecutionRate(Properties props)
ExecutionContextBasesetExecutionRate in interface ExecutionContextBaseprops - 
   Properties to be set to ExecutionContextProfile::properties.public boolean setTransitionMode(Properties props, java.lang.String key, ExecutionContextBase.transitionModeHolder tmhldr)
ExecutionContextBasesetTransitionMode in interface ExecutionContextBaseprops - 
   Properties to be set to ExecutionContextProfile::properties.public boolean isAllCurrentState(LifeCycleState state)
isAllCurrentState in interface ExecutionContextBasepublic boolean isAllNextState(LifeCycleState state)
isAllNextState in interface ExecutionContextBasepublic boolean isOneOfCurrentState(LifeCycleState state)
isOneOfCurrentState in interface ExecutionContextBasepublic boolean isOneOfNextState(LifeCycleState state)
isOneOfNextState in interface ExecutionContextBasepublic void invokeWorker()
invokeWorker in interface ExecutionContextBasepublic void invokeWorkerPreDo()
invokeWorkerPreDo in interface ExecutionContextBasepublic void invokeWorkerDo()
invokeWorkerDo in interface ExecutionContextBasepublic void invokeWorkerPostDo()
invokeWorkerPostDo in interface ExecutionContextBasepublic void setCpuAffinity(Properties props)