OpenRTM-aist  1.2.1
クラス | 公開メンバ関数 | 限定公開メンバ関数 | 全メンバ一覧
RTC::ExtTrigExecutionContext クラス

ステップ実行が可能な ExecutionContext クラス [詳解]

#include <ExtTrigExecutionContext.h>

RTC::ExtTrigExecutionContext の継承関係図
Inheritance graph
[凡例]
RTC::ExtTrigExecutionContext 連携図
Collaboration graph
[凡例]

公開メンバ関数

 ExtTrigExecutionContext ()
 コンストラクタ [詳解]
 
virtual ~ExtTrigExecutionContext (void)
 デストラクタ [詳解]
 
virtual int open (void *args)
 ExecutionContext用アクティビティスレッドを生成する [詳解]
 
virtual int svc (void)
 各 Component の処理を呼び出す。 [詳解]
 
virtual int close (unsigned long flags)
 ExecutionContext 用のスレッド実行関数 [詳解]
 
virtual void tick () throw (CORBA::SystemException)
 処理を1ステップ進める [詳解]
 
virtual CORBA::Boolean is_running (void) throw (CORBA::SystemException)
 ExecutionContext 実行状態確認関数 [詳解]
 
virtual RTC::ReturnCode_t start (void) throw (CORBA::SystemException)
 ExecutionContext の実行を開始 [詳解]
 
virtual RTC::ReturnCode_t stop (void) throw (CORBA::SystemException)
 ExecutionContext の実行を停止 [詳解]
 
virtual CORBA::Double get_rate (void) throw (CORBA::SystemException)
 ExecutionContext の実行周期(Hz)を取得する [詳解]
 
virtual RTC::ReturnCode_t set_rate (CORBA::Double rate) throw (CORBA::SystemException)
 ExecutionContext の実行周期(Hz)を設定する [詳解]
 
virtual RTC::ReturnCode_t activate_component (RTC::LightweightRTObject_ptr comp) throw (CORBA::SystemException)
 RTコンポーネントをアクティブ化する [詳解]
 
virtual RTC::ReturnCode_t deactivate_component (RTC::LightweightRTObject_ptr comp) throw (CORBA::SystemException)
 RTコンポーネントを非アクティブ化する [詳解]
 
virtual RTC::ReturnCode_t reset_component (RTC::LightweightRTObject_ptr comp) throw (CORBA::SystemException)
 RTコンポーネントをリセットする [詳解]
 
virtual RTC::LifeCycleState get_component_state (RTC::LightweightRTObject_ptr comp) throw (CORBA::SystemException)
 RTコンポーネントの状態を取得する [詳解]
 
virtual RTC::ExecutionKind get_kind (void) throw (CORBA::SystemException)
 ExecutionKind を取得する [詳解]
 
virtual RTC::ReturnCode_t add_component (RTC::LightweightRTObject_ptr comp) throw (CORBA::SystemException)
 RTコンポーネントを追加する [詳解]
 
virtual RTC::ReturnCode_t remove_component (RTC::LightweightRTObject_ptr comp) throw (CORBA::SystemException)
 RTコンポーネントを参加者リストから削除する [詳解]
 
virtual RTC::ExecutionContextProfile * get_profile (void) throw (CORBA::SystemException)
 ExecutionContextProfile を取得する [詳解]
 
- 基底クラス RTC::ExecutionContextBase に属する継承公開メンバ関数
 ExecutionContextBase (const char *name)
 仮想デストラクタ [詳解]
 
virtual ~ExecutionContextBase (void)
 仮想デストラクタ [詳解]
 
virtual void init (coil::Properties &props)
 ExecutionContextの初期化を行う [詳解]
 
virtual RTC::ReturnCode_t bindComponent (RTC::RTObject_impl *rtc)
 コンポーネントをバインドする。 [詳解]
 
CORBA::Boolean isRunning ()
 ExecutionContext 実行状態確認関数 [詳解]
 
RTC::ReturnCode_t start (void)
 ExecutionContext の実行を開始 [詳解]
 
double getRate (void) const
 ExecutionContext の実行周期(Hz)を取得する [詳解]
 
coil::TimeValue getPeriod (void) const
 
RTC::ReturnCode_t setRate (double rate)
 ExecutionContext の実行周期(Hz)を設定する [詳解]
 
