OpenRTM-aist-Python 1.1.2
クラス | 公開メンバ関数 | 全メンバ一覧
OpenRTM_aist.RTObject.RTObject_impl クラス

RTコンポーネントクラス [詳解]

OpenRTM_aist.RTObject.RTObject_impl の継承関係図
OpenRTM_aist.DataFlowComponentBase.DataFlowComponentBase OpenRTM_aist.PeriodicECSharedComposite.PeriodicECSharedComposite

クラス

class  deactivate_comps
 RTC 非活性化用ファンクタ [詳解]
 
class  ec_copy
 ExecutionContext Copy用ファンクタ [詳解]
 
class  ec_find
 ExecutionContext 検索用ファンクタ [詳解]
 
class  nv_name
 NVList 検索用ファンクタ [詳解]
 
class  svc_name
 SDOService のプロファイルリストからidでサーチするための ファンクタクラス [詳解]
 

公開メンバ関数

def __init__ (self, manager=None, orb=None, poa=None)
 コンストラクタ [詳解]
 
def __del__ (self)
 デストラクタ [詳解]
 
def onInitialize (self)
 初期化処理用コールバック関数 [詳解]
 
def onFinalize (self)
 終了処理用コールバック関数 [詳解]
 
def onStartup (self, ec_id)
 開始処理用コールバック関数 [詳解]
 
def onShutdown (self, ec_id)
 停止処理用コールバック関数 [詳解]
 
def onActivated (self, ec_id)
 活性化処理用コールバック関数 [詳解]
 
def onDeactivated (self, ec_id)
 非活性化処理用コールバック関数 [詳解]
 
def onExecute (self, ec_id)
 周期処理用コールバック関数 [詳解]
 
def onAborting (self, ec_id)
 中断処理用コールバック関数 [詳解]
 
def onError (self, ec_id)
 エラー処理用コールバック関数 [詳解]
 
def onReset (self, ec_id)
 リセット処理用コールバック関数 [詳解]
 
def onStateUpdate (self, ec_id)
 状態変更処理用コールバック関数 [詳解]
 
def onRateChanged (self, ec_id)
 動作周期変更通知用コールバック関数 [詳解]
 
def initialize (self)
 [CORBA interface] RTCを初期化する [詳解]
 
def finalize (self)
 [CORBA interface] RTC を終了する [詳解]
 
def exit (self)
 [CORBA interface] RTC がオーナーである ExecutionContext を 停止させ、そのコンテンツと共に終了させる [詳解]
 
def is_alive (self, exec_context)
 [CORBA interface] RTC が Alive 状態であるかどうか確認する。 [詳解]
 
def get_context (self, ec_id)
 [CORBA interface] ExecutionContextListを取得する [詳解]
 
def get_owned_contexts (self)
 [CORBA interface] 所有する ExecutionContextListを 取得する [詳解]
 
def get_participating_contexts (self)
 [CORBA interface] 参加している ExecutionContextList を取得する [詳解]
 
def get_component_profile (self)
 [RTObject CORBA interface] コンポーネントプロファイルを取得する [詳解]
 
def get_ports (self)
 [RTObject CORBA interface] ポートを取得する [詳解]
 
def attach_context (self, exec_context)
 [CORBA interface] ExecutionContextをattachする [詳解]
 
def detach_context (self, ec_id)
 [CORBA interface] ExecutionContextをdetachする [詳解]
 
def on_initialize (self)
 [ComponentAction CORBA interface] RTC の初期化 [詳解]
 
def on_finalize (self)
 [ComponentAction CORBA interface] RTC の終了 [詳解]
 
def on_startup (self, ec_id)
 [ComponentAction CORBA interface] RTC の開始 [詳解]
 
def on_shutdown (self, ec_id)
 [ComponentAction CORBA interface] RTC の停止 [詳解]
 
def on_activated (self, ec_id)
 [ComponentAction CORBA interface] RTC の活性化 [詳解]
 
def on_deactivated (self, ec_id)
 [ComponentAction CORBA interface] RTC の非活性化 [詳解]
 
def on_aborting (self, ec_id)
 [ComponentAction CORBA interface] RTC のエラー状態への遷移 [詳解]
 
def on_error (self, ec_id)
 [ComponentAction CORBA interface] RTC のエラー処理 [詳解]
 
def on_reset (self, ec_id)
 [ComponentAction CORBA interface] RTC のリセット [詳解]
 
def on_execute (self, ec_id)
 [DataFlowComponentAction CORBA interface] RTC の定常処理(第一周期) [詳解]
 
def on_state_update (self, ec_id)
 [DataFlowComponentAction CORBA interface] RTC の定常処理(第二周期) [詳解]
 
def on_rate_changed (self, ec_id)
 [DataFlowComponentAction CORBA interface] 実行周期変更通知 [詳解]
 
def get_owned_organizations (self)
 [SDO interface] Organization リストの取得 [詳解]
 
def get_sdo_id (self)
 [SDO interface] SDO ID の取得 [詳解]
 
def get_sdo_type (self)
 [SDO interface] SDO タイプの取得 [詳解]
 
def get_device_profile (self)
 [SDO interface] SDO DeviceProfile リストの取得 [詳解]
 
def get_service_profiles (self)
 [SDO interface] SDO ServiceProfile の取得 [詳解]
 
def get_service_profile (self, _id)
 [SDO interface] 特定のServiceProfileの取得 [詳解]
 
def get_sdo_service (self, _id)
 [SDO interface] 指定された SDO Service の取得 [詳解]
 
def get_configuration (self)
 [SDO interface] Configuration オブジェクトの取得 [詳解]
 
def get_monitoring (self)
 [SDO interface] Monitoring オブジェクトの取得 [詳解]
 
def get_organizations (self)
 [SDO interface] Organization リストの取得 [詳解]
 
def get_status_list (self)
 [SDO interface] SDO Status リストの取得 [詳解]
 
def get_status (self, name)
 [SDO interface] SDO Status の取得 [詳解]
 
def getInstanceName (self)
 [local interface] インスタンス名の取得 [詳解]
 
def setInstanceName (self, instance_name)
 [local interface] インスタンス名の設定 [詳解]
 
def getTypeName (self)
 [local interface] 型名の取得 [詳解]
 
def getDescription (self)
 [local interface] Description の取得 [詳解]
 
def getVersion (self)
 [local interface] バージョン情報の取得 [詳解]
 
def getVendor (self)
 [local interface] ベンダー情報の取得 [詳解]
 
def getCategory (self)
 [local interface] カテゴリ情報の取得 [詳解]
 
def getNamingNames (self)
 [local interface] Naming Server 情報の取得 [詳解]
 
def setObjRef (self, rtobj)
 [local interface] オブジェクトリファレンスの設定 [詳解]
 
def getObjRef (self)
 [local interface] オブジェクトリファレンスの取得 [詳解]
 
def setProperties (self, prop)
 [local interface] RTC のプロパティを設定する [詳解]
 
def getProperties (self)
 [local interface] RTC のプロパティを取得する [詳解]
 
def bindParameter (self, param_name, var, def_val, trans=None)
 コンフィギュレーションパラメータの設定 [詳解]
 
def getConfigService (self)
 コンフィギュレーションサービスを取得する [詳解]
 
def updateParameters (self, config_set)
 コンフィギュレーションパラメータの更新(ID指定) [詳解]
 
def registerPort (self, port)
 [local interface] Port を登録する [詳解]
 
def registerInPort (self, name, inport)
 [local interface] DataInPort を登録する [詳解]
 
def registerOutPort (self, name, outport)
 [local interface] DataOutPort を登録する [詳解]
 
def removeInPort (self, port)
 [local interface] InPort の登録を削除する [詳解]
 
def removeOutPort (self, port)
 [local interface] OutPort の登録を削除する [詳解]
 
def deletePort (self, port)
 [local interface] Port の登録を削除する [詳解]
 
def deletePortByName (self, port_name)
 [local interface] 名前指定により Port の登録を削除する [詳解]
 
