OpenRTM-aist 2.0.2
読み取り中…
検索中…
一致する文字列を見つけられません
RTC::EventInPort< FsmType > クラステンプレート

EventInPort テンプレートクラス [詳解]

#include <EventPort.h>

RTC::EventInPort< FsmType > の継承関係図
RTC::EventInPort< FsmType > 連携図

公開メンバ関数

 EventInPort (const char *name, FsmType &fsm)
 コンストラクタ
 
 ~EventInPort () override
 デストラクタ
 
virtual const char * name ()
 ポート名称を取得する。
 
void init (coil::Properties &prop) override
 プロパティの初期化
 
template<class TOP , class R , class P0 >
void bindEvent (const char *name, R(TOP::*handler)(P0))
 
template<typename TOP , class R >
void bindEvent (const char *name, R(TOP::*handler)())
 
bool read (std::string="") override
 RTObject_impl::readAll()から呼ばれる仮想関数
 
- 基底クラス RTC::InPortBase に属する継承公開メンバ関数
 InPortBase (const char *name, const char *data_type)
 コンストラクタ
 
 ~InPortBase () override
 デストラクタ
 
coil::Properties & properties ()
 プロパティを取得する
 
const std::vector< InPortConnector * > & connectors ()
 Connector を取得
 
ConnectorInfoList getConnectorProfiles ()
 ConnectorProfile を取得
 
coil::vstring getConnectorIds ()
 ConnectorId を取得
 
coil::vstring getConnectorNames ()
 Connectorの名前を取得
 
InPortConnectorgetConnectorById (const char *id)
 ConnectorProfileをIDで取得
 
InPortConnectorgetConnectorByName (const char *name)
 ConnectorProfileを名前で取得
 
bool getConnectorProfileById (const char *id, ConnectorInfo &prof)
 ConnectorProfileをIDで取得
 
bool getConnectorProfileByName (const char *name, ConnectorInfo &prof)
 ConnectorProfileを名前で取得
 
void activateInterfaces () override
 InPortを activates する
 
void deactivateInterfaces () override
 全ての Port のインターフェースを deactivates する
 
void addConnectorDataListener (ConnectorDataListenerType type, ConnectorDataListener *listener, bool autoclean=true)
 ConnectorDataListener リスナを追加する
 
void removeConnectorDataListener (ConnectorDataListenerType type, ConnectorDataListener *listener)
 ConnectorDataListener リスナを削除する
 
void addConnectorListener (ConnectorListenerType type, ConnectorListener *listener, bool autoclean=true)
 ConnectorListener リスナを追加する
 
void removeConnectorListener (ConnectorListenerType type, ConnectorListener *listener)
 ConnectorDataListener リスナを削除する
 
bool isLittleEndian ()
 endian 設定を返す
 
ReturnCode_t connect (ConnectorProfile &connector_profile) override
 [CORBA interface] Port の接続を行う
 
virtual ConnectorListenersBasegetListeners ()
 リスナホルダを取得する
 
ReturnCode_t notify_connect (ConnectorProfile &connector_profile) override
 
- 基底クラス RTC::PortBase に属する継承公開メンバ関数
 PortBase (const char *name="")
 コンストラクタ
 
 ~PortBase () override
 デストラクタ
 
PortProfile * get_port_profile () override
 [CORBA interface] PortProfileを取得する
 
const PortProfile & getPortProfile () const
 PortProfile を取得する。
 
ConnectorProfileList * get_connector_profiles () override
 [CORBA interface] ConnectorProfileListを取得する
 
ConnectorProfile * get_connector_profile (const char *connector_id) override
 [CORBA interface] ConnectorProfile を取得する
 
ReturnCode_t connect (ConnectorProfile &connector_profile) override
 [CORBA interface] Port の接続を行う
 
ReturnCode_t notify_connect (ConnectorProfile &connector_profile) override
 [CORBA interface] Port の接続通知を行う
 
ReturnCode_t disconnect (const char *connector_id) override
 [CORBA interface] Port の接続を解除する
 
ReturnCode_t notify_disconnect (const char *connector_id) override
 [CORBA interface] Port の接続解除通知を行う
 
