OpenRTM-aist-Python 2.0.2
OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase クラス

[詳解]

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase の継承関係図
OpenRTM_aist.RTObject.RTObject_impl

公開メンバ関数

 __init__ (self, manager)
 
 initialize (self)
 
 finalize (self)
 
 exit (self)
 
 is_alive (self, exec_context)
 
 get_owned_contexts (self)
 
 get_context (self, ec_id)
 
 get_participating_contexts (self)
 
 get_context_handle (self, cxt)
 
 get_component_profile (self)
 
 get_ports (self)
 
 attach_context (self, exec_context)
 
 detach_context (self, ec_id)
 
 on_initialize (self)
 
 on_finalize (self)
 
 on_startup (self, ec_id)
 
 on_shutdown (self, ec_id)
 
 on_activated (self, ec_id)
 
 on_deactivated (self, ec_id)
 
 on_error (self, ec_id)
 
 on_aborting (self, ec_id)
 
 on_reset (self, ec_id)
 
 on_action (self, ec_id)
 
- 基底クラス OpenRTM_aist.RTObject.RTObject_impl に属する継承公開メンバ関数
 __del__ (self)
 
 onInitialize (self)
 
 onFinalize (self)
 
 onStartup (self, ec_id)
 
 onShutdown (self, ec_id)
 
 onActivated (self, ec_id)
 
 onDeactivated (self, ec_id)
 
 onExecute (self, ec_id)
 
 onAborting (self, ec_id)
 
 onError (self, ec_id)
 
 onReset (self, ec_id)
 
 onStateUpdate (self, ec_id)
 
 onRateChanged (self, ec_id)
 
 onAction (self, ec_id)
 
 get_owned_organizations (self)
 
 get_sdo_id (self)
 
 get_sdo_type (self)
 
 get_device_profile (self)
 
 get_service_profiles (self)
 
 get_service_profile (self, _id)
 
 get_sdo_service (self, _id)
 
 get_configuration (self)
 
 get_monitoring (self)
 
 get_organizations (self)
 
 get_status_list (self)
 
 get_status (self, name)
 
 getInstanceName (self)
 
 setInstanceName (self, instance_name)
 
 getTypeName (self)
 
 getDescription (self)
 
 getVersion (self)
 
 getVendor (self)
 
 getCategory (self)
 
 getNamingNames (self)
 
 setObjRef (self, rtobj)
 
 getObjRef (self)
 
 setProperties (self, prop)
 
 getProperties (self)
 
 bindParameter (self, param_name, var, def_val, trans=None)
 
 getConfigService (self)
 
 updateParameters (self, config_set)
 
 registerPort (self, port)
 
 registerInPort (self, name, inport)
 
 registerOutPort (self, name, outport)
 
 removeInPort (self, port)
 
 removeOutPort (self, port)
 
 deletePort (self, port)
 
 deletePortByName (self, port_name)
 
 getExecutionContext (self, ec_id)
 
 getExecutionRate (self, ec_id)
 
 setExecutionRate (self, ec_id, rate)
 
 isOwnExecutionContext (self, ec_id)
 
 deactivate (self, ec_id)
 
 activate (self, ec_id)
 
 reset (self, ec_id)
 
 addSdoServiceProvider (self, prof, provider)
 
 removeSdoServiceProvider (self, id)
 
 addSdoServiceConsumer (self, prof)
 
 removeSdoServiceConsumer (self, id)
 
 removeSdoServiceConsumerStartThread (self, id)
 
 readAll (self)
 
 writeAll (self)
 
 setReadAll (self, read=True, completion=False)
 
 setWriteAll (self, write=True, completion=False)
 
 finalizePorts (self)
 
 addPreComponentActionListener (self, listener_type, memfunc)
 
 removePreComponentActionListener (self, listener_type, listener)
 
 addPostComponentActionListener (self, listener_type, memfunc)
 
 removePostComponentActionListener (self, listener_type, listener)
 
 addPortActionListener (self, listener_type, memfunc)
 
 removePortActionListener (self, listener_type, listener)
 
 addExecutionContextActionListener (self, listener_type, memfunc)
 
 removeExecutionContextActionListener (self, listener_type, listener)
 
 addPortConnectListener (self, listener_type, memfunc)
 
 removePortConnectListener (self, listener_type, listener)
 
 addPortConnectRetListener (self, listener_type, memfunc)
 
 removePortConnectRetListener (self, listener_type, listener)
 
 addConfigurationParamListener (self, type, memfunc)
 
 removeConfigurationParamListener (self, type, listener)
 
 addConfigurationSetListener (self, listener_type, memfunc)
 
 removeConfigurationSetListener (self, type, listener)
 
 addConfigurationSetNameListener (self, type, memfunc)
 
 removeConfigurationSetNameListener (self, type, listener)
 
 addPreFsmActionListener (self, listener_type, memfunc)
 
 removePreFsmActionListener (self, listener_type, listener)
 
 addPostFsmActionListener (self, listener_type, memfunc)
 
 removePostFsmActionListener (self, listener_type, listener)
 
 addFsmProfileListener (self, listener_type, memfunc)
 
 removeFsmProfileListener (self, listener_type, listener)
 
 addFsmStructureListener (self, listener_type, memfunc)
 
 removeFsmStructureListener (self, listener_type, listener)
 
 shutdown (self)
 
 getPrivateContextOptions (self, ec_args)
 getting individual EC options from RTC's configuration file
 
 getGlobalContextOptions (self, global_ec_props)
 getting global EC options from rtc.conf
 
 getContextOptions (self, ec_args)
 getting EC options
 
 findExistingEC (self, ec_arg)
 fiding existing EC from the factory
 
 createContexts (self, ec_args)
 creating, initializing and binding context
 
 setINSObjRef (self, obj)
 omniINSPOAから取得したオブジェクトを登録
 

