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, _this
TimeValue 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 ExecutionContextBase
ref
- CORBAオブジェクト参照public ExecutionContextService getRef()
本オブジェクトのExecutionContextServiceとしてのCORBAオブジェクト参照を設定します。
public int open()
ExecutionContext用のスレッドを生成します。
public int svc()
ExecutionContext用のスレッドの実行関数です。 登録されたコンポーネントの処理を呼び出します。
public void run()
スレッド実行関数です。
run
in interface java.lang.Runnable
public int close(long flags)
スレッド終了関数です。
public boolean is_running()
ExecutionContextが実行中かどうかを取得します。
is_running
in interface ExecutionContextOperations
public boolean isRunning()
public boolean onIsRunning(boolean running)
public ReturnCode_t onStarting()
public ReturnCode_t onStarted()
onStarted
in interface ExecutionContextBase
public ReturnCode_t onStopping()
onStopping
in interface ExecutionContextBase
public ReturnCode_t onStopped()
onStopped
in interface ExecutionContextBase
public double onGetRate(double rate)
onGetRate
in interface ExecutionContextBase
public double onSettingRate(double rate)
onSettingRate
in interface ExecutionContextBase
public ReturnCode_t onSetRate(double rate)
onSetRate
in interface ExecutionContextBase
public ReturnCode_t onAddingComponent(LightweightRTObject rtobj)
onAddingComponent
in interface ExecutionContextBase
public ReturnCode_t onAddedComponent(LightweightRTObject rtobj)
onAddedComponent
in interface ExecutionContextBase
public ReturnCode_t onRemovingComponent(LightweightRTObject rtobj)
onRemovingComponent
in interface ExecutionContextBase
public ReturnCode_t onRemovedComponent(LightweightRTObject rtobj)
onRemovedComponent
in interface ExecutionContextBase
public ReturnCode_t onActivating(LightweightRTObject comp)
onActivating
in interface ExecutionContextBase
public ReturnCode_t onActivated(RTObjectStateMachine comp, long count)
onActivated
in interface ExecutionContextBase
public ReturnCode_t onDeactivating(LightweightRTObject comp)
onDeactivating
in interface ExecutionContextBase
public ReturnCode_t onDeactivated(RTObjectStateMachine comp, long count)
onDeactivated
in interface ExecutionContextBase
public ReturnCode_t onResetting(LightweightRTObject comp)
onResetting
in interface ExecutionContextBase
public ReturnCode_t onReset(RTObjectStateMachine comp, long count)
onReset
in interface ExecutionContextBase
public boolean threadRunning()
public LifeCycleState onGetComponentState(LifeCycleState state)
onGetComponentState
in interface ExecutionContextBase
public ExecutionKind onGetKind(ExecutionKind kind)
onGetKind
in interface ExecutionContextBase
public ExecutionContextProfile onGetProfile(ExecutionContextProfile profile)
onGetProfile
in interface ExecutionContextBase
public ReturnCode_t onWaitingActivated(RTObjectStateMachine comp, long count)
onWaitingActivated
in interface ExecutionContextBase
public ReturnCode_t onWaitingDeactivated(RTObjectStateMachine comp, long count)
ExecutionContextBase
onWaitingDeactivated
in interface ExecutionContextBase
public ReturnCode_t onWaitingReset(RTObjectStateMachine comp, long count)
ExecutionContextBase
onWaitingReset
in interface ExecutionContextBase
public ReturnCode_t start()
ExecutionContext をスタートします。
start
in interface ExecutionContextOperations
public ReturnCode_t stop()
ExecutionContext をストップします。
stop
in interface ExecutionContextOperations
public double get_rate()
ExecutionContextの実行周期(Hz)を取得します。
get_rate
in interface ExecutionContextOperations
public TimeValue getPeriod()
public ReturnCode_t set_rate(double rate)
ExecutionContextの実行周期(Hz)を設定します。
set_rate
in interface ExecutionContextOperations
rate
- 実行周期(Hz)public ReturnCode_t activate_component(LightweightRTObject comp)
コンポーネントをアクティブ化します。
activate_component
in interface ExecutionContextOperations
comp
- アクティブ化対象コンポーネントpublic ReturnCode_t activateComponent(LightweightRTObject comp)
public ReturnCode_t waitForActivated(RTObjectStateMachine rtobj)
public ReturnCode_t deactivate_component(LightweightRTObject comp)
コンポーネントを非アクティブ化します。
deactivate_component
in interface ExecutionContextOperations
comp
- 非アクティブ化対象コンポーネントpublic ReturnCode_t deactivateComponent(LightweightRTObject comp)
public ReturnCode_t waitForDeactivated(RTObjectStateMachine rtobj)
public ReturnCode_t reset_component(LightweightRTObject comp)
コンポーネントをリセットします。
reset_component
in interface ExecutionContextOperations
comp
- リセット対象コンポーネントpublic ReturnCode_t resetComponent(LightweightRTObject comp)
public ReturnCode_t waitForReset(RTObjectStateMachine rtobj)
public LifeCycleState get_component_state(LightweightRTObject comp)
コンポーネントの状態を取得します。
get_component_state
in interface ExecutionContextOperations
comp
- 状態取得対象コンポーネントpublic LifeCycleState getComponentState(LightweightRTObject comp)
public final java.lang.String getStateString(LifeCycleState state)
public ExecutionKind get_kind()
ExecutionKindを取得します。
get_kind
in interface ExecutionContextOperations
public 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 ExecutionContextOperations
comp
-
The target RT-Component for addpublic ReturnCode_t addComponent(LightweightRTObject comp)
public ReturnCode_t bindComponent(RTObject_impl rtc)
Bind the component.
bindComponent
in interface ExecutionContextBase
rtc
-
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 ExecutionContextOperations
comp
-
The target RT-Component for deletepublic ReturnCode_t removeComponent(LightweightRTObject comp)
public ExecutionContextProfile get_profile()
ExecutionContextProfile を取得します。
get_profile
in interface ExecutionContextServiceOperations
public 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 ObjectDestructor
obj
-
The target instances for destructionpublic ExecutionContextBase ECNewFunc()
ExecutionContextのインスタンスを取得します。
ECNewFunc
in interface ECNewDeleteFunc
public java.lang.Object ECDeleteFunc(ExecutionContextBase comp)
ExecutionContextのインスタンスを破棄します。
ECDeleteFunc
in interface ECNewDeleteFunc
comp
- 破棄対象ExecutionContextインスタンスpublic void init(Properties props)
init
in interface ExecutionContextBase
public ExecutionContextService getObjRef()
Get the reference to the CORBA object as ExecutioncontextService of this object.
getObjRef
in interface ExecutionContextBase
public 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 ExecutionContextBase
rate
-
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 ExecutionContextBase
public final java.lang.String getKindString(ExecutionKind kind)
This function converts enumeration (PERIODIC, EVENT_DRIVEN, OTHER) defined in RTC::ExecutionKind to string.
getKindString
in interface ExecutionContextBase
kind
-
ExecutionKindpublic ReturnCode_t setKind(ExecutionKind kind)
This operation sets the kind of the execution context.
setKind
in interface ExecutionContextBase
kind
-
kind ExecutionKindpublic ReturnCode_t setOwner(LightweightRTObject comp)
This function sets an RT-Component to be owner of the execution context.
setOwner
in interface ExecutionContextBase
comp
-
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 ExecutionContextBase
public RTObject[] getComponentList()
This function returns a list of participant RTC of the execution context.
getComponentList
in interface ExecutionContextBase
public void setProperties(Properties props)
This function sets ExecutionContextProfile::properties by Properties.
setProperties
in interface ExecutionContextBase
props
-
Properties to be set to ExecutionContextProfile::properties.public Properties getProperties()
This function sets ExecutionContextProfile::properties by Properties.
getProperties
in interface ExecutionContextBase
public ExecutionContextProfile getProfile()
This function gets ExecutionContextProfile.
getProfile
in interface ExecutionContextBase
public boolean setTimeout(Properties props, java.lang.String key, TimeValue timevalue)
ExecutionContextBase
setTimeout
in interface ExecutionContextBase
props
-
Properties to be set to ExecutionContextProfile::properties.public boolean setExecutionRate(Properties props)
ExecutionContextBase
setExecutionRate
in interface ExecutionContextBase
props
-
Properties to be set to ExecutionContextProfile::properties.public boolean setTransitionMode(Properties props, java.lang.String key, ExecutionContextBase.transitionModeHolder tmhldr)
ExecutionContextBase
setTransitionMode
in interface ExecutionContextBase
props
-
Properties to be set to ExecutionContextProfile::properties.public boolean isAllCurrentState(LifeCycleState state)
isAllCurrentState
in interface ExecutionContextBase
public boolean isAllNextState(LifeCycleState state)
isAllNextState
in interface ExecutionContextBase
public boolean isOneOfCurrentState(LifeCycleState state)
isOneOfCurrentState
in interface ExecutionContextBase
public boolean isOneOfNextState(LifeCycleState state)
isOneOfNextState
in interface ExecutionContextBase
public void invokeWorker()
invokeWorker
in interface ExecutionContextBase
public void invokeWorkerPreDo()
invokeWorkerPreDo
in interface ExecutionContextBase
public void invokeWorkerDo()
invokeWorkerDo
in interface ExecutionContextBase
public void invokeWorkerPostDo()
invokeWorkerPostDo
in interface ExecutionContextBase
public void setCpuAffinity(Properties props)