def getExecutionContext (self, ec_id)
 [local interface] 実行コンテキストを取得する [詳解]
 
def getExecutionRate (self, ec_id)
 [local interface] 実行コンテキストの実行レートを取得する [詳解]
 
def setExecutionRate (self, ec_id, rate)
 [local interface] 実行コンテキストの実行レートを設定する [詳解]
 
def isOwnExecutionContext (self, ec_id)
 [local interface] 実行コンテキストの所有権を調べる [詳解]
 
def deactivate (self, ec_id)
 [local interface] 状態を Inactive に遷移させる [詳解]
 
def activate (self, ec_id)
 [local interface] 状態を Active に遷移させる [詳解]
 
def reset (self, ec_id)
 [local interface] 状態をリセットし Inactive に遷移させる [詳解]
 
def addSdoServiceProvider (self, prof, provider)
 [local interface] SDO service provider をセットするbool addSdoServiceProvider(const SDOPackage::ServiceProfile& prof, SdoServiceProviderBase* provider);
 
def removeSdoServiceProvider (self, id)
 [local interface] SDO service provider を削除するbool removeSdoServiceProvider(const char* id);
 
def addSdoServiceConsumer (self, prof)
 [local interface] SDO service consumer をセットするbool addSdoServiceConsumer(const SDOPackage::ServiceProfile& prof);
 
def removeSdoServiceConsumer (self, id)
 [local interface] SDO service consumer を削除するbool removeSdoServiceConsumer(const char* id);
 
def readAll (self)
 全 InPort のデータを読み込む。 [詳解]
 
def writeAll (self)
 全 OutPort のwrite()メソッドをコールする。 [詳解]
 
def setReadAll (self, read=True, completion=False)
 onExecute()実行前でのreadAll()メソッドの呼出を有効または無効にする。 [詳解]
 
def setWriteAll (self, write=True, completion=False)
 onExecute()実行後にwriteAll()メソッドの呼出を有効または無効にする。 [詳解]
 
def finalizePorts (self)
 全 Port の登録を削除する [詳解]
 
def addPreComponentActionListener (self, listener_type, memfunc, autoclean=True)
 PreComponentActionListener リスナを追加する [詳解]
 
def removePreComponentActionListener (self, listener_type, listener)
 PreComponentActionListener リスナを削除する [詳解]
 
def addPostComponentActionListener (self, listener_type, memfunc, autoclean=True)
 PostComponentActionListener リスナを追加する [詳解]
 
def removePostComponentActionListener (self, listener_type, listener)
 PostComponentActionListener リスナを削除する [詳解]
 
def addPortActionListener (self, listener_type, memfunc, autoclean=True)
 PortActionListener リスナを追加する [詳解]
 
def removePortActionListener (self, listener_type, listener)
 PortActionListener リスナを削除する [詳解]
 
def addExecutionContextActionListener (self, listener_type, memfunc, autoclean=True)
 ExecutionContextActionListener リスナを追加する [詳解]
 
def removeExecutionContextActionListener (self, listener_type, listener)
 ExecutionContextActionListener リスナを削除する [詳解]
 
def addPortConnectListener (self, listener_type, memfunc, autoclean=True)
 PortConnectListener リスナを追加する [詳解]
 
def removePortConnectListener (self, listener_type, listener)
 PortConnectListener リスナを削除する [詳解]
 
def addPortConnectRetListener (self, listener_type, memfunc, autoclean=True)
 PortConnectRetListener リスナを追加する [詳解]
 
def removePortConnectRetListener (self, listener_type, listener)
 PortConnectRetListener リスナを削除する [詳解]
 
def addConfigurationParamListener (self, type, memfunc, autoclean=True)
 ConfigurationParamListener を追加する [詳解]
 
def removeConfigurationParamListener (self, type, listener)
 ConfigurationParamListener を削除する [詳解]
 
def addConfigurationSetListener (self, listener_type, memfunc, autoclean=True)
 ConfigurationSetListener を追加する [詳解]
 
def removeConfigurationSetListener (self, type, listener)
 ConfigurationSetListener を削除する [詳解]
 
def addConfigurationSetNameListener (self, type, memfunc, autoclean=True)
 ConfigurationSetNameListener を追加する [詳解]
 
def removeConfigurationSetNameListener (self, type, listener)
 ConfigurationSetNameListener を削除する [詳解]
 
def shutdown (self)
 RTC を終了する [詳解]
 
def getPrivateContextOptions (self, ec_args)
 getting individual EC options from RTC's configuration file [詳解]
 
def getGlobalContextOptions (self, global_ec_props)
 getting global EC options from rtc.conf [詳解]
 
def getContextOptions (self, ec_args)
 getting EC options [詳解]
 
def findExistingEC (self, ec_arg, ec)
 fiding existing EC from the factory [詳解]
 
def createContexts (self, ec_args)
 creating, initializing and binding context [詳解]
 

詳解

RTコンポーネントクラス

各RTコンポーネントのベースとなるクラス。 Robotic Technology Component 仕様中の lightweightRTComponentの実装クラス。 コンポーネントの機能を提供する ComponentAction インターフェースと コンポーネントのライフサイクル管理を行うための LightweightRTObject の実装を 提供する。 実際にユーザがコンポーネントを作成する場合には、Execution Semantics に対応 した各サブクラスを利用する。
(現状の実装では Periodic Sampled Data Processing のみサポートしているため、 dataFlowComponent を直接継承している)

から
0.2.0
 

構築子と解体子

def OpenRTM_aist.RTObject.RTObject_impl.__init__ (   self,
  manager = None,
  orb = None,
  poa = None 
)

コンストラクタ

コンストラクタ

引数
self
managerマネージャオブジェクト(デフォルト値:None)
orbORB(デフォルト値:None)
poaPOA(デフォルト値:None)
def OpenRTM_aist.RTObject.RTObject_impl.__del__ (   self)

デストラクタ

引数
self

メソッド詳解

def OpenRTM_aist.RTObject.RTObject_impl.activate (   self,
  ec_id 
)

[local interface] 状態を Active に遷移させる

状態を Inactive から Active に遷移させる。この関数は以下の関 数内で呼ばれることを前提としている。

この関数の引数は上記の関数の引数 UniquieID exec_handle でなけ ればならない。

引数
ec_id上記関数の第1引数 exec_handle を渡す必要がある。
戻り値
リターンコード

ReturnCode_t activate(RTC::UniqueId ec_id);

def OpenRTM_aist.RTObject.RTObject_impl.addConfigurationParamListener (   self,
  type,
  memfunc,
  autoclean = True 
)

ConfigurationParamListener を追加する

update(const char* config_set, const char* config_param) が呼ばれた際に コールされるリスナ ConfigurationParamListener を追加する。 type には現在のところ ON_UPDATE_CONFIG_PARAM のみが入る。

引数
typeConfigurationParamListenerType型の値。 ON_UPDATE_CONFIG_PARAM がある。
memfunc関数オブジェクト
autocleanリスナオブジェクトを自動で削除するかどうかのフラグ

template <class listener>=""> ConfigurationParamListener* addConfigurationParamListener(ConfigurationParamListenerType listener_type, void (Listener::memfunc)(const char, const char*), bool autoclean = true)

def OpenRTM_aist.RTObject.RTObject_impl.addConfigurationSetListener (   self,
  listener_type,
  memfunc,
  autoclean = True 
)

ConfigurationSetListener を追加する

ConfigurationSet が更新されたときなどに呼ばれるリスナ ConfigurationSetListener を追加する。設定可能なイベントは以下の 2種類がある。

  • ON_SET_CONFIG_SET: setConfigurationSetValues() で ConfigurationSet に値が設定された場合。
  • ON_ADD_CONFIG_SET: addConfigurationSet() で新しい ConfigurationSet が追加された場合。
引数
typeConfigurationSetListenerType型の値。
memfunc関数オブジェクト
autocleanリスナオブジェクトを自動で削除するかどうかのフラグ