詳解

FiniteStateMachineのベースクラス。 ユーザが新たなRTコンポーネントを作成する場合は、このクラスを拡張する。 各RTコンポーネントのベースとなるクラス。}

構築子と解体子

◆ __init__()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.__init__ ( self,
manager )

コンストラクタ

コンストラクタ

引数
self

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

メソッド詳解

◆ attach_context()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.attach_context ( self,
exec_context )

[CORBA interface] ExecutionContextをattachする

指定した ExecutionContext にこの RTC を所属させる。この RTC と関連する ExecutionContext のハンドルを返す。 このオペレーションは、ExecutionContextOperations.add_component が呼ばれた 際に呼び出される。返されたハンドルは他のクライアントで使用することを想定 していない。

引数
self
exec_context所属先 ExecutionContext
戻り値
ExecutionContext ハンドル

UniqueId attach_context(ExecutionContext_ptr exec_context)

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ detach_context()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.detach_context ( self,
ec_id )

[CORBA interface] ExecutionContextをdetachする

指定した ExecutionContext からこの RTC の所属を解除する。 このオペレーションは、ExecutionContextOperations.remove_component が呼ば れた際に呼び出される。返されたハンドルは他のクライアントで使用することを 想定していない。

制約

  • 指定された ExecutionContext に RTC がすでに所属していない場合には、 ReturnCode_t.PRECONDITION_NOT_MET が返される。
  • 指定された ExecutionContext にたしいて対して RTC がActive 状態である場 合には、 ReturnCode_t.PRECONDITION_NOT_MET が返される。
引数
self
ec_id解除対象 ExecutionContextハンドル
戻り値
ReturnCode_t 型のリターンコード

ReturnCode_t detach_context(UniqueId exec_handle)

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ exit()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.exit ( self)

[CORBA interface] RTC がオーナーである ExecutionContext を 停止させ、そのコンテンツと共に終了させる

この RTC がオーナーであるすべての実行コンテキストを停止する。 この RTC が他の実行コンテキストを所有する RTC に属する実行コンテキスト (i.e. 実行コンテキストを所有する RTC はすなわちその実行コンテキストの オーナーである。)に参加している場合、当該 RTC はそれらのコンテキスト上 で非活性化されなければならない。 RTC が実行中のどの ExecutionContext でも Active 状態ではなくなった後、 この RTC とこれに含まれる RTC が終了する。

制約

  • RTC が初期化されていなければ、終了させることはできない。 Created 状態にある RTCexit() を呼び出した場合、 ReturnCode_t.PRECONDITION_NOT_MET で失敗する。