RTC::ReturnCode_t addComponent (RTC::LightweightRTObject_ptr comp)
 RTコンポーネントを追加する [詳解]
 
RTC::ReturnCode_t removeComponent (RTC::LightweightRTObject_ptr comp)
 RTコンポーネントを参加者リストから削除する [詳解]
 
RTC::ReturnCode_t activateComponent (RTC::LightweightRTObject_ptr comp)
 RTコンポーネントをアクティブ化する [詳解]
 
RTC::ReturnCode_t deactivateComponent (RTC::LightweightRTObject_ptr comp)
 RTコンポーネントを非アクティブ化する [詳解]
 
RTC::ReturnCode_t resetComponent (RTC::LightweightRTObject_ptr comp)
 RTコンポーネントをリセットする [詳解]
 
RTC::LifeCycleState getComponentState (RTC::LightweightRTObject_ptr comp)
 RTコンポーネントの状態を取得する [詳解]
 
const char * getStateString (RTC::LifeCycleState state)
 
RTC::ExecutionKind getKind (void) const
 ExecutionKind を取得する [詳解]
 
RTC::ExecutionContextProfile * getProfile (void)
 Profileを取得する [詳解]
 
void setObjRef (RTC::ExecutionContextService_ptr ec_ptr)
 CORBA オブジェクト参照の取得 [詳解]
 
RTC::ExecutionContextService_ptr getObjRef (void) const
 CORBA オブジェクト参照の取得 [詳解]
 
const char * getKindString (RTC::ExecutionKind kind) const
 ExecutionKind を文字列化する [詳解]
 
RTC::ReturnCode_t setKind (RTC::ExecutionKind kind)
 ExecutionKind を設定する [詳解]
 
RTC::ReturnCode_t setOwner (RTC::LightweightRTObject_ptr comp)
 Ownerコンポーネントをセットする。 [詳解]
 
const RTC::RTObject_ptr getOwner () const
 Ownerコンポーネントの参照を取得する [詳解]
 
const RTC::RTCList & getComponentList () const
 RTコンポーネントの参加者リストを取得する [詳解]
 
void setProperties (coil::Properties &props)
 Propertiesをセットする [詳解]
 
const coil::Properties getProperties () const
 Propertiesを取得する [詳解]
 
const RTC::ExecutionContextProfile & getProfile (void) const
 Profileを取得する [詳解]
 
bool isAllCurrentState (RTC::LifeCycleState state)
 
bool isAllNextState (RTC::LifeCycleState state)
 
bool isOneOfCurrentState (RTC::LifeCycleState state)
 
bool isOneOfNextState (RTC::LifeCycleState state)
 
void invokeWorker ()
 
void invokeWorkerPreDo ()
 
void invokeWorkerDo ()
 
void invokeWorkerPostDo ()
 
- 基底クラス coil::Task に属する継承公開メンバ関数
 Task ()
 コンストラクタ [詳解]
 
virtual ~Task ()
 デストラクタ [詳解]
 
virtual void activate ()
 スレッドを生成する [詳解]
 
virtual int wait (void)
 スレッド終了を待つ [詳解]
 
virtual int suspend (void)
 タスク実行を中断する [詳解]
 
virtual int resume (void)
 中断されているタスクを再開する [詳解]
 
virtual void reset ()
 タスク数リセット [詳解]
 
virtual void finalize ()
 タスク実行を終了する [詳解]
 

限定公開メンバ関数

virtual RTC::ReturnCode_t onStarted ()
 onStarted() template function [詳解]
 
virtual RTC::ReturnCode_t onAddedComponent (RTC::LightweightRTObject_ptr rtobj)
 onAddedComponent() template function [詳解]
 
virtual RTC::ReturnCode_t onRemovedComponent (RTC::LightweightRTObject_ptr rtobj)
 onRemovedComponent() template function [詳解]
 
virtual RTC::ReturnCode_t onWaitingActivated (RTC_impl::RTObjectStateMachine *comp, long int count)
 onWaitingActivated() template function [詳解]
 
virtual RTC::ReturnCode_t onWaitingDeactivated (RTC_impl::RTObjectStateMachine *comp, long int count)
 onWaitingDeactivated() template function [詳解]
 
virtual RTC::ReturnCode_t onWaitingReset (RTC_impl::RTObjectStateMachine *comp, long int count)
 onWaitingReset() template function [詳解]
 