template <class listener>=""> ConfigurationSetListener* addConfigurationSetListener(ConfigurationSetListenerType listener_type, void (Listener::*memfunc) (const coil::Properties& config_set))

def OpenRTM_aist.RTObject.RTObject_impl.addConfigurationSetNameListener (   self,
  type,
  memfunc,
  autoclean = True 
)

ConfigurationSetNameListener を追加する

ConfigurationSetName が更新されたときなどに呼ばれるリスナ ConfigurationSetNameListener を追加する。設定可能なイベントは以下の 3種類がある。

  • ON_UPDATE_CONFIG_SET: ある ConfigurationSet がアップデートされた
  • ON_REMOVE_CONFIG_SET: ある ConfigurationSet が削除された
  • ON_ACTIVATE_CONFIG_SET: ある ConfigurationSet がアクティブ化された
引数
typeConfigurationSetNameListenerType型の値。
memfunc関数オブジェクト
autocleanリスナオブジェクトを自動で削除するかどうかのフラグ

template <class listener>=""> ConfigurationSetNameListener* addConfigurationSetNameListener(ConfigurationSetNameListenerType type, void (Listener::memfunc)(const char))

def OpenRTM_aist.RTObject.RTObject_impl.addExecutionContextActionListener (   self,
  listener_type,
  memfunc,
  autoclean = True 
)

ExecutionContextActionListener リスナを追加する

ExecutionContextの追加、削除時にコールバックされる各種リスナを設定する。

設定できるリスナのタイプとコールバックイベントは以下の通り

  • ATTACH_EC: ExecutionContext アタッチ時
  • DETACH_EC: ExecutionContext デタッチ時

リスナは ExecutionContextActionListener を継承し、以下のシグニチャを持つ operator() を実装している必要がある。

ExecutionContextActionListener::operator()(UniqueId ec_id)

デフォルトでは、この関数に与えたリスナオブジェクトの所有権は RTObjectに移り、RTObject解体時もしくは、 removeExecutionContextActionListener() により削除時に自動的に解体される。 リスナオブジェクトの所有権を呼び出し側で維持したい場合は、第3引 数に false を指定し、自動的な解体を抑制することができる。

引数
listener_typeリスナタイプ
memfunc関数オブジェクト
autocleanリスナオブジェクトの自動的解体を行うかどうかのフラグ

template <class listener>=""> ECActionListener* addExecutionContextActionListener(ECActionListenerType listener_type, void (Listener::*memfunc)(UniqueId), bool autoclean = true);

def OpenRTM_aist.RTObject.RTObject_impl.addPortActionListener (   self,
  listener_type,
  memfunc,
  autoclean = True 
)

PortActionListener リスナを追加する

Portの追加、削除時にコールバックされる各種リスナを設定する。

設定できるリスナのタイプとコールバックイベントは以下の通り

  • ADD_PORT: Port追加時
  • REMOVE_PORT: Port削除時

リスナは PortActionListener を継承し、以下のシグニチャを持つ operator() を実装している必要がある。

PortActionListener::operator()(PortProfile& pprof)

デフォルトでは、この関数に与えたリスナオブジェクトの所有権は RTObjectに移り、RTObject解体時もしくは、 removePortActionListener() により削除時に自動的に解体される。 リスナオブジェクトの所有権を呼び出し側で維持したい場合は、第3引 数に false を指定し、自動的な解体を抑制することができる。

引数
listener_typeリスナタイプ
memfunc関数オブジェクト
autocleanリスナオブジェクトの自動的解体を行うかどうかのフラグ

template <class listener>=""> PortActionListener* addPortActionListener(PortActionListenerType listener_type, void (Listener::*memfunc)(const RTC::PortProfile&), bool autoclean=true)

def OpenRTM_aist.RTObject.RTObject_impl.addPortConnectListener (   self,
  listener_type,
  memfunc,
  autoclean = True 
)

PortConnectListener リスナを追加する

Portの接続時や接続解除時に呼び出される各種リスナを設定する。

設定できるリスナのタイプとコールバックイベントは以下の通り

  • ON_NOTIFY_CONNECT: notify_connect() 関数内呼び出し直後
  • ON_NOTIFY_DISCONNECT: notify_disconnect() 呼び出し直後
  • ON_UNSUBSCRIBE_INTERFACES: notify_disconnect() 内のIF購読解除時

リスナは PortConnectListener を継承し、以下のシグニチャを持つ operator() を実装している必要がある。

PortConnectListener::operator()(const char*, ConnectorProfile)

デフォルトでは、この関数に与えたリスナオブジェクトの所有権は RTObjectに移り、RTObject解体時もしくは、 removePortConnectListener() により削除時に自動的に解体される。 リスナオブジェクトの所有権を呼び出し側で維持したい場合は、第3引 数に false を指定し、自動的な解体を抑制することができる。

引数
listener_typeリスナタイプ
memfunc関数オブジェクト
autocleanリスナオブジェクトの自動的解体を行うかどうかのフラグ

template <class listener>=""> PortConnectListener* addPortConnectListener(PortConnectListenerType listener_type, void (Listener::memfunc)(const char, ConnectorProfile&), bool autoclean = true)

def OpenRTM_aist.RTObject.RTObject_impl.addPortConnectRetListener (   self,
  listener_type,
  memfunc,
  autoclean = True 
)

PortConnectRetListener リスナを追加する

Portの接続時や接続解除時に呼び出される各種リスナを設定する。

設定できるリスナのタイプとコールバックイベントは以下の通り

  • ON_CONNECT_NEXTPORT: notify_connect() 中のカスケード呼び出し直後
  • ON_SUBSCRIBE_INTERFACES: notify_connect() 中のインターフェース購読直後
  • ON_CONNECTED: nofity_connect() 接続処理完了時に呼び出される
  • ON_DISCONNECT_NEXT: notify_disconnect() 中にカスケード呼び出し直後
  • ON_DISCONNECTED: notify_disconnect() リターン時

リスナは PortConnectRetListener を継承し、以下のシグニチャを持つ operator() を実装している必要がある。

PortConnectRetListener::operator()(const char*, ConnectorProfile)

デフォルトでは、この関数に与えたリスナオブジェクトの所有権は RTObjectに移り、RTObject解体時もしくは、 removePortConnectRetListener() により削除時に自動的に解体される。 リスナオブジェクトの所有権を呼び出し側で維持したい場合は、第3引 数に false を指定し、自動的な解体を抑制することができる。

引数
listener_typeリスナタイプ
memfunc関数オブジェクト
autocleanリスナオブジェクトの自動的解体を行うかどうかのフラグ

template <class listener>=""> PortConnectRetListener* addPortConnectRetListener(PortConnectRetListenerType listener_type, void (Listener::memfunc)(const char, ConnectorProfile&, ReturnCode_t))

def OpenRTM_aist.RTObject.RTObject_impl.addPostComponentActionListener (   self,
  listener_type,
  memfunc,
  autoclean = True 
)

PostComponentActionListener リスナを追加する

ComponentAction 実装関数の呼び出し直後のイベントに関連する各種リ スナを設定する。

設定できるリスナのタイプとコールバックイベントは以下の通り

  • POST_ON_INITIALIZE: onInitialize 直後
  • POST_ON_FINALIZE: onFinalize 直後
  • POST_ON_STARTUP: onStartup 直後
  • POST_ON_SHUTDOWN: onShutdown 直後
  • POST_ON_ACTIVATED: onActivated 直後
  • POST_ON_DEACTIVATED: onDeactivated 直後
  • POST_ON_ABORTING: onAborted 直後
  • POST_ON_ERROR: onError 直後
  • POST_ON_RESET: onReset 直後
  • POST_ON_EXECUTE: onExecute 直後
  • POST_ON_STATE_UPDATE: onStateUpdate 直後

リスナは PostComponentActionListener を継承し、以下のシグニチャを持つ operator() を実装している必要がある。

PostComponentActionListener::operator()(UniqueId ec_id, ReturnCode_t ret)

