jp.go.aist.rtm.RTC.executionContext
クラス ExecutionContextProfile

java.lang.Object
  上位を拡張 jp.go.aist.rtm.RTC.executionContext.ExecutionContextProfile

public class ExecutionContextProfile
extends java.lang.Object

ExecutionContextProfile クラス

Periodic Sampled Data Processing(周期実行用)ExecutionContextクラス。


フィールドの概要
static double DEEFAULT_PERIOD
           
 
コンストラクタの概要
ExecutionContextProfile()
           
ExecutionContextProfile(ExecutionKind kind)
          デフォルトコンストラクタ {@.ja デフォルトコンストラクタ プロファイルに以下の項目を設定する。
 
メソッドの概要
 ReturnCode_t addComponent(LightweightRTObject comp)
          RTコンポーネントを追加する {@.ja 指定したRTコンポーネントを参加者リストに追加する。
 RTObject[] getComponentList()
          RTコンポーネントの参加者リストを取得する {@.ja 現在登録されている参加者RTCのリストを取得する。
 ExecutionKind getKind()
          ExecutionKind を取得する 本 ExecutionContext の ExecutionKind を取得する
 java.lang.String getKindString()
           
 java.lang.String getKindString(ExecutionKind kind)
          ExecutionKind を文字列化する ExecutionKind で定義されている PERIODIC, EVENT_DRIVEN, OTHER を文字列化する。
 ExecutionContextService getObjRef()
          CORBA オブジェクト参照の取得 本オブジェクトの ExecutioncontextService としての CORBA オブジェ クト参照を取得する。
 RTObject getOwner()
          Ownerコンポーネントの参照を取得する このECのOwnerであるRTCの参照を取得する。
 TimeValue getPeriod()
           
 ExecutionContextProfile getProfile()
          Profileを取得する {@.ja RTC::ExecutionContextProfile を取得する。
 Properties getProperties()
          Propertiesを取得する ExecutionContextProfile::properties を取得する。
 double getRate()
          ExecutionContext の実行周期(Hz)を取得する Active 状態にてRTコンポーネントが実行される周期(単位:Hz)を取得す る。
 void lock()
          ExecutionContextProfileをロックする {@.ja このオブジェクトが管理する RTC::ExecutionContextProfile をロックする。
 ReturnCode_t removeComponent(LightweightRTObject comp)
          RTコンポーネントを参加者リストから削除する {@.ja 指定したRTコンポーネントを参加者リストから削除する。
 ReturnCode_t setKind(ExecutionKind kind)
          ExecutionKind を設定する この ExecutionContext の ExecutionKind を設定する
 void setObjRef(ExecutionContextService ec_ptr)
          CORBA オブジェクトの設定 {@.ja ExecutioncontextService の CORBA オブジェクト参照をセットする。
 ReturnCode_t setOwner(LightweightRTObject comp)
          Ownerコンポーネントをセットする。
 ReturnCode_t setPeriod(double period)
           
 ReturnCode_t setPeriod(TimeValue period)
           
 void setProperties(Properties props)
          Propertiesをセットする ExecutionContextProfile::properties をセットする。
 ReturnCode_t setRate(double rate)
          ExecutionContext の実行周期(Hz)を設定する {@.ja Active 状態にてRTコンポーネントが実行される周期(単位:Hz)を設定す る。
 void unlock()
          ExecutionContextProfileをアンロックする このオブジェクトが管理する RTC::ExecutionContextProfile をアンロッ クする。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

DEEFAULT_PERIOD

public static final double DEEFAULT_PERIOD
関連項目:
定数フィールド値
コンストラクタの詳細

ExecutionContextProfile

public ExecutionContextProfile(ExecutionKind kind)
デフォルトコンストラクタ

デフォルトコンストラクタ プロファイルに以下の項目を設定する。 - kind : PERIODIC - rate : 0.0


ExecutionContextProfile

public ExecutionContextProfile()
メソッドの詳細

setObjRef

public void setObjRef(ExecutionContextService ec_ptr)
CORBA オブジェクトの設定

ExecutioncontextService の CORBA オブジェクト参照をセットする。 セットされると、それまでセットされていたオブジェクト参照は releaseされる。セットするオブジェクト参照は有効な参照でなければ ならない。

パラメータ:
ec_ptr - ExecutionContextServiceのCORBAオブジェクト

getObjRef

public ExecutionContextService getObjRef()
CORBA オブジェクト参照の取得

本オブジェクトの ExecutioncontextService としての CORBA オブジェ クト参照を取得する。

戻り値:
CORBA オブジェクト参照

setRate

public ReturnCode_t setRate(double rate)
ExecutionContext の実行周期(Hz)を設定する

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

パラメータ:
rate - 処理周期(単位:Hz)
戻り値:
ReturnCode_t 型のリターンコード RTC_OK: 正常終了 BAD_PARAMETER: 設定値が負の値

setPeriod

public ReturnCode_t setPeriod(double period)

setPeriod

public ReturnCode_t setPeriod(TimeValue period)

getRate

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

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

戻り値:
処理周期(単位:Hz)

getPeriod

public TimeValue getPeriod()

getKindString

public final java.lang.String getKindString(ExecutionKind kind)
ExecutionKind を文字列化する

ExecutionKind で定義されている PERIODIC, EVENT_DRIVEN, OTHER を文字列化する。

パラメータ:
kind - ExecutionKind
戻り値:

getKindString

public final java.lang.String getKindString()

setKind

public ReturnCode_t setKind(ExecutionKind kind)
ExecutionKind を設定する

この ExecutionContext の ExecutionKind を設定する

パラメータ:
kind - ExecutionKind

getKind

public ExecutionKind getKind()
ExecutionKind を取得する

本 ExecutionContext の ExecutionKind を取得する

戻り値:
ExecutionKind

setOwner

public ReturnCode_t setOwner(LightweightRTObject comp)
Ownerコンポーネントをセットする。

このECのOwnerとなるRTCをセットする。

パラメータ:
comp - OwnerとなるRTコンポーネント
戻り値:
ReturnCode_t 型のリターンコード

getOwner

public final RTObject getOwner()
Ownerコンポーネントの参照を取得する

このECのOwnerであるRTCの参照を取得する。

戻り値:
OwnerRTコンポーネントの参照

addComponent

public ReturnCode_t addComponent(LightweightRTObject comp)
RTコンポーネントを追加する

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

パラメータ:
comp - 追加対象RTコンポーネント
戻り値:
ReturnCode_t 型のリターンコード

removeComponent

public ReturnCode_t removeComponent(LightweightRTObject comp)
RTコンポーネントを参加者リストから削除する

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

パラメータ:
comp - 削除対象RTコンポーネント
戻り値:
ReturnCode_t 型のリターンコード

getComponentList

public final RTObject[] getComponentList()
RTコンポーネントの参加者リストを取得する

現在登録されている参加者RTCのリストを取得する。この関数はコンポー ネントリストのメンバ変数への参照を返すので、リスト使用前に ExecutionContextProfile::lock() でロックし、リスト使用後は ExecutionContextProfile::unlock() でロックを開放しなければならな い。

戻り値:
参加者RTCのリスト

setProperties

public void setProperties(Properties props)
Propertiesをセットする

ExecutionContextProfile::properties をセットする。

パラメータ:
props - ExecutionContextProfile::properties にセットするプロパティー

getProperties

public final Properties getProperties()
Propertiesを取得する

ExecutionContextProfile::properties を取得する。

戻り値:
Propertiesに変換されたExecutionContextProfile::properties

getProfile

public ExecutionContextProfile getProfile()
Profileを取得する

RTC::ExecutionContextProfile を取得する。取得した ExecutionContextProfile の所有権は呼び出し側にある。取得されたオ ブジェクトが不要になった場合、呼び出し側が開放する責任を負う。

戻り値:
RTC::ExecutionContextProfile

lock

public void lock()
ExecutionContextProfileをロックする

このオブジェクトが管理する RTC::ExecutionContextProfile をロックする。 ロックが不要になった際にはunlock()でロックを解除しなければならない。


unlock

public void unlock()
ExecutionContextProfileをアンロックする

このオブジェクトが管理する RTC::ExecutionContextProfile をアンロッ クする。