ReturnCode_t disconnect_all () override
 [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_unsubscribe)
 インターフェースを解放する際に呼ばれるコールバックをセットする
 
void setOnDisconnected (ConnectionCallback *on_disconnected)
 接続解除に呼ばれるコールバックをセットする
 
void setOnConnectionLost (ConnectionCallback *on_connection_lost)
 ポートの接続がロストした場合に呼び出されるコールバックをセットする
 
void setPortConnectListenerHolder (PortConnectListeners *portconnListeners)
 PortConnectListeners のホルダをセットする
 
virtual DirectPortBasegetDirectPort ()
 direct通信用ポートオブジェクト取得
 

その他の継承メンバ

- 基底クラス RTC::InPortBase に属する継承公開型
using ConnectorList = std::vector<InPortConnector*>
 
- 基底クラス RTC::InPortBase に属する継承限定公開メンバ関数
ReturnCode_t publishInterfaces (ConnectorProfile &cprof) override
 Interface情報を公開する
 
ReturnCode_t subscribeInterfaces (const ConnectorProfile &cprof) override
 Interfaceに接続する
 
void unsubscribeInterfaces (const ConnectorProfile &connector_profile) override
 Interfaceへの接続を解除する
 
void initProviders ()
 InPort provider の初期化
 
void initConsumers ()
 OutPort consumer の初期化
 
bool checkEndian (const coil::Properties &prop, bool &littleEndian)
 シリアライザのエンディアンをチェックする
 
InPortProvidercreateProvider (ConnectorProfile &cprof, coil::Properties &prop)
 InPort provider の生成
 
OutPortConsumercreateConsumer (const ConnectorProfile &cprof, coil::Properties &prop)
 OutPort consumer の生成
 
InPortConnectorcreateConnector (ConnectorProfile &cprof, coil::Properties &prop, InPortProvider *provider)
 InPortPushConnector の生成
 
InPortConnectorcreateConnector (const ConnectorProfile &cprof, coil::Properties &prop, OutPortConsumer *consumer)
 InPortPullConnector の生成
 
OutPortBasegetLocalOutPort (const ConnectorInfo &profile)
 ローカルのピアOutPortを取得
 
virtual void initConnectorListeners ()
 コネクタリスナの初期化
 
- 基底クラス RTC::PortBase に属する継承限定公開メンバ関数
virtual ReturnCode_t connectNext (ConnectorProfile &connector_profile)
 次の Port に対して notify_connect() をコールする
 
virtual ReturnCode_t disconnectNext (ConnectorProfile &cprof)
 次の Port に対して notify_disconnect() をコールする
 
virtual void setConnectionLimit (int limit_value)
 接続の最大数を設定する。
 
virtual ReturnCode_t _publishInterfaces ()
 Interface情報を公開する
 
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 *instance_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)
 
bool isExistingMarshalingType (coil::Properties &con_prop)
 指定のシリアライザが使用可能かを判定する
 
- 基底クラス RTC::PortBase に属する継承静的限定公開メンバ関数
static bool isEmptyId (const ConnectorProfile &connector_profile)
 ConnectorProfile の connector_id フィールドが空かどうか判定
 
static std::string getUUID ()
 UUIDを生成する
 
static void setUUID (ConnectorProfile &connector_profile)
 UUIDを生成し ConnectorProfile にセットする
 
- 基底クラス RTC::InPortBase に属する継承限定公開変数類
bool m_singlebuffer
 バッファモード
 
CdrBufferBasem_thebuffer
 バッファ
 
coil::vstring m_providerTypes
 利用可能provider
 
coil::vstring m_consumerTypes
 利用可能consumer
 
ConnectorList m_connectors
 接続リスト
 
bool m_littleEndian
 接続エンディアン
 
ConnectorListenersBasem_listeners
 ConnectorDataListener リスナ
 
- 基底クラス RTC::PortBase に属する継承限定公開変数類
coil::Properties m_properties
 プロパティ
 
Logger rtclog
 ロガーストリーム
 
PortProfile m_profile
 Port の PortProfile
 
RTC::PortService_var m_objref
 Port の オブジェクト参照
 
std::mutex m_profile_mutex
 PortProfile の mutex
 