デフォルトでは、この関数に与えたリスナオブジェクトの所有権は RTObjectに移り、RTObject解体時もしくは、 removePostComponentActionListener() により削除時に自動的に解体される。 リスナオブジェクトの所有権を呼び出し側で維持したい場合は、第3引 数に false を指定し、自動的な解体を抑制することができる。

引数
listener_typeリスナタイプ
memfunc関数オブジェクト
autocleanリスナオブジェクトの自動的解体を行うかどうかのフラグ

template <class listener>=""> PostComponentActionListener* addPostComponentActionListener(PostCompActionListenerType listener_type, void (Listener::*memfunc)(UniqueId ec_id, ReturnCode_t ret), bool autoclean = true)

def OpenRTM_aist.RTObject.RTObject_impl.addPreComponentActionListener (   self,
  listener_type,
  memfunc,
  autoclean = True 
)

PreComponentActionListener リスナを追加する

ComponentAction 実装関数の呼び出し直前のイベントに関連する各種リ スナを設定する。

設定できるリスナのタイプとコールバックイベントは以下の通り

  • PRE_ON_INITIALIZE: onInitialize 直前
  • PRE_ON_FINALIZE: onFinalize 直前
  • PRE_ON_STARTUP: onStartup 直前
  • PRE_ON_SHUTDOWN: onShutdown 直前
  • PRE_ON_ACTIVATED: onActivated 直前
  • PRE_ON_DEACTIVATED: onDeactivated 直前
  • PRE_ON_ABORTING: onAborted 直前
  • PRE_ON_ERROR: onError 直前
  • PRE_ON_RESET: onReset 直前
  • PRE_ON_EXECUTE: onExecute 直前
  • PRE_ON_STATE_UPDATE: onStateUpdate 直前

リスナは PreComponentActionListener を継承し、以下のシグニチャを持つ operator() を実装している必要がある。

PreComponentActionListener::operator()(UniqueId ec_id)

デフォルトでは、この関数に与えたリスナオブジェクトの所有権は RTObjectに移り、RTObject解体時もしくは、 removePreComponentActionListener() により削除時に自動的に解体される。 リスナオブジェクトの所有権を呼び出し側で維持したい場合は、第3引 数に false を指定し、自動的な解体を抑制することができる。

引数
listener_typeリスナタイプ
memfunc関数オブジェクト
autocleanリスナオブジェクトの自動的解体を行うかどうかのフラグ

template <class listener>=""> PreComponentActionListener* addPreComponentActionListener(PreCompActionListenerType listener_type, void (Listener::*memfunc)(UniqueId ec_id), bool autoclean = true)

def OpenRTM_aist.RTObject.RTObject_impl.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)

def OpenRTM_aist.RTObject.RTObject_impl.bindParameter (   self,
  param_name,
  var,
  def_val,
  trans = None 
)

コンフィギュレーションパラメータの設定

コンフィギュレーションパラメータと変数をバインドする <VarType>としてコンフィギュレーションパラメータのデータ型を指定する。

引数
self
param_nameコンフィギュレーションパラメータ名
varコンフィギュレーションパラメータ格納用変数
def_valコンフィギュレーションパラメータデフォルト値
trans文字列変換用関数(デフォルト値:None)
戻り値
設定結果(設定成功:true,設定失敗:false)

template <typename vartype>=""> bool bindParameter(const char* param_name, VarType& var, const char* def_val, bool (trans)(VarType&, const char) = coil::stringTo)

def OpenRTM_aist.RTObject.RTObject_impl.createContexts (   self,
  ec_args 
)

creating, initializing and binding context

ReturnCode_t createContexts(std::vector<coil::Properties>& ec_args);

def OpenRTM_aist.RTObject.RTObject_impl.deactivate (   self,
  ec_id 
)

[local interface] 状態を Inactive に遷移させる

状態を Active から Inactive に遷移させる。この関数は以下の関 数内で呼ばれることを前提としている。

この関数の引数は上記の関数の引数 UniquieID exec_handle でなけ ればならない。

引数
ec_id上記関数の第1引数 exec_handle を渡す必要がある。
戻り値
リターンコード

ReturnCode_t deactivate(RTC::UniqueId ec_id);

def OpenRTM_aist.RTObject.RTObject_impl.deletePort (   self,
  port 
)

[local interface] Port の登録を削除する

RTC が保持するPortの登録を削除する。

引数
self
port削除対象 Port

void RTObject_impl::deletePort(PortBase& port)

def OpenRTM_aist.RTObject.RTObject_impl.deletePortByName (   self,
  port_name 
)

[local interface] 名前指定により Port の登録を削除する

名称を指定して RTC が保持するPortの登録を削除する。

引数
self
port_name削除対象 Port 名
def OpenRTM_aist.RTObject.RTObject_impl.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)

def OpenRTM_aist.RTObject.RTObject_impl.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 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.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 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.finalizePorts (   self)

全 Port の登録を削除する

RTC が保持する全ての Port を削除する。

引数
self
def OpenRTM_aist.RTObject.RTObject_impl.findExistingEC (   self,
  ec_arg,
  ec 
)

fiding existing EC from the factory

ReturnCode_t findExistingEC(coil::Properties& ec_arg, RTC::ExecutionContextBase*& ec);

def OpenRTM_aist.RTObject.RTObject_impl.get_component_profile (   self)

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

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

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

virtual ComponentProfile* get_component_profile()

def OpenRTM_aist.RTObject.RTObject_impl.get_configuration (   self)

[SDO interface] Configuration オブジェクトの取得

このオペレーションは Configuration interface への参照を返す。 Configuration interface は各 SDO を管理するためのインターフェースの ひとつである。このインターフェースは DeviceProfile, ServiceProfile, Organization で定義された SDO の属性値を設定するために使用される。 Configuration インターフェースの詳細については、OMG SDO specification の 2.3.5節, p.2-24 を参照のこと。

引数
self
戻り値
SDO の Configuration インターフェースへの参照
例外
InterfaceNotImplementedSDOはConfigurationインターフェースを 持たない。
SDONotExistsターゲットのSDOが存在しない。(本例外は、CORBA標準 システム例外のOBJECT_NOT_EXISTにマッピングされる)
NotAvailableSDOは存在するが応答がない。
InternalError内部的エラーが発生した。

virtual SDOPackage::Configuration_ptr get_configuration()

def OpenRTM_aist.RTObject.RTObject_impl.get_context (   self,
  ec_id 
)

[CORBA interface] ExecutionContextListを取得する

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

引数
self
戻り値
ExecutionContext リスト

def get_contexts(self): execlist = [] OpenRTM_aist.CORBA_SeqUtil.for_each(self._execContexts, self.ec_copy(execlist)) return execlist [CORBA interface] ExecutionContextを取得する

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

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

virtual ExecutionContext_ptr get_context(UniqueId exec_handle)

def OpenRTM_aist.RTObject.RTObject_impl.get_device_profile (   self)

[SDO interface] SDO DeviceProfile リストの取得

SDO の DeviceProfile を返すオペレーション。 SDO がハードウエアデバイス に関連付けられていない場合には、空の DeviceProfile が返される。 このオペレーションは以下の型の例外を発生させる。

引数
self
戻り値
SDO DeviceProfile
例外
SDONotExistsターゲットのSDOが存在しない。(本例外は、CORBA標準 システム例外のOBJECT_NOT_EXISTにマッピングされる)
NotAvailableSDOは存在するが応答がない。
InternalError内部的エラーが発生した。

virtual SDOPackage::DeviceProfile* get_device_profile()

def OpenRTM_aist.RTObject.RTObject_impl.get_monitoring (   self)

[SDO interface] Monitoring オブジェクトの取得

このオペレーションは Monitoring interface への参照を返す。 Monitoring interface は SDO が管理するインターフェースの一つである。 このインターフェースは SDO のプロパティをモニタリングするために 使用される。 Monitoring interface の詳細については OMG SDO specification の 2.3.7節 "Monitoring Interface" p.2-35 を参照のこと。

