#include <PortBase.h>
RTC::PortBaseに対する継承グラフ
Public メソッド | |
PortBase (const char *name="") | |
コンストラクタ | |
virtual | ~PortBase () |
デストラクタ | |
virtual PortProfile * | get_port_profile () |
[CORBA interface] PortProfileを取得する | |
const PortProfile & | getPortProfile () const |
virtual ConnectorProfileList * | get_connector_profiles () |
[CORBA interface] ConnectorProfileListを取得する | |
virtual ConnectorProfile * | get_connector_profile (const char *connector_id) |
[CORBA interface] ConnectorProfile を取得する | |
virtual ReturnCode_t | connect (ConnectorProfile &connector_profile) |
[CORBA interface] Port の接続を行う | |
virtual ReturnCode_t | notify_connect (ConnectorProfile &connector_profile) |
[CORBA interface] Port の接続通知を行う | |
virtual ReturnCode_t | disconnect (const char *connector_id) |
[CORBA interface] Port の接続を解除する | |
virtual ReturnCode_t | notify_disconnect (const char *connector_id) |
[CORBA interface] Port の接続解除通知を行う | |
virtual ReturnCode_t | disconnect_all () |
[CORBA interface] Port の全接続を解除する | |
void | setName (const char *name) |
Port の名前を設定する. | |
const PortProfile & | getProfile () const |
PortProfileを取得する. | |
void | setPortRef (Port_ptr port_ref) |
Port のオブジェクト参照を設定する. | |
Port_ptr | getPortRef () |
Port のオブジェクト参照を取得する. | |
void | setOwner (RTObject_ptr owner) |
Port の owner の RTObject を指定する. | |
Protected 型 | |
typedef ACE_Guard< ACE_Recursive_Thread_Mutex > | Guard |
Protected メソッド | |
virtual ReturnCode_t | publishInterfaces (ConnectorProfile &connector_profile)=0 |
Interface 情報を公開する. | |
virtual ReturnCode_t | connectNext (ConnectorProfile &connector_profile) |
次の Port に対して notify_connect() をコールする | |
virtual ReturnCode_t | disconnectNext (ConnectorProfile &connector_profile) |
次の Port に対して notify_disconnect() をコールする | |
virtual ReturnCode_t | subscribeInterfaces (const ConnectorProfile &connector_profile)=0 |
Interface 情報を取得する. | |
virtual void | unsubscribeInterfaces (const ConnectorProfile &connector_profile)=0 |
Interface の接続を解除する. | |
bool | isEmptyId (const ConnectorProfile &connector_profile) const |
ConnectorProfile の connector_id フィールドが空かどうか判定. | |
const std::string | getUUID () const |
UUIDを生成する. | |
void | setUUID (ConnectorProfile &connector_profile) const |
UUIDを生成し ConnectorProfile にセットする. | |
bool | isExistingConnId (const char *id) |
id が既存の ConnectorProfile のものかどうか判定する | |
ConnectorProfile | findConnProfile (const char *id) |
id を持つ ConnectorProfile を探す | |
CORBA::Long | findConnProfileIndex (const char *id) |
id を持つ ConnectorProfile を探す | |
void | updateConnectorProfile (const ConnectorProfile &connector_profile) |
ConnectorProfile の追加もしくは更新. | |
bool | eraseConnectorProfile (const char *id) |
ConnectorProfile を削除する. | |
bool | appendInterface (const char *name, const char *type_name, PortInterfacePolarity pol) |
PortInterfaceProfile に インターフェースを登録する. | |
bool | deleteInterface (const char *name, PortInterfacePolarity pol) |
PortInterfaceProfile からインターフェース登録を削除する. | |
template<class ValueType> | |
void | addProperty (const char *key, ValueType value) |
PortProfile の properties に NameValue 値を追加する. | |
Protected 変数 | |
PortProfile | m_profile |
Port の PortProfile. | |
RTC::Port_var | m_objref |
ACE_Recursive_Thread_Mutex | m_profile_mutex |
構成 | |
struct | connect_func |
Port の接続を行う Functor. [詳細] | |
struct | disconnect_all_func |
Port の全接続解除を行う Functor. [詳細] | |
struct | disconnect_func |
Port の接続解除を行う Functor. [詳細] | |
struct | find_conn_id |
id を持つ ConnectorProfile を探す Functor [詳細] | |
struct | find_interface |
name と polarity から interface を探す Functor [詳細] | |
struct | find_port_ref |
コンストラクタ引数 port_ref と同じオブジェクト参照を探す Functor [詳細] | |
struct | if_name |
instance_name を持つ PortInterfaceProfile を探す Functor [詳細] |
RTC::Port の基底となるクラス。 RTC::Port はほぼ UML Port の概念を継承しており、ほぼ同等のものとみなす ことができる。RT コンポーネントのコンセプトにおいては、 Port はコンポーネントに付属し、コンポーネントが他のコンポーネントと相互作用 を行う接点であり、通常幾つかのインターフェースと関連付けられる。 コンポーネントは Port を通して外部に対しインターフェースを提供または要求 することができ、Portはその接続を管理する役割を担う。
Port の具象クラスは、通常 RT コンポーネントインスタンス生成時に同時に 生成され、提供・要求インターフェースを登録した後、RT コンポーネントに 登録され、外部からアクセス可能な Port として機能することを想定している。
RTC::Port は CORBA インターフェースとして以下のオペレーションを提供する。
このクラスでは、これらのオペレーションの実装を提供する。
これらのオペレーションのうち、get_port_profile(), get_connector_profiles(), get_connector_profile(), connect(), disconnect(), disconnect_all() は、 サブクラスにおいて特に振る舞いを変更する必要がないため、オーバーライド することは推奨されない。
notify_connect(), notify_disconnect() については、サブクラスが提供・要求 するインターフェースの種類に応じて、振る舞いを変更する必要が生ずる かもしれないが、これらを直接オーバーライドすることは推奨されず、 後述の notify_connect(), notify_disconnect() の項においても述べられる通り これらの関数に関連した protected 関数をオーバーライドすることにより 振る舞いを変更することが推奨される。
|
|
|
コンストラクタ PortBase のコンストラクタは Port 名 name を引数に取り初期化を行う と同時に、自分自身を CORBA Object として活性化し、自身の PortProfile の port_ref に自身のオブジェクトリファレンスを格納する。
|
|
デストラクタ
|
|
PortProfile の properties に NameValue 値を追加する.
|
|
PortInterfaceProfile に インターフェースを登録する. このオペレーションは Port が持つ PortProfile の、PortInterfaceProfile にインターフェースの情報を追加する。 この情報は、get_port_profile() 似よって得られる PortProfile のうち PortInterfaceProfile の値を変更するのみであり、実際にインターフェースを 提供したり要求したりする場合には、サブクラスで、publishInterface(), subscribeInterface() 等の関数を適切にオーバーライドしインターフェースの 提供、要求処理を行わなければならない。 インターフェース(のインスタンス)名は Port 内で一意でなければならない。 同名のインターフェースがすでに登録されている場合、この関数は false を 返す。
|
|
[CORBA interface] Port の接続を行う 与えられた ConnectoionProfile にしたがって、Port間の接続を確立する。 アプリケーションプログラム側は、幾つかのコンポーネントが持つ複数の Port を接続したい場合、適切な値をセットした ConnectorProfile を connect() の引数として与えてコールすることにより、関連する Port の 接続を確立する。 connect() に与える ConnectorProfile のメンバーのうち、name, ports, (properties) メンバーに対してデータをセットしなければならない。
|
|
次の Port に対して notify_connect() をコールする ConnectorProfile の port_ref 内に格納されている Port のオブジェクト リファレンスのシーケンスの中から、自身の Port の次の Port に対して notify_connect() をコールする。
|
|
PortInterfaceProfile からインターフェース登録を削除する. このオペレーションは Port が持つ PortProfile の、PortInterfaceProfile からインターフェースの情報を削除する。
|
|
[CORBA interface] Port の接続を解除する このオペレーションは接続確立時に接続に対して与えられる connector_id に 対応するピア Port との接続を解除する。
|
|
[CORBA interface] Port の全接続を解除する このオペレーションはこの Port に関連した全ての接続を解除する。
|
|
次の Port に対して notify_disconnect() をコールする ConnectorProfile の port_ref 内に格納されている Port のオブジェクト リファレンスのシーケンスの中から、自身の Port の次の Port に対して notify_disconnect() をコールする。
|
|
ConnectorProfile を削除する. このオペレーションは Port の PortProfile が保持している ConnectorProfileList のうち与えられた id を持つ ConnectorProfile を削除する。
|
|
id を持つ ConnectorProfile を探す このオペレーションは与えられた ID を持つ ConnectorProfile を Port が もつ ConnectorProfile のリスト中から探す。 もし、同一の id を持つ ConnectorProfile がなければ、空の ConnectorProfile が返される。
|
|
id を持つ ConnectorProfile を探す このオペレーションは与えられた ID を持つ ConnectorProfile を Port が もつ ConnectorProfile のリスト中から探しインデックスを返す。 もし、同一の id を持つ ConnectorProfile がなければ、-1 を返す。
|
|
[CORBA interface] ConnectorProfile を取得する connector_id で指定された ConnectorProfile を返す。
|
|
[CORBA interface] ConnectorProfileListを取得する Portが保持する ConnectorProfile の sequence を返す。 ConnectorProfile は Port 間の接続プロファイル情報を保持する構造体であり、 接続時にPort間で情報交換を行い、関連するすべての Port で同一の値が 保持される。 ConnectorProfile は以下のメンバーを保持している。
|
|
[CORBA interface] PortProfileを取得する Portが保持するPortProfileを返す。 PortProfile 構造体は以下のメンバーを持つ。
|
|
|
|
Port のオブジェクト参照を取得する. このオペレーションは Port の PortProfile が保持している この Port 自身のオブジェクト参照を取得する。
|
|
PortProfileを取得する. Portが保持する PortProfile の const 参照を返す。
|
|
UUIDを生成する. このオペレーションは UUID を生成する。
|
|
ConnectorProfile の connector_id フィールドが空かどうか判定.
|
|
id が既存の ConnectorProfile のものかどうか判定する このオペレーションは与えられた ID が既存の ConnectorProfile のリスト中に 存在するかどうか判定する。
|
|
[CORBA interface] Port の接続通知を行う このオペレーションは、Port間の接続が行われる際に、Port間で内部的に 呼ばれるオペレーションである。
|
|
[CORBA interface] Port の接続解除通知を行う このオペレーションは、Port間の接続解除が行われる際に、Port間で内部的に 呼ばれるオペレーションである。
|
|
Interface 情報を公開する. このオペレーションは、notify_connect() 処理シーケンスの始めにコール される純粋仮想関数である。 notify_connect() では、
の順に protected 関数がコールされ接続処理が行われる。
RTC::CorbaPort, RTC::DataInPort, と RTC::DataOutPortで実装されています. |
|
Port の名前を設定する. Port の名前を設定する。この名前は Port が保持する PortProfile.name に反映される。
|
|
Port の owner の RTObject を指定する. このオペレーションは Port の PortProfile.owner を設定する。
|
|
Port のオブジェクト参照を設定する. このオペレーションは Port の PortProfile にこの Port 自身の オブジェクト参照を設定する。
|
|
UUIDを生成し ConnectorProfile にセットする. このオペレーションは UUID を生成し、ConnectorProfile にセットする。
|
|
Interface 情報を取得する. このオペレーションは、notify_connect() 処理シーケンスの中間にコール される純粋仮想関数である。 notify_connect() では、
の順に protected 関数がコールされ接続処理が行われる。
RTC::CorbaPort, RTC::DataInPort, と RTC::DataOutPortで実装されています. |
|
Interface の接続を解除する. このオペレーションは、notify_disconnect() 処理シーケンスの終わりにコール される純粋仮想関数である。 notify_disconnect() では、
RTC::CorbaPort, RTC::DataInPort, と RTC::DataOutPortで実装されています. |
|
ConnectorProfile の追加もしくは更新. このオペレーションは与えられた与えられた ConnectorProfile を Port に追加もしくは更新保存する。 与えられた ConnectorProfile の connector_id と同じ ID を持つ ConnectorProfile がリストになければ、リストに追加し、 同じ ID が存在すれば ConnectorProfile を上書き保存する。
|
|
|
|
Port の PortProfile.
|
|
|