引数
self
戻り値
ReturnCode_t 型のリターンコード

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ finalize()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.finalize ( self)

[CORBA interface] RTC を終了する

このオペレーション呼び出しの結果として ComponentAction.on_finalize() を呼び出す。

制約

  • RTC が ExecutionContext に所属している間は終了されない。この場合は、 まず最初に ExecutionContextOperations.remove_component によって参加を 解除しなければならない。これ以外の場合は、このオペレーション呼び出しは いかなる場合も ReturnCode_t.PRECONDITION_NOT_ME で失敗する。
  • RTC が Created 状態である場合、終了処理は行われない。 この場合、このオペレーション呼び出しはいかなる場合も ReturnCode_t.PRECONDITION_NOT_MET で失敗する。
  • このオペレーションはRTCのミドルウエアから呼ばれることを想定しており、 アプリケーション開発者は直接このオペレーションを呼ぶことは想定 されていない。
引数
self
戻り値
ReturnCode_t 型のリターンコード

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ get_component_profile()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.get_component_profile ( self)

[RTObject CORBA interface] コンポーネントプロファイルを取得する

当該コンポーネントのプロファイル情報を返す。

引数
self
戻り値
コンポーネントプロファイル

virtual ComponentProfile* get_component_profile()

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ get_context()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.get_context ( self,
ec_id )

[CORBA interface] ExecutionContextを取得する

指定したハンドルの ExecutionContext を取得する。 ハンドルから ExecutionContext へのマッピングは、特定の RTC インスタンスに 固有である。ハンドルはこの RTC を attach_context した際に取得できる。

引数
self
ec_id取得対象 ExecutionContext ハンドル
戻り値
ExecutionContext

virtual ExecutionContext_ptr get_context(UniqueId exec_handle)

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ get_context_handle()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.get_context_handle ( self,
cxt )

[CORBA interface] ExecutionContext のハンドルを返す

引数
ExecutionContext実行コンテキスト
戻り値
ExecutionContextHandle

与えられた実行コンテキストに関連付けられたハンドルを返す。

virtual ExecutionContextHandle_t get_context_handle(ExecutionContext_ptr cxt)

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ get_owned_contexts()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.get_owned_contexts ( self)

[CORBA interface] 所有する ExecutionContextListを 取得する

この RTC が所有する ExecutionContext のリストを取得する。

戻り値
ExecutionContext リスト

virtual ExecutionContextList* get_owned_contexts()

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ get_participating_contexts()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.get_participating_contexts ( self)

[CORBA interface] 参加している ExecutionContextList を取得する

この RTC が参加している ExecutionContext のリストを取得する。

戻り値
ExecutionContext リスト

virtual ExecutionContextList* get_participating_contexts()

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ get_ports()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.get_ports ( self)

[RTObject CORBA interface] ポートを取得する

当該コンポーネントが保有するポートの参照を返す。

引数
self
戻り値
ポートリスト

virtual PortServiceList* get_ports()

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ initialize()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.initialize ( self)

[CORBA interface] RTCを初期化する

このオペレーション呼び出しの結果として、ComponentAction.on_initialize コールバック関数が呼ばれる。

制約

  • RTC は Created状態の場合み初期化が行われる。他の状態にいる場合には ReturnCode_t.PRECONDITION_NOT_MET が返され呼び出しは失敗する。
  • このオペレーションは RTC のミドルウエアから呼ばれることを想定しており、 アプリケーション開発者は直接このオペレーションを呼ぶことは想定 されていない。
引数
self
戻り値
ReturnCode_t 型のリターンコード

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ is_alive()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.is_alive ( self,
exec_context )

[CORBA interface] RTC が Alive 状態であるかどうか確認する。

RTC が指定した ExecutionContext に対して Alive状態であるかどうか確認する。 RTC の状態が Active であるか、Inactive であるか、Error であるかは実行中の ExecutionContext に依存する。すなわち、ある ExecutionContext に対しては Active 状態であっても、他の ExecutionContext に対しては Inactive 状態と なる場合もありえる。従って、このオペレーションは指定された ExecutionContext に問い合わせて、この RTC の状態が Active、Inactive、 Error の場合には Alive 状態として返す。