引数
self
戻り値
SDO の Monitoring interface への参照
例外
InterfaceNotImplementedSDOはConfigurationインターフェースを 持たない。
SDONotExistsターゲットのSDOが存在しない。(本例外は、CORBA標準 システム例外のOBJECT_NOT_EXISTにマッピングされる)
NotAvailableSDOは存在するが応答がない。
InternalError内部的エラーが発生した。

virtual SDOPackage::Monitoring_ptr get_monitoring()

def OpenRTM_aist.RTObject.RTObject_impl.get_organizations (   self)

[SDO interface] Organization リストの取得

SDO は0個以上の Organization (組織)に所属することができる。 もし SDO が 1個以上の Organization に所属している場合、このオペレーションは所属する Organization のリストを返す。SDO が どの Organization にも所属していない 場合には、空のリストが返される。

引数
self
戻り値
SDO が所属する Organization のリスト。
例外
SDONotExistsターゲットのSDOが存在しない。(本例外は、CORBA標準 システム例外のOBJECT_NOT_EXISTにマッピングされる)
NotAvailableSDOは存在するが応答がない。
InternalError内部的エラーが発生した。 virtual SDOPackage::OrganizationList* get_organizations()
def OpenRTM_aist.RTObject.RTObject_impl.get_owned_contexts (   self)

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

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

戻り値
ExecutionContext リスト

virtual ExecutionContextList* get_owned_contexts()

def OpenRTM_aist.RTObject.RTObject_impl.get_owned_organizations (   self)

[SDO interface] Organization リストの取得

SDOSystemElement は0個もしくはそれ以上の Organization を所有することが 出来る。 SDOSystemElement が1つ以上の Organization を所有している場合 には、このオペレーションは所有する Organization のリストを返す。 もしOrganizationを一つも所有していないければ空のリストを返す。

引数
self
戻り値
所有している Organization リスト
例外
SDONotExistsターゲットのSDOが存在しない。(本例外は、CORBA標準 システム例外のOBJECT_NOT_EXISTにマッピングされる)
NotAvailableSDOは存在するが応答がない。
InternalError内部的エラーが発生した。

virtual SDOPackage::OrganizationList* get_owned_organizations()

def OpenRTM_aist.RTObject.RTObject_impl.get_participating_contexts (   self)

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

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

戻り値
ExecutionContext リスト

virtual ExecutionContextList* get_participating_contexts()

def OpenRTM_aist.RTObject.RTObject_impl.get_ports (   self)

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

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

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

virtual PortServiceList* get_ports()

def OpenRTM_aist.RTObject.RTObject_impl.get_sdo_id (   self)

[SDO interface] SDO ID の取得

SDO ID を返すオペレーション。 このオペレーションは以下の型の例外を発生させる。

引数
self
戻り値
リソースデータモデルで定義されている SDO の ID
例外
SDONotExistsターゲットのSDOが存在しない。(本例外は、CORBA標準 システム例外のOBJECT_NOT_EXISTにマッピングされる)
NotAvailableSDOは存在するが応答がない。
InternalError内部的エラーが発生した。

virtual char* get_sdo_id()

def OpenRTM_aist.RTObject.RTObject_impl.get_sdo_service (   self,
  _id 
)

[SDO interface] 指定された SDO Service の取得

このオペレーションは引数 "id" で指定された名前によって区別される SDO の Service へのオブジェクト参照を返す。 SDO により提供される Service はそれぞれ一意の識別子により区別される。

引数
self
_idSDO Service に関連付けられた識別子。
戻り値
要求された SDO Service への参照。
例外
InvalidParameter"id" で指定した ServiceProfile が存在しない。 "id" が null。
SDONotExistsターゲットのSDOが存在しない。(本例外は、CORBA標準 システム例外のOBJECT_NOT_EXISTにマッピングされる)
NotAvailableSDOは存在するが応答がない。
InternalError内部的エラーが発生した。

virtual SDOPackage::SDOService_ptr get_sdo_service(const char* id)

def OpenRTM_aist.RTObject.RTObject_impl.get_sdo_type (   self)

[SDO interface] SDO タイプの取得

SDO Type を返すオペレーション。 このオペレーションは以下の型の例外を発生させる。

引数
self
戻り値
リソースデータモデルで定義されている SDO の Type
例外
SDONotExistsターゲットのSDOが存在しない。(本例外は、CORBA標準 システム例外のOBJECT_NOT_EXISTにマッピングされる)
NotAvailableSDOは存在するが応答がない。
InternalError内部的エラーが発生した。

virtual char* get_sdo_type()

def OpenRTM_aist.RTObject.RTObject_impl.get_service_profile (   self,
  _id 
)

[SDO interface] 特定のServiceProfileの取得

引数 "id" で指定された名前のサービスの ServiceProfile を返す。

引数
self
_idSDO Service の ServiceProfile に関連付けられた識別子。
戻り値
指定された SDO Service の ServiceProfile。
例外
InvalidParameter"id" で指定した ServiceProfile が存在しない。 "id" が null。
SDONotExistsターゲットのSDOが存在しない。(本例外は、CORBA標準 システム例外のOBJECT_NOT_EXISTにマッピングされる)
NotAvailableSDOは存在するが応答がない。
InternalError内部的エラーが発生した。

virtual SDOPackage::ServiceProfile* get_service_profile(const char* id)

def OpenRTM_aist.RTObject.RTObject_impl.get_service_profiles (   self)

[SDO interface] SDO ServiceProfile の取得

SDO が所有している Service の ServiceProfile を返すオペレーション。 SDO がサービスを一つも所有していない場合には、空のリストを返す。 このオペレーションは以下の型の例外を発生させる。

引数
self
戻り値
SDO が提供する全ての Service の ServiceProfile。
例外
SDONotExistsターゲットのSDOが存在しない。(本例外は、CORBA標準 システム例外のOBJECT_NOT_EXISTにマッピングされる)
NotAvailableSDOは存在するが応答がない。
InternalError内部的エラーが発生した。

virtual SDOPackage::ServiceProfileList* get_service_profiles()

def OpenRTM_aist.RTObject.RTObject_impl.get_status (   self,
  name 
)

[SDO interface] SDO Status の取得

This operation returns the value of the specified status parameter.

引数
self
nameSDO のステータスを定義するパラメータ。
戻り値
指定されたパラメータのステータス値。
例外
SDONotExistsターゲットのSDOが存在しない。(本例外は、CORBA標準 システム例外のOBJECT_NOT_EXISTにマッピングされる)
NotAvailableSDOは存在するが応答がない。
InvalidParameter引数 "name" が null あるいは存在しない。
InternalError内部的エラーが発生した。 virtual CORBA::Any* get_status(const char* name)
def OpenRTM_aist.RTObject.RTObject_impl.get_status_list (   self)

[SDO interface] SDO Status リストの取得

このオペレーションは SDO のステータスを表す NVList を返す。

引数
self
戻り値
SDO のステータス。
例外
SDONotExistsターゲットのSDOが存在しない。(本例外は、CORBA標準 システム例外のOBJECT_NOT_EXISTにマッピングされる)
NotAvailableSDOは存在するが応答がない。
InternalError内部的エラーが発生した。

virtual SDOPackage::NVList* get_status_list()

def OpenRTM_aist.RTObject.RTObject_impl.getCategory (   self)

[local interface] カテゴリ情報の取得

ComponentProfile に設定されたカテゴリ情報を返す。

引数
self
戻り値
カテゴリ情報

const char* getCategory()

def OpenRTM_aist.RTObject.RTObject_impl.getConfigService (   self)

コンフィギュレーションサービスを取得する

コンフィギュレーションサービスオブジェクトを取得する。このサービ スオブジェクトを利用して、コンフィギュレーションパラメータの操作 を行うことができる。主な操作としては、

  • unbindParameter(): パラメータのアンバインド
  • update(): パラメータの更新
  • update(set_name): 特定のセットの更新
  • update(set_name, param_name): 特定のセットのパラメータの更新
  • isExist(): パラメータの存在確認
  • isChanged(): パラメータが変更されたかの確認
  • changedParameters(): 変更されたパラメータのリスト
  • getActiveId(): アクティブセット名の取得
  • haveConfig(config_id): コンフィグセットを持っているかどうか
  • getConfigurationSets(): 全コンフィギュレーションセットの取得
  • getConfigurationSet(set_id): 特定セットを取得