std::mutex m_connectorsMutex
 
std::string m_ownerInstanceName = "unknown"
 インスタンス名
 
int m_connectionLimit {-1}
 Port の接続の最大数
 
ConnectionCallbackm_onPublishInterfaces {nullptr}
 Callback functor オブジェクト
 
ConnectionCallbackm_onSubscribeInterfaces {nullptr}
 Callback functor オブジェクト
 
ConnectionCallbackm_onConnected {nullptr}
 Callback functor オブジェクト
 
ConnectionCallbackm_onUnsubscribeInterfaces {nullptr}
 Callback functor オブジェクト
 
ConnectionCallbackm_onDisconnected {nullptr}
 Callback functor オブジェクト
 
ConnectionCallbackm_onConnectionLost {nullptr}
 Callback functor オブジェクト
 
PortConnectListenersm_portconnListeners {nullptr}
 PortConnectListenerホルダ
 
DirectPortBasem_directport {nullptr}
 

詳解

template<class FsmType>
class RTC::EventInPort< FsmType >

EventInPort テンプレートクラス

EventInPort の実装である EventInPort<T> のテンプレートクラス。 <T> はBasicDataType.idl にて定義されている型で、メンバとして Time 型の tm , および T型の data を持つ構造体でなくてはならない。 EventInPort は内部にリングバッファを持ち、外部から送信されたデータを順次 このリングバッファに格納する。 データはフラグによって未読、既読状態が管理され、isNew(), write(), read(), isFull(), isEmpty() 等のメソッドによりハンドリングすることができる。

OnRead系コールバック (読み出しに起因するイベントによりコールされる)

  • void OnRead::operator(): EventInPort::read() を呼び出し読み出しを行う際にコールされる。
  • DataType OnReadConvert::operator(DataType): EventInPort::read() を呼び出し、データをバッファから読みだす際に呼ばれ データの変換を行う。引数にはバッファから読み出された値が与えられ、 変換後のデータを戻り値として返す。この値がread()の返す値となる。
から
0.2.0

構築子と解体子

◆ EventInPort()

template<class FsmType >
RTC::EventInPort< FsmType >::EventInPort ( const char * name,
FsmType & fsm )
inline

コンストラクタ

コンストラクタ。 パラメータとして与えられる T 型の変数にバインドされる。

引数
nameEventInPort 名。EventInPortBase:name() により参照される。
fsmこの EventInPort にバインドされる T 型の変数

◆ ~EventInPort()

template<class FsmType >
RTC::EventInPort< FsmType >::~EventInPort ( )
overridedefault

デストラクタ

デストラクタ。

関数詳解

◆ bindEvent() [1/2]

template<class FsmType >
template<typename TOP , class R >
void RTC::EventInPort< FsmType >::bindEvent ( const char * name,
R(TOP::* handler )() )
inline

◆ bindEvent() [2/2]

template<class FsmType >
template<class TOP , class R , class P0 >
void RTC::EventInPort< FsmType >::bindEvent ( const char * name,
R(TOP::* handler )(P0) )
inline

◆ init()

template<class FsmType >
void RTC::EventInPort< FsmType >::init ( coil::Properties & prop)
inlineoverridevirtual

プロパティの初期化

指定されたプロパティで初期化する。

引数
prop設定するプロパティ

RTC::InPortBaseを再実装しています。

参照先 RTC::InPortBase::addConnectorListener(), RTC::InPortBase::init(), RTC::InPortBase::m_thebuffer, RTC::ON_CONNECT.

◆ name()

template<class FsmType >
virtual const char * RTC::EventInPort< FsmType >::name ( )
inlinevirtual

ポート名称を取得する。

ポート名称を取得する。

戻り値
ポート名称

参照元 RTC::EventInPort< FsmType >::bindEvent(), RTC::EventInPort< FsmType >::bindEvent().

◆ read()

template<class FsmType >
bool RTC::EventInPort< FsmType >::read ( std::string name = "")
inlineoverridevirtual

RTObject_impl::readAll()から呼ばれる仮想関数

DataPort からデータを読み出す

戻り値
true:成功,false:失敗

RTC::InPortBaseを実装しています。


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