|
OpenRTM-aist
1.2.2
|
#include <InPortBase.h>


公開メンバ関数 | |
| InPortBase (const char *name, const char *data_type) | |
| コンストラクタ [詳解] | |
| virtual | ~InPortBase (void) |
| デストラクタ [詳解] | |
| void | init (coil::Properties &prop) |
| プロパティの初期化 [詳解] | |
| virtual bool | read ()=0 |
| RTObject_impl::readAll()から呼ばれる仮想関数 [詳解] | |
| coil::Properties & | properties () |
| プロパティを取得する [詳解] | |
| const std::vector< InPortConnector * > & | connectors () |
| Connector を取得 [詳解] | |
| ConnectorInfoList | getConnectorProfiles () |
| ConnectorProfile を取得 [詳解] | |
| coil::vstring | getConnectorIds () |
| ConnectorId を取得 [詳解] | |
| coil::vstring | getConnectorNames () |
| Connectorの名前を取得 [詳解] | |
| InPortConnector * | getConnectorById (const char *id) |
| ConnectorProfileをIDで取得 [詳解] | |
| InPortConnector * | getConnectorByName (const char *name) |
| ConnectorProfileを名前で取得 [詳解] | |
| bool | getConnectorProfileById (const char *id, ConnectorInfo &prof) |
| ConnectorProfileをIDで取得 [詳解] | |
| bool | getConnectorProfileByName (const char *name, ConnectorInfo &prof) |
| ConnectorProfileを名前で取得 [詳解] | |
| virtual void | activateInterfaces () |
| InPortを activates する [詳解] | |
| virtual void | deactivateInterfaces () |
| 全ての Port のインターフェースを deactivates する [詳解] | |
| void | addConnectorDataListener (ConnectorDataListenerType listener_type, ConnectorDataListener *listener, bool autoclean=true) |
| ConnectorDataListener リスナを追加する [詳解] | |
| void | removeConnectorDataListener (ConnectorDataListenerType listener_type, ConnectorDataListener *listener) |
| ConnectorDataListener リスナを削除する [詳解] | |
| void | addConnectorListener (ConnectorListenerType callback_type, ConnectorListener *listener, bool autoclean=true) |
| ConnectorListener リスナを追加する [詳解] | |
| void | removeConnectorListener (ConnectorListenerType callback_type, ConnectorListener *listener) |
| ConnectorDataListener リスナを削除する [詳解] | |
| bool | isLittleEndian () |
| endian 設定を返す [詳解] | |
| virtual ReturnCode_t | connect (ConnectorProfile &connector_profile) throw (CORBA::SystemException) |
| [CORBA interface] Port の接続を行う [詳解] | |
| virtual ConnectorListeners & | getListeners () |
| リスナホルダを取得する [詳解] | |
| virtual ReturnCode_t | notify_connect (ConnectorProfile &connector_profile) throw (CORBA::SystemException) |
| [CORBA interface] Port の接続通知を行う [詳解] | |
基底クラス RTC::PortBase に属する継承公開メンバ関数 | |
| PortBase (const char *name="") | |
| コンストラクタ [詳解] | |
| virtual | ~PortBase (void) |
| デストラクタ [詳解] | |
| virtual PortProfile * | get_port_profile () throw (CORBA::SystemException) |
| [CORBA interface] PortProfileを取得する [詳解] | |
| const PortProfile & | getPortProfile () const |
| PortProfile を取得する。 [詳解] | |
| virtual ConnectorProfileList * | get_connector_profiles () throw (CORBA::SystemException) |
| [CORBA interface] ConnectorProfileListを取得する [詳解] | |
| virtual ConnectorProfile * | get_connector_profile (const char *connector_id) throw (CORBA::SystemException) |
| [CORBA interface] ConnectorProfile を取得する [詳解] | |
| virtual ReturnCode_t | disconnect (const char *connector_id) throw (CORBA::SystemException) |
| [CORBA interface] Port の接続を解除する [詳解] | |
| virtual ReturnCode_t | notify_disconnect (const char *connector_id) throw (CORBA::SystemException) |
| [CORBA interface] Port の接続解除通知を行う [詳解] | |
| virtual ReturnCode_t | disconnect_all () throw (CORBA::SystemException) |
| [CORBA interface] Port の全接続を解除する [詳解] | |
| void | setName (const char *name) |
| Port の名前を設定する [詳解] | |
| const char * | getName () const |
| Port の名前を取得する [詳解] | |
| const PortProfile & | getProfile () const |
| PortProfileを取得する [詳解] | |
| void | setPortRef (PortService_ptr port_ref) |
| Port のオブジェクト参照を設定する [詳解] | |
| PortService_ptr | getPortRef () const |
| Port のオブジェクト参照を取得する [詳解] | |
| void | setOwner (RTObject_ptr owner) |
| Port の owner の RTObject を指定する [詳解] | |
| void | setOnPublishInterfaces (ConnectionCallback *on_publish) |
| インターフェースを公開する際に呼ばれるコールバックをセットする [詳解] | |
| void | setOnSubscribeInterfaces (ConnectionCallback *on_subscribe) |
| インターフェースを取得する際に呼ばれるコールバックをセットする [詳解] | |
| void | setOnConnected (ConnectionCallback *on_connected) |
| 接続完了時に呼ばれるコールバックをセットする [詳解] | |
| void | setOnUnsubscribeInterfaces (ConnectionCallback *on_subscribe) |
| インターフェースを解放する際に呼ばれるコールバックをセットする [詳解] | |
| void | setOnDisconnected (ConnectionCallback *on_disconnected) |
| 接続解除に呼ばれるコールバックをセットする [詳解] | |
| void | setOnConnectionLost (ConnectionCallback *on_connection_lost) |
| ポートの接続がロストした場合に呼び出されるコールバックをセットする [詳解] | |
| void | setPortConnectListenerHolder (PortConnectListeners *portconnListeners) |
| PortConnectListeners のホルダをセットする [詳解] | |
| virtual DirectPortBase * | getDirectPort () |
| direct通信用ポートオブジェクト取得 [詳解] | |
公開変数類 | |
| DATAPORTSTATUS_ENUM typedef std::vector< InPortConnector * > | ConnectorList |
限定公開メンバ関数 | |
| virtual ReturnCode_t | publishInterfaces (ConnectorProfile &connector_profile) |
| Interface情報を公開する [詳解] | |
| virtual ReturnCode_t | subscribeInterfaces (const ConnectorProfile &connector_profile) |
| Interfaceに接続する [詳解] | |
| virtual void | unsubscribeInterfaces (const ConnectorProfile &connector_profile) |
| Interfaceへの接続を解除する [詳解] | |
| void | initProviders () |
| InPort provider の初期化 [詳解] | |
| void | initConsumers () |
| OutPort consumer の初期化 [詳解] | |
| bool | checkEndian (const coil::Properties &prop, bool &littleEndian) |
| InPortProvider * | createProvider (ConnectorProfile &cprof, coil::Properties &prop) |
| InPort provider の生成 [詳解] | |
| OutPortConsumer * | createConsumer (const ConnectorProfile &cprof, coil::Properties &prop) |
| OutPort consumer の生成 [詳解] | |
| InPortConnector * | createConnector (ConnectorProfile &cprof, coil::Properties &prop, InPortProvider *provider) |
| InPortPushConnector の生成 [詳解] | |
| InPortConnector * | createConnector (const ConnectorProfile &cprof, coil::Properties &prop, OutPortConsumer *consumer) |
| InPortPullConnector の生成 [詳解] | |
| OutPortBase * | getLocalOutPort (const ConnectorInfo &profile) |
| ローカルのピアOutPortを取得 [詳解] | |
基底クラス RTC::PortBase に属する継承限定公開メンバ関数 | |
| virtual ReturnCode_t | connectNext (ConnectorProfile &connector_profile) |
| 次の Port に対して notify_connect() をコールする [詳解] | |
| virtual ReturnCode_t | disconnectNext (ConnectorProfile &connector_profile) |
| 次の Port に対して notify_disconnect() をコールする [詳解] | |
| virtual void | setConnectionLimit (int limit_value) |
| 接続の最大数を設定する。 [詳解] | |
| virtual ReturnCode_t | _publishInterfaces (void) |
| 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 値を追加する [詳解] | |
| void | appendProperty (const char *key, const char *value) |
| PortProfile の properties に NameValue 値を要素に追加する [詳解] | |
| void | updateConnectors () |
| 存在しないポートをdisconnectする。 [詳解] | |
| bool | checkPorts (::RTC::PortServiceList &ports) |
| ポートの存在を確認する。 [詳解] | |
| void | onNotifyConnect (const char *portname, RTC::ConnectorProfile &profile) |
| void | onNotifyDisconnect (const char *portname, RTC::ConnectorProfile &profile) |
| void | onUnsubscribeInterfaces (const char *portname, RTC::ConnectorProfile &profile) |
| void | onPublishInterfaces (const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret) |
| void | onConnectNextport (const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret) |
| void | onSubscribeInterfaces (const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret) |
| void | onConnected (const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret) |
| void | onDisconnectNextport (const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret) |
| void | onDisconnected (const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret) |
その他の継承メンバ | |
基底クラス RTC::DataPortStatus に属する継承公開型 | |
| enum | Enum { PORT_OK = 0, PORT_ERROR, BUFFER_ERROR, BUFFER_FULL, BUFFER_EMPTY, BUFFER_TIMEOUT, SEND_FULL, SEND_TIMEOUT, RECV_EMPTY, RECV_TIMEOUT, INVALID_ARGS, PRECONDITION_NOT_MET, CONNECTION_LOST, UNKNOWN_ERROR } |
基底クラス RTC::DataPortStatus に属する継承静的公開メンバ関数 | |
| static const char * | toString (DataPortStatus::Enum status) |
| DataPortStatus リターンコードを文字列に変換 [詳解] | |
基底クラス RTC::PortBase に属する継承限定公開型 | |
| typedef coil::Guard< coil::Mutex > | Guard |
| RTC::InPortBase::InPortBase | ( | const char * | name, |
| const char * | data_type | ||
| ) |
コンストラクタ
コンストラクタ
| name | ポート名称 |
| data_type | データタイプ |
|
virtual |
デストラクタ
デストラクタ
|
virtual |
| void RTC::InPortBase::addConnectorDataListener | ( | ConnectorDataListenerType | listener_type, |
| ConnectorDataListener * | listener, | ||
| bool | autoclean = true |
||
| ) |
ConnectorDataListener リスナを追加する
バッファ書き込みまたは読み出しイベントに関連する各種リスナを設定する。
設定できるリスナのタイプとコールバックイベントは以下の通り
リスナは ConnectorDataListener を継承し、以下のシグニチャを持つ operator() を実装している必要がある。
ConnectorDataListener:: operator()(const ConnectorProfile&, const cdrStream&)
デフォルトでは、この関数に与えたリスナオブジェクトの所有権は OutPortに移り、OutPort解体時もしくは、 removeConnectorDataListener() により削除時に自動的に解体される。 リスナオブジェクトの所有権を呼び出し側で維持したい場合は、第3引 数に false を指定し、自動的な解体を抑制することができる。
| listener_type | リスナタイプ |
| listener | リスナオブジェクトへのポインタ |
| autoclean | リスナオブジェクトの自動的解体を行うかどうかのフラグ |
| void RTC::InPortBase::addConnectorListener | ( | ConnectorListenerType | callback_type, |
| ConnectorListener * | listener, | ||
| bool | autoclean = true |
||
| ) |
ConnectorListener リスナを追加する
バッファ書き込みまたは読み出しイベントに関連する各種リスナを設定する。
設定できるリスナのタイプは
リスナは以下のシグニチャを持つ operator() を実装している必要がある。
ConnectorListener::operator()(const ConnectorProfile&)
デフォルトでは、この関数に与えたリスナオブジェクトの所有権は OutPortに移り、OutPort解体時もしくは、 removeConnectorListener() により削除時に自動的に解体される。 リスナオブジェクトの所有権を呼び出し側で維持したい場合は、第3引 数に false を指定し、自動的な解体を抑制することができる。
| listener_type | リスナタイプ |
| listener | リスナオブジェクトへのポインタ |
| autoclean | リスナオブジェクトの自動的解体を行うかどうかのフラグ |
|
protected |
@if jp @brief シリアライザのエンディアンをチェックする 与えられたプロパティに設定されている、データのシリアライザのエン ディアン指定をチェックする。正しいエンディアン指定がなされていれ ば、true を返し、引数 littleEndian に、設定値がリトルエンディア ンであれば true が、ビッグエンディアンであれば false が返される。 @param prop チェックするプロパティ @param littleEndian エンディアン情報(true:little,false:big) @return true:"serializer"キーが存在しない または 存在していて内容がある。
,false:"serializer"キーが存在しているが内容が空 または 存在しているが内容が"little","big" 以外。
@else @brief Checking endian flag of serializer This operation checks endian flag of data serializer that is specified properties. If valid specification is found, this operation returns true and set argument littleEndian. True means little endian, false means big endian. @param prop Properties @param littleEndian Endian Information(true:little,false:big) @return true:"Serializer" key doesn't exist. or "Serializer" key exists and there is a content. false:There is no content though "Serializer" key exists. or ithe content is not "Little. " though "Serializer" key exists. or The content is not "little" or "big" though "Serializer" key exists. @endif
|
virtual | ||||||||||||||
[CORBA interface] Port の接続を行う
与えられた ConnectoionProfile の情報に基づき、Port間の接続を確立 する。この関数は主にアプリケーションプログラムやツールから呼び出 すことを前提としている。
| connector_profile | ConnectorProfile |
RTC::PortBaseを再実装しています。
| const std::vector<InPortConnector*>& RTC::InPortBase::connectors | ( | ) |
Connector を取得
現在所有しているコネクタを取得する。
|
protected |
Connector を生成し、生成が成功すれば m_connectors に保存する。 生成に失敗した場合 0 を返す。
|
protected |
Connector を生成し、生成が成功すれば m_connectors に保存する。 生成に失敗した場合 0 を返す。
|
protected |
OutPort consumer の生成
OutPortConsumer を生成する。 生成に失敗した場合 0 を返す。
|
protected |
InPort provider の生成
InPortProvider を生成し、情報を ConnectorProfile に公開する。 生成に失敗した場合 0 を返す。
|
virtual |
| InPortConnector* RTC::InPortBase::getConnectorById | ( | const char * | id | ) |
ConnectorProfileをIDで取得
現在所有しているコネクタをIDで取得する。
| id | Connector ID |
| InPortConnector* RTC::InPortBase::getConnectorByName | ( | const char * | name | ) |
ConnectorProfileを名前で取得
現在所有しているコネクタを名前で取得する。
| name | Connector name |
| coil::vstring RTC::InPortBase::getConnectorIds | ( | ) |
ConnectorId を取得
現在所有しているコネクタのIDを取得する。
| coil::vstring RTC::InPortBase::getConnectorNames | ( | ) |
Connectorの名前を取得
現在所有しているコネクタの名前を取得する。
| bool RTC::InPortBase::getConnectorProfileById | ( | const char * | id, |
| ConnectorInfo & | prof | ||
| ) |
ConnectorProfileをIDで取得
現在所有しているコネクタをIDで取得する。
| id | Connector ID |
| prof | ConnectorProfile |
| bool RTC::InPortBase::getConnectorProfileByName | ( | const char * | name, |
| ConnectorInfo & | prof | ||
| ) |
ConnectorProfileを名前で取得
現在所有しているコネクタを名前で取得する。
| name | Connector name |
| prof | ConnectorProfile |
| ConnectorInfoList RTC::InPortBase::getConnectorProfiles | ( | ) |
ConnectorProfile を取得
現在所有しているコネクタのProfileを取得する。
|
virtual |
|
protected |
ローカルのピアOutPortを取得
| void RTC::InPortBase::init | ( | coil::Properties & | prop | ) |
プロパティの初期化
指定されたプロパティで初期化する。
| prop | 設定するプロパティ |
|
protected |
OutPort consumer の初期化
|
protected |
InPort provider の初期化
| bool RTC::InPortBase::isLittleEndian | ( | ) |
endian 設定を返す
endian 設定のbool値を返す。
|
virtual | ||||||||||||||
[CORBA interface] Port の接続通知を行う
このオペレーションは、Port間の接続が行われる際に、Port間で内部的 に呼ばれるオペレーションであって、通常アプリケーションプログラム や、Port以外のRTC関連オブジェクト等から呼び出されることは想定さ れていない。
notify_connect() 自体はテンプレートメソッドパターンとして、サブ クラスで実装されることが前提の publishInterfaces(), subscribeInterfaces() の2つの関数を内部で呼び出す。処理の手順は 以下の通りである。
notify_connect() は ConnectorProfile::ports に格納されている Port の順序に従って、カスケード状に呼び出しを行うことにより、イ ンターフェース情報の公開と取得を関連すすべてのポートに対して行う。 このカスケード呼び出しは途中で中断されることはなく、必ず ConnectorProfile::ports に格納されている全ポートに対して行われる。
| connector_profile | ConnectorProfile |
RTC::PortBaseを再実装しています。
| coil::Properties& RTC::InPortBase::properties | ( | ) |
プロパティを取得する
ポートのプロパティを取得する。
|
protectedvirtual |
Interface情報を公開する
Interface情報を公開する。 引数の ConnectorProfile に格納されている dataflow_type が push 型 の場合は、指定された interface_type の InPortProvider に関する情報 を ConnectorProfile::properties に書込み呼び出し側に戻す。
dataport.dataflow_type
| connector_profile | コネクタプロファイル |
RTC::PortBaseを実装しています。
|
pure virtual |
RTObject_impl::readAll()から呼ばれる仮想関数
DataPort からデータを読み出す
RTC::InPort< DataType >で実装されています。
| void RTC::InPortBase::removeConnectorDataListener | ( | ConnectorDataListenerType | listener_type, |
| ConnectorDataListener * | listener | ||
| ) |
| void RTC::InPortBase::removeConnectorListener | ( | ConnectorListenerType | callback_type, |
| ConnectorListener * | listener | ||
| ) |
|
protectedvirtual |
Interfaceに接続する
Interfaceに接続する。 Portが所有するConsumerに適合するProviderに関する情報を ConnectorProfile::properties から抽出し、 ConsumerにCORBAオブジェクト参照を設定する。
| connector_profile | コネクタ・プロファイル |
RTC::PortBaseを実装しています。
|
protectedvirtual |
Interfaceへの接続を解除する
Interfaceへの接続を解除する。 与えられたConnectorProfileに関連するConsumerに設定された全てのObjectを 解放し接続を解除する。
| connector_profile | コネクタ・プロファイル |
RTC::PortBaseを実装しています。
| DATAPORTSTATUS_ENUM typedef std::vector<InPortConnector*> RTC::InPortBase::ConnectorList |
|
protected |
|
protected |
利用可能consumer
|
protected |
|
protected |
接続エンディアン
|
protected |
利用可能provider
|
protected |
バッファモード
true:single buffer mode. false:multi buffer mode.
|
protected |
バッファ
1.8.17