コールバック関連

詳細はConfigAdminクラスリファレンスを参照のこと。

戻り値
ConfigAdmin object

ConfigAdmin& getConfigService() { return m_configsets; }

def OpenRTM_aist.RTObject.RTObject_impl.getContextOptions (   self,
  ec_args 
)

getting EC options

ReturnCode_t getContextOptions(std::vector<coil::Properties>& ec_args);

def OpenRTM_aist.RTObject.RTObject_impl.getDescription (   self)

[local interface] Description の取得

ComponentProfile に設定された Description を返す。

引数
self
戻り値
Description

const char* getDescription()

def OpenRTM_aist.RTObject.RTObject_impl.getExecutionContext (   self,
  ec_id 
)

[local interface] 実行コンテキストを取得する

get_context() と同じ機能のローカル版。違いはない。 この関数は以下の関数内で呼ばれることを前提としている。

この関数の引数はこれらの関数の引数 UniquieID exec_handle でなけ ればならない。

引数
ec_id上記関数の第1引数 exec_handle を渡す必要がある。

ExecutionContext_ptr getExecutionContext(RTC::UniqueId ec_id);

def OpenRTM_aist.RTObject.RTObject_impl.getExecutionRate (   self,
  ec_id 
)

[local interface] 実行コンテキストの実行レートを取得する

現在実行中の実行コンテキストの実行レートを取得する。実行コンテキ ストのKindがPERIODIC以外の場合の動作は未定義である。この関数は以 下の関数内で呼ばれることを前提としている。

この関数の引数はこれらの関数の引数 UniquieID exec_handle でなけ ればならない。

引数
ec_id上記関数の第1引数 exec_handle を渡す必要がある。

double getExecutionRate(RTC::UniqueId ec_id);

def OpenRTM_aist.RTObject.RTObject_impl.getGlobalContextOptions (   self,
  global_ec_props 
)

getting global EC options from rtc.conf

ReturnCode_t getGlobalContextOptions(coil::Properties& global_ec_props);

def OpenRTM_aist.RTObject.RTObject_impl.getInstanceName (   self)

[local interface] インスタンス名の取得

ComponentProfile に設定されたインスタンス名を返す。

引数
self
戻り値
インスタンス名

const char* getInstanceName()

def OpenRTM_aist.RTObject.RTObject_impl.getNamingNames (   self)

[local interface] Naming Server 情報の取得

設定された Naming Server 情報を返す。

引数
self
戻り値
Naming Server リスト

std::vector<std::string> getNamingNames();

def OpenRTM_aist.RTObject.RTObject_impl.getObjRef (   self)

[local interface] オブジェクトリファレンスの取得

設定された CORBA オブジェクトリファレンスを取得する。

引数
self
戻り値
オブジェクトリファレンス

RTObject_ptr getObjRef() const;

def OpenRTM_aist.RTObject.RTObject_impl.getPrivateContextOptions (   self,
  ec_args 
)

getting individual EC options from RTC's configuration file

ReturnCode_t getPrivateContextOptions(std::vector<coil::Properties>& ec_args);

def OpenRTM_aist.RTObject.RTObject_impl.getProperties (   self)

[local interface] RTC のプロパティを取得する

RTC が保持しているプロパティを返す。 RTCがプロパティを持たない場合は空のプロパティが返される。

引数
self
戻り値
RTC のプロパティ

coil::Properties& getProperties();

def OpenRTM_aist.RTObject.RTObject_impl.getTypeName (   self)

[local interface] 型名の取得

ComponentProfile に設定された型名を返す。

引数
self
戻り値
型名

const char* getTypeName()

def OpenRTM_aist.RTObject.RTObject_impl.getVendor (   self)

[local interface] ベンダー情報の取得

ComponentProfile に設定されたベンダー情報を返す。

引数
self
戻り値
ベンダー情報

const char* getVendor()

def OpenRTM_aist.RTObject.RTObject_impl.getVersion (   self)

[local interface] バージョン情報の取得

ComponentProfile に設定されたバージョン情報を返す。

引数
self
戻り値
バージョン情報

const char* getVersion()

def OpenRTM_aist.RTObject.RTObject_impl.initialize (   self)

[CORBA interface] RTCを初期化する

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

制約

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

def OpenRTM_aist.RTObject.RTObject_impl.isOwnExecutionContext (   self,
  ec_id 
)

[local interface] 実行コンテキストの所有権を調べる

現在実行中の実行コンテキストの所有権を調べる。この関数は以下の関 数内で呼ばれることを前提としている。

この関数の引数はこれらの関数の引数 UniquieID exec_handle でなけ ればならない。

引数
ec_id上記関数の第1引数 exec_handle を渡す必要がある。
戻り値
true: 自身の実行コンテキスト、false: 他の実行コンテキスト

bool isOwnExecutionContext(RTC::UniqueId ec_id);

def OpenRTM_aist.RTObject.RTObject_impl.on_aborting (   self,
  ec_id 
)

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

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

引数
self
ec_id状態遷移した ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.on_activated (   self,
  ec_id 
)

[ComponentAction CORBA interface] RTC の活性化

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

引数
self
ec_id活性化 ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.on_deactivated (   self,
  ec_id 
)

[ComponentAction CORBA interface] RTC の非活性化

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

引数
self
ec_id非活性化 ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.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 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.on_execute (   self,
  ec_id 
)

[DataFlowComponentAction CORBA interface] RTC の定常処理(第一周期)

以下の状態が保持されている場合に、設定された周期で定期的に呼び出される。

  • RTC は Alive 状態である。
  • 指定された ExecutionContext が Running 状態である。 本オペレーションは、Two-Pass Execution の第一周期で実行される。 このオペレーション呼び出しの結果として onExecute() コールバック関数が呼び 出される。

制約

  • 指定された ExecutionContext の ExecutionKind は、 PERIODIC でなければな らない
引数
self
ec_id定常処理対象 ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.on_finalize (   self)

[ComponentAction CORBA interface] RTC の終了

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

引数
self
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.on_initialize (   self)

[ComponentAction CORBA interface] RTC の初期化

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

引数
self
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.on_rate_changed (   self,
  ec_id 
)

[DataFlowComponentAction CORBA interface] 実行周期変更通知

本オペレーションは、ExecutionContext の実行周期が変更されたことを通知する 際に呼び出される。 このオペレーション呼び出しの結果として onRateChanged() コールバック関数が 呼び出される。

制約

  • 指定された ExecutionContext の ExecutionKind は、 PERIODIC でなければな らない
引数
self
ec_id定常処理対象 ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.on_reset (   self,
  ec_id 
)

[ComponentAction CORBA interface] RTC のリセット

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

引数
self
ec_idリセット対象 ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.on_shutdown (   self,
  ec_id 
)

[ComponentAction CORBA interface] RTC の停止

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

引数
self
ec_id状態遷移した ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.on_startup (   self,
  ec_id 
)

[ComponentAction CORBA interface] RTC の開始

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

引数
self
ec_id状態遷移した ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.on_state_update (   self,
  ec_id 
)

[DataFlowComponentAction CORBA interface] RTC の定常処理(第二周期)

以下の状態が保持されている場合に、設定された周期で定期的に呼び出される。

  • RTC は Alive 状態である。
  • 指定された ExecutionContext が Running 状態である。 本オペレーションは、Two-Pass Execution の第二周期で実行される。 このオペレーション呼び出しの結果として onStateUpdate() コールバック関数が 呼び出される。

制約

  • 指定された ExecutionContext の ExecutionKind は、 PERIODIC でなければな らない
引数
self
ec_id定常処理対象 ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.onAborting (   self,
  ec_id 
)

中断処理用コールバック関数