- 基底クラス RTC::ExecutionContextBase に属する継承限定公開メンバ関数
virtual bool onIsRunning (bool running)
 
virtual RTC::ReturnCode_t onStarting ()
 
virtual RTC::ReturnCode_t onStopping ()
 
virtual RTC::ReturnCode_t onStopped ()
 
virtual double onGetRate (double rate) const
 
virtual double onSettingRate (double rate)
 
virtual RTC::ReturnCode_t onSetRate (double rate)
 
virtual RTC::ReturnCode_t onAddingComponent (RTC::LightweightRTObject_ptr rtobj)
 
virtual RTC::ReturnCode_t onRemovingComponent (RTC::LightweightRTObject_ptr rtobj)
 
virtual RTC::ReturnCode_t onActivating (RTC::LightweightRTObject_ptr comp)
 
virtual RTC::ReturnCode_t onActivated (RTC_impl::RTObjectStateMachine *comp, long int count)
 
virtual RTC::ReturnCode_t onDeactivating (RTC::LightweightRTObject_ptr comp)
 
virtual RTC::ReturnCode_t onDeactivated (RTC_impl::RTObjectStateMachine *comp, long int count)
 
virtual RTC::ReturnCode_t onResetting (RTC::LightweightRTObject_ptr comp)
 
virtual RTC::ReturnCode_t onReset (RTC_impl::RTObjectStateMachine *comp, long int count)
 
virtual RTC::LifeCycleState onGetComponentState (RTC::LifeCycleState state)
 
virtual RTC::ExecutionKind onGetKind (RTC::ExecutionKind kind) const
 
virtual RTC::ExecutionContextProfile * onGetProfile (RTC::ExecutionContextProfile *&profile)
 

その他の継承メンバ

- 基底クラス coil::Task に属する継承静的公開メンバ関数
static void * svc_run (void *args=0)
 スレッド実行を開始する [詳解]
 
- 基底クラス RTC::ExecutionContextBase に属する継承限定公開変数類
RTC::Logger rtclog
 
RTC_impl::ExecutionContextWorker m_worker
 
RTC_impl::ExecutionContextProfile m_profile
 
coil::TimeValue m_activationTimeout
 
coil::TimeValue m_deactivationTimeout
 
coil::TimeValue m_resetTimeout
 
bool m_syncActivation
 
bool m_syncDeactivation
 
bool m_syncReset
 

詳解

ステップ実行が可能な ExecutionContext クラス

1周期毎の実行が可能なPeriodic Sampled Data Processing(周期実行用) ExecutionContextクラス。 外部からのメソッド呼びだしによって時間が1周期づつ進む。

から
0.4.0

構築子と解体子

RTC::ExtTrigExecutionContext::ExtTrigExecutionContext ( )

コンストラクタ

コンストラクタ

virtual RTC::ExtTrigExecutionContext::~ExtTrigExecutionContext ( void  )
virtual

デストラクタ

デストラクタ

関数詳解

virtual RTC::ReturnCode_t RTC::ExtTrigExecutionContext::activate_component ( RTC::LightweightRTObject_ptr  comp)
throw (CORBA::SystemException
)
virtual

RTコンポーネントをアクティブ化する

Inactive 状態にあるRTコンポーネントをActive に遷移させ、アクティ ブ化する。この操作が呼ばれた結果、on_activate が呼び出される。指 定したRTコンポーネントが参加者リストに含まれない場合は、 BAD_PARAMETER が返される。指定したRTコンポーネントの状態が Inactive 以外の場合は、PRECONDITION_NOT_MET が返される。

引数
compアクティブ化対象RTコンポーネント
戻り値
ReturnCode_t 型のリターンコード
virtual RTC::ReturnCode_t RTC::ExtTrigExecutionContext::add_component ( RTC::LightweightRTObject_ptr  comp)
throw (CORBA::SystemException
)
virtual

RTコンポーネントを追加する

指定したRTコンポーネントを参加者リストに追加する。追加されたRTコ ンポーネントは attach_context が呼ばれ、Inactive 状態に遷移する。 指定されたRTコンポーネントがnullの場合は、BAD_PARAMETER が返され る。指定されたRTコンポーネントが DataFlowComponent 以外の場合は、 BAD_PARAMETER が返される。

