public class ExtTrigExecutionContext extends ExtTrigExecutionContextServicePOA implements java.lang.Runnable, ObjectCreator<ExecutionContextBase>, ObjectDestructor, ExecutionContextBase
ExecutionContext class that can execute every one cycle for Periodic Sampled Data Processing. Time(Tick) advances one cycle by invoking method externally.
| Modifier and Type | Class and Description |
|---|---|
protected class |
ExtTrigExecutionContext.Comp
ExecutionContextにattachされたコンポーネントのメソッド呼出用クラスです。
|
protected class |
ExtTrigExecutionContext.DFP
DataFlowComponentのAction定義用抽象クラスです。
|
protected class |
ExtTrigExecutionContext.DFPBase
DataFlowComponentのAction定義用抽象クラスです。
|
protected class |
ExtTrigExecutionContext.find_comp
管理対象コンポーネント検索用ヘルパークラスです。
|
ExecutionContextBase.transitionModeHolder| Modifier and Type | Field and Description |
|---|---|
(package private) TimeValue |
m_activationTimeout |
protected java.util.ArrayList<ExtTrigExecutionContext.Comp> |
m_comps
ExecutionContextにatttachされているコンポーネントのリストです。
|
(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 |
protected boolean |
m_running
ExecutionContextの実行状態です。
|
(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 |
protected Logbuf |
rtcout
Logging用フォーマットオブジェクト
|
| Constructor and Description |
|---|
ExtTrigExecutionContext()
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.ArrayList<ExtTrigExecutionContext.Comp> m_comps
ExecutionContextにatttachされているコンポーネントのリストです。
protected boolean m_running
ExecutionContextの実行状態です。
protected ExecutionContextWorker m_worker
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 Logbuf rtcout
Logging用フォーマットオブジェクト
public ExecutionContextService __this()
__this()
public void tick()
throws org.omg.CORBA.SystemException
Proceed with tick of ExecutionContext for one period.
tick in interface ExtTrigExecutionContextServiceOperationsorg.omg.CORBA.SystemExceptionpublic int open()
ExecutionContext用のスレッドを生成します。
public int svc()
ExecutionContextにattachされている各Componentの処理を呼び出します。 全Componentの処理を呼び出した後、次のイベントが発生するまで休止します。
public void run()
ExecutionContextを起動します。
run in interface java.lang.Runnablepublic boolean is_running()
This operation shall return true if the context is in the Running state. While the context is Running, all Active RTCs participating in the context shall be executed according to the context’s execution kind.
is_running in interface ExecutionContextOperationspublic boolean isRunning()
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 boolean threadRunning()
public ReturnCode_t onReset(RTObjectStateMachine comp, long count)
onReset in interface ExecutionContextBasepublic 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()
Request that the context enter the Running state. Once the state transition occurs, the ComponentAction::on_startup operation will be invoked. An execution context may not be started until the RT-Components that participate in it have been initialized. An execution context may be started and stopped multiple times.
start in interface ExecutionContextOperationspublic ReturnCode_t stop()
Request that the context enter the Stopped state. Once the transition occurs, the ComponentAction::on_shutdown operation will be invoked. An execution context must be stopped before the RT components that participate in it are finalized. An execution context may be started and stopped multiple times.
stop in interface ExecutionContextOperationspublic double get_rate()
This operation shall return the rate (in hertz) at which its Active participating RTCs are being invoked.
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 resetCcomponent(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 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 ExecutionContextBase creator_()
creator_ in interface ObjectCreator<ExecutionContextBase>public void destructor_(java.lang.Object obj)
destructor_ in interface ObjectDestructorobj -
The target instances for destructionpublic static void ExtTrigExecutionContextInit(Manager manager)
このExecutionContextを生成するFactoryクラスを ExecutionContext用ObjectManagerに登録します。
manager - Managerオブジェクトpublic java.lang.Object ECDeleteFunc(ExecutionContextBase comp)
ExecutionContextのインスタンスを破棄します。
ECDeleteFunc in interface ECNewDeleteFunccomp - 破棄対象ExecutionContextインスタンスpublic ExecutionContextBase ECNewFunc()
ExecutionContextのインスタンスを取得します。
ECNewFunc in interface ECNewDeleteFuncpublic void init(Properties props)
init in interface ExecutionContextBasepublic void setObjRef(ExecutionContextService ref)
Get the reference to the CORBA object as ExecutioncontextService of this object.
setObjRef in interface ExecutionContextBaseref -
The reference to CORBA objectpublic 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 ExecutionContextBase