ComponentAction::on_aborting が呼ばれた際に実行されるコールバック 関数。
本関数は無条件に RTC::RTC_OK を返すようにダミー実装されているので、 各コンポーネントの実際の中断処理は、本関数をオーバーライドして実装する 必要がある。

引数
self
ec_id参加している ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.onActivated (   self,
  ec_id 
)

活性化処理用コールバック関数

ComponentAction::on_activated が呼ばれた際に実行されるコールバック 関数。
本関数は無条件に RTC::RTC_OK を返すようにダミー実装されているので、 各コンポーネントの実際の活性化処理は、本関数をオーバーライドして実装する 必要がある。

引数
self
ec_id参加している ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.onDeactivated (   self,
  ec_id 
)

非活性化処理用コールバック関数

ComponentAction::on_deactivated が呼ばれた際に実行されるコールバック 関数。
本関数は無条件に RTC::RTC_OK を返すようにダミー実装されているので、 各コンポーネントの実際の非活性化処理は、本関数をオーバーライドして実装する 必要がある。

引数
self
ec_id参加している ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.onError (   self,
  ec_id 
)

エラー処理用コールバック関数

ComponentAction::on_error が呼ばれた際に実行されるコールバック関数。
本関数は無条件に RTC::RTC_OK を返すようにダミー実装されているので、 各コンポーネントの実際のエラー処理は、本関数をオーバーライドして実装する 必要がある。

引数
self
ec_id参加している ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.onExecute (   self,
  ec_id 
)

周期処理用コールバック関数

DataFlowComponentAction::on_execute が呼ばれた際に実行される コールバック関数。
本関数は無条件に RTC::RTC_OK を返すようにダミー実装されているので、 各コンポーネントの実際の周期処理は、本関数をオーバーライドして実装する 必要がある。
本関数は Periodic Sampled Data Processing における Two-Pass Executionの 1回目の実行パスとして定期的に呼び出される。

引数
self
ec_id参加している ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.onFinalize (   self)

終了処理用コールバック関数

ComponentAction::on_finalize が呼ばれた際に実行されるコールバック 関数。
本関数は無条件に RTC::RTC_OK を返すようにダミー実装されているので、 各コンポーネントの実際の終了処理は、本関数をオーバーライドして実装する 必要がある。

引数
self
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.onInitialize (   self)

初期化処理用コールバック関数

ComponentAction::on_initialize が呼ばれた際に実行されるコールバック 関数。
本関数は無条件に RTC::RTC_OK を返すようにダミー実装されているので、 各コンポーネントの実際の初期化処理は、本関数をオーバーライドして実装する 必要がある。

引数
self
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.onRateChanged (   self,
  ec_id 
)

動作周期変更通知用コールバック関数

DataFlowComponentAction::on_rate_changed が呼ばれた際に実行される コールバック関数。
本関数は無条件に RTC::RTC_OK を返すようにダミー実装されているので、 各コンポーネントの実際の状態変更処理は、本関数をオーバーライドして実装する 必要がある。
本関数は Periodic Sampled Data Processing において ExecutionContext の 実行が更新された際に呼び出される。

引数
self
ec_id参加している ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.onReset (   self,
  ec_id 
)

リセット処理用コールバック関数

ComponentAction::on_reset が呼ばれた際に実行されるコールバック関数。
本関数は無条件に RTC::RTC_OK を返すようにダミー実装されているので、 各コンポーネントの実際のリセット処理は、本関数をオーバーライドして実装する 必要がある。

引数
self
ec_id参加している ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.onShutdown (   self,
  ec_id 
)

停止処理用コールバック関数

ComponentAction::on_shutdown が呼ばれた際に実行されるコールバック 関数。
本関数は無条件に RTC::RTC_OK を返すようにダミー実装されているので、 各コンポーネントの実際の停止処理は、本関数をオーバーライドして実装する 必要がある。

引数
self
ec_id参加している ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.onStartup (   self,
  ec_id 
)

開始処理用コールバック関数

ComponentAction::on_startup が呼ばれた際に実行されるコールバック 関数。
本関数は無条件に RTC::RTC_OK を返すようにダミー実装されているので、 各コンポーネントの実際の開始処理は、本関数をオーバーライドして実装する 必要がある。

引数
self
ec_id参加している ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.onStateUpdate (   self,
  ec_id 
)

状態変更処理用コールバック関数

DataFlowComponentAction::on_state_update が呼ばれた際に実行される コールバック関数。
本関数は無条件に RTC::RTC_OK を返すようにダミー実装されているので、 各コンポーネントの実際の状態変更処理は、本関数をオーバーライドして実装する 必要がある。
本関数は Periodic Sampled Data Processing における Two-Pass Executionの 2回目の実行パスとして定期的に呼び出される。

引数
self
ec_id参加している ExecutionContext の ID
戻り値
ReturnCode_t 型のリターンコード
def OpenRTM_aist.RTObject.RTObject_impl.readAll (   self)

全 InPort のデータを読み込む。

RTC が保持する全ての InPort のデータを読み込む。

戻り値
読み込み結果(全ポートの読み込み成功:true,失敗:false)

bool readAll();

def OpenRTM_aist.RTObject.RTObject_impl.registerInPort (   self,
  name,
  inport 
)

[local interface] DataInPort を登録する

RTC が保持する DataInPort を登録する。 Port のプロパティにデータポートであること("port.dataport")、 TCPを使用すること("tcp_any")を設定するとともに、 DataInPort の インスタンスを生成し、登録する。

引数
self
nameport 名称
inport登録対象 DataInPort
def OpenRTM_aist.RTObject.RTObject_impl.registerOutPort (   self,
  name,
  outport 
)

[local interface] DataOutPort を登録する

RTC が保持する DataOutPor tを登録する。 Port のプロパティにデータポートであること("port.dataport")、 TCPを使用すること("tcp_any")を設定するとともに、 DataOutPort の インスタンスを生成し、登録する。

引数
self
nameport 名称
outport登録対象 DataInPort

void registerOutPort(const char* name, OutPortBase& outport);

def OpenRTM_aist.RTObject.RTObject_impl.registerPort (   self,
  port 
)

[local interface] Port を登録する

RTC が保持するPortを登録する。 Port を外部からアクセス可能にするためには、このオペレーションにより 登録されていなければならない。登録される Port はこの RTC 内部において PortProfile.name により区別される。したがって、Port は RTC 内において、 ユニークな PortProfile.name を持たなければならない。 登録された Port は内部で適切にアクティブ化された後、その参照と オブジェクト参照がリスト内に保存される。

引数
self
portRTC に登録する Port
port_typeif port is PortBase, port_type is None, if port is PortService, port_type is True

void registerPort(PortBase& port);

def OpenRTM_aist.RTObject.RTObject_impl.removeConfigurationParamListener (   self,
  type,
  listener 
)

ConfigurationParamListener を削除する

addConfigurationParamListener で追加されたリスナオブジェクトを削除する。

引数
typeConfigurationParamListenerType型の値。 ON_UPDATE_CONFIG_PARAM がある。
listener与えたリスナオブジェクトへのポインタ

void removeConfigurationParamListener(ConfigurationParamListenerType type, ConfigurationParamListener* listener);

def OpenRTM_aist.RTObject.RTObject_impl.removeConfigurationSetListener (   self,
  type,
  listener 
)

ConfigurationSetListener を削除する

addConfigurationSetListener で追加されたリスナオブジェクトを削除する。

引数
typeConfigurationSetListenerType型の値。
listener与えたリスナオブジェクトへのポインタ

void removeConfigurationSetListener(ConfigurationSetListenerType type, ConfigurationSetListener* listener);

def OpenRTM_aist.RTObject.RTObject_impl.removeConfigurationSetNameListener (   self,
  type,
  listener 
)

ConfigurationSetNameListener を削除する

addConfigurationSetNameListener で追加されたリスナオブジェクトを 削除する。

引数
typeConfigurationSetNameListenerType型の値。 ON_UPDATE_CONFIG_PARAM がある。
listener与えたリスナオブジェクトへのポインタ