引数
comp追加対象RTコンポーネント
戻り値
ReturnCode_t 型のリターンコード
virtual int RTC::ExtTrigExecutionContext::close ( unsigned long  flags)
virtual

ExecutionContext 用のスレッド実行関数

ExecutionContext 用のスレッド終了時に呼ばれる。コンポーネントオ ブジェクトの非アクティブ化、マネージャへの通知を行う。これは coil::Task サービスクラスメソッドのオーバーライド。

引数
flags終了処理フラグ
戻り値
終了処理結果

coil::Taskを再実装しています。

virtual RTC::ReturnCode_t RTC::ExtTrigExecutionContext::deactivate_component ( RTC::LightweightRTObject_ptr  comp)
throw (CORBA::SystemException
)
virtual

RTコンポーネントを非アクティブ化する

Inactive 状態にあるRTコンポーネントを非アクティブ化し、Inactive に遷移させる。この操作が呼ばれた結果、on_deactivate が呼び出され る。指定したRTコンポーネントが参加者リストに含まれない場合は、 BAD_PARAMETER が返される。指定したRTコンポーネントの状態が Active 以外の場合は、PRECONDITION_NOT_MET が返される。

引数
comp非アクティブ化対象RTコンポーネント
戻り値
ReturnCode_t 型のリターンコード
virtual RTC::LifeCycleState RTC::ExtTrigExecutionContext::get_component_state ( RTC::LightweightRTObject_ptr  comp)
throw (CORBA::SystemException
)
virtual

RTコンポーネントの状態を取得する

指定したRTコンポーネントの状態(LifeCycleState)を取得する。指定し たRTコンポーネントが参加者リストに含まれない場合は、 UNKNOWN_STATE が返される。

引数
comp状態取得対象RTコンポーネント
戻り値
現在の状態(LifeCycleState)
virtual RTC::ExecutionKind RTC::ExtTrigExecutionContext::get_kind ( void  )
throw (CORBA::SystemException
)
virtual

ExecutionKind を取得する

本 ExecutionContext の ExecutionKind を取得する

戻り値
ExecutionKind
virtual RTC::ExecutionContextProfile* RTC::ExtTrigExecutionContext::get_profile ( void  )
throw (CORBA::SystemException
)
virtual

ExecutionContextProfile を取得する

本 ExecutionContext のプロファイルを取得する。

戻り値
ExecutionContextProfile
virtual CORBA::Double RTC::ExtTrigExecutionContext::get_rate ( void  )
throw (CORBA::SystemException
)
virtual

ExecutionContext の実行周期(Hz)を取得する

Active 状態にてRTコンポーネントが実行される周期(単位:Hz)を取得す る。

戻り値
処理周期(単位:Hz)
virtual CORBA::Boolean RTC::ExtTrigExecutionContext::is_running ( void  )
throw (CORBA::SystemException
)
virtual

ExecutionContext 実行状態確認関数

この操作は ExecutionContext が Runnning 状態の場合に true を返す。 Executioncontext が Running の間、当該 Executioncontext に参加し ている全てのアクティブRTコンポーネントが、ExecutionContext の実 行種類に応じて実行される。

戻り値
状態確認関数(動作中:true、停止中:false)
virtual RTC::ReturnCode_t RTC::ExtTrigExecutionContext::onAddedComponent ( RTC::LightweightRTObject_ptr  rtobj)
protectedvirtual

onAddedComponent() template function

RTC::ExecutionContextBaseを再実装しています。

virtual RTC::ReturnCode_t RTC::ExtTrigExecutionContext::onRemovedComponent ( RTC::LightweightRTObject_ptr  rtobj)
protectedvirtual

onRemovedComponent() template function

RTC::ExecutionContextBaseを再実装しています。

virtual RTC::ReturnCode_t RTC::ExtTrigExecutionContext::onStarted ( )
protectedvirtual

onStarted() template function

RTC::ExecutionContextBaseを再実装しています。

virtual RTC::ReturnCode_t RTC::ExtTrigExecutionContext::onWaitingActivated ( RTC_impl::RTObjectStateMachine comp,
long int  count 
)
protectedvirtual

onWaitingActivated() template function

RTC::ExecutionContextBaseを再実装しています。

virtual RTC::ReturnCode_t RTC::ExtTrigExecutionContext::onWaitingDeactivated ( RTC_impl::RTObjectStateMachine comp,
long int  count 
)
protectedvirtual