引数
self
exec_context取得対象 ExecutionContext ハンドル
戻り値
Alive 状態確認結果

virtual CORBA.Boolean is_alive(ExecutionContext_ptr exec_context)

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ on_aborting()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.on_aborting ( self,
ec_id )

[ComponentAction CORBA interface] RTC のエラー状態への遷移

RTC が所属する ExecutionContext が Active 状態から Error 状態へ遷移した 場合に呼び出される。 このオペレーションは RTC が Error 状態に遷移した際に一度だけ呼び出される。 このオペレーション呼び出しの結果として onAborting() コールバック関数が 呼び出される。

引数
self
ec_id状態遷移した ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ on_action()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.on_action ( self,
ec_id )

引数
self

◆ on_activated()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.on_activated ( self,
ec_id )

[ComponentAction CORBA interface] RTC の活性化

所属する ExecutionContext から RTC が活性化された際に呼び出される。 このオペレーション呼び出しの結果として onActivated() コールバック関数が 呼び出される。

引数
self
ec_id活性化 ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ on_deactivated()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.on_deactivated ( self,
ec_id )

[ComponentAction CORBA interface] RTC の非活性化

所属する ExecutionContext から RTC が非活性化された際に呼び出される。 このオペレーション呼び出しの結果として onDeactivated() コールバック関数が 呼び出される。

引数
self
ec_id非活性化 ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ on_error()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.on_error ( self,
ec_id )

[ComponentAction CORBA interface] RTC のエラー処理

RTC がエラー状態にいる際に呼び出される。 RTC がエラー状態の場合に、対象となる ExecutionContext のExecutionKind に 応じたタイミングで呼び出される。例えば、

  • ExecutionKind が PERIODIC の場合、本オペレーションは DataFlowComponentAction.on_execute と on_state_update の替わりに、 設定された順番、設定された周期で呼び出される。
  • ExecutionKind が EVENT_DRIVEN の場合、本オペレーションは FsmParticipantAction.on_action が呼ばれた際に、替わりに呼び出される。 このオペレーション呼び出しの結果として onError() コールバック関数が呼び出 される。
引数
self
ec_id対象 ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ on_finalize()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.on_finalize ( self)

[ComponentAction CORBA interface] RTC の終了

RTC が破棄される。 RTC 固有の終了処理はここで実行する。 このオペレーション呼び出しの結果として onFinalize() コールバック関数が 呼び出される。

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

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ on_initialize()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.on_initialize ( self)

[ComponentAction CORBA interface] RTC の初期化

RTC が初期化され、Alive 状態に遷移する。 RTC 固有の初期化処理はここで実行する。 このオペレーション呼び出しの結果として onInitialize() コールバック関数が 呼び出される。

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

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ on_reset()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.on_reset ( self,
ec_id )

[ComponentAction CORBA interface] RTC のリセット

Error 状態にある RTC のリカバリ処理を実行し、Inactive 状態に復帰させる 場合に呼び出される。 RTC のリカバリ処理が成功した場合は Inactive 状態に復帰するが、それ以外の 場合には Error 状態に留まる。 このオペレーション呼び出しの結果として onReset() コールバック関数が呼び 出される。

引数
self
ec_idリセット対象 ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ on_shutdown()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.on_shutdown ( self,
ec_id )

[ComponentAction CORBA interface] RTC の停止

RTC が所属する ExecutionContext が Running 状態から Stopped 状態へ遷移 した場合に呼び出される。 このオペレーション呼び出しの結果として onShutdown() コールバック関数が 呼び出される。

引数
self
ec_id状態遷移した ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード

OpenRTM_aist.RTObject.RTObject_implを再実装しています。

◆ on_startup()

OpenRTM_aist.FiniteStateMachineComponentBase.FiniteStateMachineComponentBase.on_startup ( self,
ec_id )

[ComponentAction CORBA interface] RTC の開始

RTC が所属する ExecutionContext が Stopped 状態から Running 状態へ遷移 した場合に呼び出される。 このオペレーション呼び出しの結果として onStartup() コールバック関数が 呼び出される。

引数
self
ec_id状態遷移した ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード

OpenRTM_aist.RTObject.RTObject_implを再実装しています。


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