void removeConfigurationSetNameListener(ConfigurationSetNameListenerType type, ConfigurationSetNameListener* listener);

def OpenRTM_aist.RTObject.RTObject_impl.removeExecutionContextActionListener (   self,
  listener_type,
  listener 
)

ExecutionContextActionListener リスナを削除する

設定した各種リスナを削除する。

引数
listener_typeリスナタイプ
listenerリスナオブジェクトへのポインタ

void removeExecutionContextActionListener(ECActionListenerType listener_type, ECActionListener* listener);

def OpenRTM_aist.RTObject.RTObject_impl.removeInPort (   self,
  port 
)

[local interface] InPort の登録を削除する

RTC が保持するInPortの登録を削除する。

引数
port削除対象 Port
戻り値
削除結果(削除成功:true,削除失敗:false)

bool removeInPort(InPortBase& port);

def OpenRTM_aist.RTObject.RTObject_impl.removeOutPort (   self,
  port 
)

[local interface] OutPort の登録を削除する

RTC が保持するOutPortの登録を削除する。

引数
port削除対象 Port
戻り値
削除結果(削除成功:true,削除失敗:false)

bool removeOutPort(OutPortBase& port);

def OpenRTM_aist.RTObject.RTObject_impl.removePortActionListener (   self,
  listener_type,
  listener 
)

PortActionListener リスナを削除する

設定した各種リスナを削除する。

引数
listener_typeリスナタイプ
listenerリスナオブジェクトへのポインタ

void removePortActionListener(PortActionListenerType listener_type, PortActionListener* listener);

def OpenRTM_aist.RTObject.RTObject_impl.removePortConnectListener (   self,
  listener_type,
  listener 
)

PortConnectListener リスナを削除する

設定した各種リスナを削除する。

引数
listener_typeリスナタイプ
listenerリスナオブジェクトへのポインタ

void removePortConnectListener(PortConnectListenerType listener_type, PortConnectListener* listener);

def OpenRTM_aist.RTObject.RTObject_impl.removePortConnectRetListener (   self,
  listener_type,
  listener 
)

PortConnectRetListener リスナを削除する

設定した各種リスナを削除する。

引数
listener_typeリスナタイプ
listenerリスナオブジェクトへのポインタ

void removePortConnectRetListener(PortConnectRetListenerType listener_type, PortConnectRetListener* listener);

def OpenRTM_aist.RTObject.RTObject_impl.removePostComponentActionListener (   self,
  listener_type,
  listener 
)

PostComponentActionListener リスナを削除する

設定した各種リスナを削除する。

引数
listener_typeリスナタイプ
listenerリスナオブジェクトへのポインタ

void removePostComponentActionListener(PostComponentActionListenerType listener_type, PostComponentActionListener* listener);

def OpenRTM_aist.RTObject.RTObject_impl.removePreComponentActionListener (   self,
  listener_type,
  listener 
)

PreComponentActionListener リスナを削除する

設定した各種リスナを削除する。

引数
listener_typeリスナタイプ
listenerリスナオブジェクトへのポインタ

void removePreComponentActionListener(PreComponentActionListenerType listener_type, PreComponentActionListener* listener);

def OpenRTM_aist.RTObject.RTObject_impl.reset (   self,
  ec_id 
)

[local interface] 状態をリセットし Inactive に遷移させる

状態を Error から Inactive に遷移させる。この関数は以下の関 数内で呼ばれることを前提としている。

この関数の引数は上記の関数の引数 UniquieID exec_handle でなけ ればならない。

引数
ec_id上記関数の第1引数 exec_handle を渡す必要がある。
戻り値
リターンコード

ReturnCode_t reset(RTC::UniqueId ec_id);

def OpenRTM_aist.RTObject.RTObject_impl.setExecutionRate (   self,
  ec_id,
  rate 
)

[local interface] 実行コンテキストの実行レートを設定する

現在実行中の実行コンテキストの実行レートを設定する。実行コンテキ ストのKindがPERIODIC以外の場合の動作は未定義である。この関数は以 下の関数内で呼ばれることを前提としている。

この関数の引数はこれらの関数の引数 UniquieID exec_handle でなけ ればならない。

引数
ec_id上記関数の第1引数 exec_handle を渡す必要がある。
rate実行レートを [Hz] で与える

ReturnCode_t setExecutionRate(RTC::UniqueId ec_id, double rate);

def OpenRTM_aist.RTObject.RTObject_impl.setInstanceName (   self,
  instance_name 
)

[local interface] インスタンス名の設定

ComponentProfile に指定されたインスタンス名を設定する。

引数
self
instance_nameインスタンス名

void setInstanceName(const char* instance_name);

def OpenRTM_aist.RTObject.RTObject_impl.setObjRef (   self,
  rtobj 
)

[local interface] オブジェクトリファレンスの設定

RTC の CORBA オブジェクトリファレンスを設定する。

引数
self
rtobjオブジェクトリファレンス

void setObjRef(const RTObject_ptr rtobj);

def OpenRTM_aist.RTObject.RTObject_impl.setProperties (   self,
  prop 
)

[local interface] RTC のプロパティを設定する

RTC が保持すべきプロパティを設定する。与えられるプロパティは、 ComponentProfile 等に設定されるべき情報を持たなければならない。 このオペレーションは通常 RTC が初期化される際に Manager から 呼ばれることを意図している。

引数
self
propRTC のプロパティ

void setProperties(const coil::Properties& prop);

def OpenRTM_aist.RTObject.RTObject_impl.setReadAll (   self,
  read = True,
  completion = False 
)

onExecute()実行前でのreadAll()メソッドの呼出を有効または無効にする。

このメソッドをパラメータをtrueとして呼ぶ事により、onExecute()実行前に readAll()が呼出されるようになる。 パラメータがfalseの場合は、readAll()呼出を無効にする。

引数
read(default:true)(readAll()メソッド呼出あり:true, readAll()メソッド呼出なし:false)
completion(default:false)readAll()にて、どれかの一つのInPortのread()が失敗しても全てのInPortのread()を呼び出す:true, readAll()にて、どれかの一つのInPortのread()が失敗した場合、すぐにfalseで抜ける:false

void setReadAll(bool read=true, bool completion=false);

def OpenRTM_aist.RTObject.RTObject_impl.setWriteAll (   self,
  write = True,
  completion = False 
)

onExecute()実行後にwriteAll()メソッドの呼出を有効または無効にする。

このメソッドをパラメータをtrueとして呼ぶ事により、onExecute()実行後に writeAll()が呼出されるようになる。 パラメータがfalseの場合は、writeAll()呼出を無効にする。

引数
write(default:true)(writeAll()メソッド呼出あり:true, writeAll()メソッド呼出なし:false)
completion(default:false)writeAll()にて、どれかの一つのOutPortのwrite()が失敗しても全てのOutPortのwrite()を呼び出しを行う:true, writeAll()にて、どれかの一つのOutPortのwrite()が失敗した場合、すぐにfalseで抜ける:false

void setWriteAll(bool write=true, bool completion=false);

def OpenRTM_aist.RTObject.RTObject_impl.shutdown (   self)

RTC を終了する

RTC の終了処理を実行する。 保持している全 Port の登録を解除するとともに、該当する CORBA オブジェクト を非活性化し、RTC を終了する。

引数
self
def OpenRTM_aist.RTObject.RTObject_impl.updateParameters (   self,
  config_set 
)

コンフィギュレーションパラメータの更新(ID指定)

指定したIDのコンフィギュレーションセットに設定した値で、 コンフィギュレーションパラメータの値を更新する

引数
self
config_set設定対象のコンフィギュレーションセットID

void updateParameters(const char* config_set);

def OpenRTM_aist.RTObject.RTObject_impl.writeAll (   self)

全 OutPort のwrite()メソッドをコールする。

RTC が保持する全ての OutPort のwrite()メソッドをコールする。

戻り値
読み込み結果(全ポートへの書き込み成功:true,失敗:false)

bool writeAll();


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