onWaitingDeactivated() template function

RTC::ExecutionContextBaseを再実装しています。

virtual RTC::ReturnCode_t RTC::ExtTrigExecutionContext::onWaitingReset ( RTC_impl::RTObjectStateMachine comp,
long int  count 
)
protectedvirtual

onWaitingReset() template function

RTC::ExecutionContextBaseを再実装しています。

virtual int RTC::ExtTrigExecutionContext::open ( void *  args)
virtual

ExecutionContext用アクティビティスレッドを生成する

Executioncontext 用の内部アクティビティスレッドを生成し起動する。 これは coil::Task サービスクラスメソッドのオーバーライド。

引数
args通常は0
戻り値
生成処理実行結果

coil::Taskを再実装しています。

virtual RTC::ReturnCode_t RTC::ExtTrigExecutionContext::remove_component ( RTC::LightweightRTObject_ptr  comp)
throw (CORBA::SystemException
)
virtual

RTコンポーネントを参加者リストから削除する

指定したRTコンポーネントを参加者リストから削除する。削除された RTコンポーネントは detach_context が呼ばれる。指定されたRTコンポー ネントが参加者リストに登録されていない場合は、BAD_PARAMETER が返 される。

引数
comp削除対象RTコンポーネント
戻り値
ReturnCode_t 型のリターンコード
virtual RTC::ReturnCode_t RTC::ExtTrigExecutionContext::reset_component ( RTC::LightweightRTObject_ptr  comp)
throw (CORBA::SystemException
)
virtual

RTコンポーネントをリセットする

Error 状態のRTコンポーネントの復帰を試みる。この操作が呼ばれた結 果、on_reset が呼び出される。指定したRTコンポーネントが参加者リ ストに含まれない場合は、BAD_PARAMETER が返される。指定したRTコン ポーネントの状態が Error 以外の場合は、PRECONDITION_NOT_MET が返 される。

引数
compリセット対象RTコンポーネント
戻り値
ReturnCode_t 型のリターンコード
virtual RTC::ReturnCode_t RTC::ExtTrigExecutionContext::set_rate ( CORBA::Double  rate)
throw (CORBA::SystemException
)
virtual

ExecutionContext の実行周期(Hz)を設定する

Active 状態にてRTコンポーネントが実行される周期(単位:Hz)を設定す る。実行周期の変更は、DataFlowComponentAction の on_rate_changed によって各RTコンポーネントに伝達される。

引数
rate処理周期(単位:Hz)
戻り値
ReturnCode_t 型のリターンコード
virtual RTC::ReturnCode_t RTC::ExtTrigExecutionContext::start ( void  )
throw (CORBA::SystemException
)
virtual

ExecutionContext の実行を開始

ExecutionContext の実行状態を Runnning とするためのリクエストを 発行する。ExecutionContext の状態が遷移すると ComponentAction::on_startup が呼び出される。参加しているRTコンポー ネントが、初期化されるまで ExecutionContext を開始することはでき ない。ExecutionContext は複数回開始/停止を繰り返すことができる。

戻り値
ReturnCode_t 型のリターンコード
virtual RTC::ReturnCode_t RTC::ExtTrigExecutionContext::stop ( void  )
throw (CORBA::SystemException
)
virtual

ExecutionContext の実行を停止

ExecutionContext の状態を Stopped とするためのリクエストを発行す る。遷移が発生した場合は、ComponentAction::on_shutdown が呼び出 される。参加しているRTコンポーネントが終了する前に ExecutionContext を停止する必要がある。ExecutionContext は複数回 開始/停止を繰り返すことができる。

戻り値
ReturnCode_t 型のリターンコード

RTC::ExecutionContextBaseを再実装しています。

virtual int RTC::ExtTrigExecutionContext::svc ( void  )
virtual

各 Component の処理を呼び出す。

ExecutionContext に attach されている各 Component の処理を呼び出す。 全 Component の処理を呼び出した後、次の呼出が発生するまで休止する。

戻り値
処理結果

coil::Taskを再実装しています。

virtual void RTC::ExtTrigExecutionContext::tick ( )
throw (CORBA::SystemException
)
virtual

処理を1ステップ進める

ExecutionContextの処理を1周期分進める。


このクラス詳解は次のファイルから抽出されました: