20 #ifndef RTC_PORTBASE_H
21 #define RTC_PORTBASE_H
26 #include <rtm/idl/RTCSkel.h>
37 class ConnectionCallback;
130 :
public virtual POA_RTC::PortService,
131 public virtual PortableServer::RefCountServantBase
512 ReturnCode_t
connect(ConnectorProfile& connector_profile)
override;
1346 virtual ReturnCode_t
1375 virtual ReturnCode_t
connectNext(ConnectorProfile& connector_profile);
1468 virtual ReturnCode_t
1578 static bool isEmptyId(
const ConnectorProfile& connector_profile) ;
1620 static void setUUID(ConnectorProfile& connector_profile) ;
1820 PortInterfacePolarity pol);
1876 template <
class ValueType>
1957 #ifndef ORB_IS_RTORB
1965 RTC::ConnectorProfile& profile)
1975 RTC::ConnectorProfile& profile)
1984 RTC::ConnectorProfile& profile)
1994 RTC::ConnectorProfile& profile,
2006 RTC::ConnectorProfile& profile,
2018 RTC::ConnectorProfile& profile,
2030 RTC::ConnectorProfile& profile,
2041 RTC::ConnectorProfile& profile,
2052 RTC::ConnectorProfile& profile,
2256 return m_id == std::string(cprof.connector_id);
2271 #ifdef ORB_IS_ORBEXPRESS
2274 return m_port->_is_equivalent(port_ref.in());
2279 return m_port->_is_equivalent(port_ref);
2300 CORBA::String_var name(CORBA::string_dup(prof.instance_name));
2301 return ((
m_name ==
static_cast<const char *
>(name))
2302 && (
m_pol == prof.polarity));
CORBA sequence utility template functions
NameValue and NVList utility functions
port's internal action listener classes
RT component logger class
connect/notify_connect() 時のコールバック抽象クラス
Definition: PortCallback.h:56
direct接続用Port基底クラス
Definition: DirectPortBase.h:47
Logger クラス
Definition: SystemLogger.h:101
Port の基底クラス
Definition: PortBase.h:132
ReturnCode_t disconnect(const char *connector_id) override
[CORBA interface] Port の接続を解除する
PortProfile m_profile
Port の PortProfile
Definition: PortBase.h:2097
std::mutex m_connectorsMutex
Definition: PortBase.h:2115
static bool isEmptyId(const ConnectorProfile &connector_profile)
ConnectorProfile の connector_id フィールドが空かどうか判定
int m_connectionLimit
Port の接続の最大数
Definition: PortBase.h:2133
PortConnectListeners * m_portconnListeners
PortConnectListenerホルダ
Definition: PortBase.h:2237
ConnectorProfile * get_connector_profile(const char *connector_id) override
[CORBA interface] ConnectorProfile を取得する
ReturnCode_t notify_disconnect(const char *connector_id) override
[CORBA interface] Port の接続解除通知を行う
void setOnUnsubscribeInterfaces(ConnectionCallback *on_unsubscribe)
インターフェースを解放する際に呼ばれるコールバックをセットする
void setOwner(RTObject_ptr owner)
Port の owner の RTObject を指定する
bool isExistingConnId(const char *id)
id が既存の ConnectorProfile のものかどうか判定する
DirectPortBase * m_directport
Definition: PortBase.h:2239
void onConnectNextport(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Definition: PortBase.h:2005
void onNotifyDisconnect(const char *portname, RTC::ConnectorProfile &profile)
Definition: PortBase.h:1974
ReturnCode_t notify_connect(ConnectorProfile &connector_profile) override
[CORBA interface] Port の接続通知を行う
ConnectorProfileList * get_connector_profiles() override
[CORBA interface] ConnectorProfileListを取得する
void onDisconnectNextport(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Definition: PortBase.h:2040
ConnectorProfile findConnProfile(const char *id)
id を持つ ConnectorProfile を探す
ReturnCode_t disconnect_all() override
[CORBA interface] Port の全接続を解除する
ConnectionCallback * m_onConnectionLost
Callback functor オブジェクト
Definition: PortBase.h:2222
ConnectionCallback * m_onUnsubscribeInterfaces
Callback functor オブジェクト
Definition: PortBase.h:2192
bool eraseConnectorProfile(const char *id)
ConnectorProfile を削除する
std::mutex m_profile_mutex
PortProfile の mutex
Definition: PortBase.h:2114
void setName(const char *name)
Port の名前を設定する
void onConnected(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Definition: PortBase.h:2029
const char * getName() const
Port の名前を取得する
void addProperty(const char *key, ValueType value)
PortProfile の properties に NameValue 値を追加する
Definition: PortBase.h:1877
ConnectionCallback * m_onConnected
Callback functor オブジェクト
Definition: PortBase.h:2178
ConnectionCallback * m_onSubscribeInterfaces
Callback functor オブジェクト
Definition: PortBase.h:2163
const PortProfile & getProfile() const
PortProfileを取得する
RTC::PortService_var m_objref
Port の オブジェクト参照
Definition: PortBase.h:2106
void onNotifyConnect(const char *portname, RTC::ConnectorProfile &profile)
Definition: PortBase.h:1964
void onDisconnected(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Definition: PortBase.h:2051
std::string m_ownerInstanceName
インスタンス名
Definition: PortBase.h:2124
void onPublishInterfaces(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Definition: PortBase.h:1993
void setPortRef(PortService_ptr port_ref)
Port のオブジェクト参照を設定する
bool appendInterface(const char *instance_name, const char *type_name, PortInterfacePolarity pol)
PortInterfaceProfile に インターフェースを登録する
CORBA::Long findConnProfileIndex(const char *id)
id を持つ ConnectorProfile を探す
PortBase(const char *name="")
コンストラクタ
void setOnConnected(ConnectionCallback *on_connected)
接続完了時に呼ばれるコールバックをセットする
coil::Properties m_properties
プロパティ
Definition: PortBase.h:1919
ConnectionCallback * m_onPublishInterfaces
Callback functor オブジェクト
Definition: PortBase.h:2149
virtual void unsubscribeInterfaces(const ConnectorProfile &connector_profile)=0
Interface の接続を解除する
virtual void deactivateInterfaces()=0
全ての Port のインターフェースを deactivates する
void setOnDisconnected(ConnectionCallback *on_disconnected)
接続解除に呼ばれるコールバックをセットする
static void setUUID(ConnectorProfile &connector_profile)
UUIDを生成し ConnectorProfile にセットする
virtual void setConnectionLimit(int limit_value)
接続の最大数を設定する。
void setPortConnectListenerHolder(PortConnectListeners *portconnListeners)
PortConnectListeners のホルダをセットする
void setOnConnectionLost(ConnectionCallback *on_connection_lost)
ポートの接続がロストした場合に呼び出されるコールバックをセットする
void updateConnectors()
存在しないポートをdisconnectする。
void updateConnectorProfile(const ConnectorProfile &connector_profile)
ConnectorProfile の追加もしくは更新
virtual ReturnCode_t disconnectNext(ConnectorProfile &cprof)
次の Port に対して notify_disconnect() をコールする
Logger rtclog
ロガーストリーム
Definition: PortBase.h:2089
bool checkPorts(::RTC::PortServiceList &ports)
ポートの存在を確認する。
ConnectionCallback * m_onDisconnected
Callback functor オブジェクト
Definition: PortBase.h:2206
ReturnCode_t connect(ConnectorProfile &connector_profile) override
[CORBA interface] Port の接続を行う
PortProfile * get_port_profile() override
[CORBA interface] PortProfileを取得する
const PortProfile & getPortProfile() const
PortProfile を取得する。
void appendProperty(const char *key, const char *value)
PortProfile の properties に NameValue 値を要素に追加する
Definition: PortBase.h:1908
void setOnSubscribeInterfaces(ConnectionCallback *on_subscribe)
インターフェースを取得する際に呼ばれるコールバックをセットする
virtual ReturnCode_t connectNext(ConnectorProfile &connector_profile)
次の Port に対して notify_connect() をコールする
virtual ReturnCode_t publishInterfaces(ConnectorProfile &connector_profile)=0
Interface 情報を公開する
virtual void activateInterfaces()=0
Port の全てのインターフェースを activates する
virtual ReturnCode_t _publishInterfaces()
Interface情報を公開する
bool isExistingMarshalingType(coil::Properties &con_prop)
指定のシリアライザが使用可能かを判定する
virtual DirectPortBase * getDirectPort()
direct通信用ポートオブジェクト取得
~PortBase() override
デストラクタ
bool deleteInterface(const char *name, PortInterfacePolarity pol)
PortInterfaceProfile からインターフェース登録を削除する
void onUnsubscribeInterfaces(const char *portname, RTC::ConnectorProfile &profile)
Definition: PortBase.h:1983
void onSubscribeInterfaces(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Definition: PortBase.h:2017
PortService_ptr getPortRef() const
Port のオブジェクト参照を取得する
virtual ReturnCode_t subscribeInterfaces(const ConnectorProfile &connector_profile)=0
Interface 情報を公開する
static std::string getUUID()
UUIDを生成する
void setOnPublishInterfaces(ConnectionCallback *on_publish)
インターフェースを公開する際に呼ばれるコールバックをセットする
PortConnectListeners クラス
Definition: PortConnectListener.h:487
bool notify(PortConnectListenerType type, const char *portname, RTC::ConnectorProfile &profile)
リスナーへ通知する
Definition: PortConnectListener.h:625
void push_back(CorbaSequence &seq, SequenceElement elem)
CORBA sequence の最後に要素を追加する
Definition: CORBA_SeqUtil.h:175
bool appendStringValue(SDOPackage::NVList &nv, const char *name, const char *value)
指定された文字列を NVList の要素に追加する。
SDOPackage::NameValue newNV(const char *name, Value value)
NameValue を生成する
Definition: NVUtil.h:80
@ ON_UNSUBSCRIBE_INTERFACES
@ ON_SUBSCRIBE_INTERFACES
coil::Properties Properties
Definition: RTC.h:72
id を持つ ConnectorProfile を探す Functor
Definition: PortBase.h:2252
find_conn_id(const char *id)
Definition: PortBase.h:2253
bool operator()(const ConnectorProfile &cprof)
Definition: PortBase.h:2254
std::string m_id
Definition: PortBase.h:2258
name と polarity から interface を探す Functor
Definition: PortBase.h:2293
bool operator()(const PortInterfaceProfile &prof)
Definition: PortBase.h:2298
std::string m_name
Definition: PortBase.h:2304
PortInterfacePolarity m_pol
Definition: PortBase.h:2305
find_interface(const char *name, PortInterfacePolarity pol)
Definition: PortBase.h:2294
コンストラクタ引数 port_ref と同じオブジェクト参照を探す Functor
Definition: PortBase.h:2269
find_port_ref(PortService_ptr port_ref)
Definition: PortBase.h:2270
PortService_ptr m_port
Definition: PortBase.h:2282
bool operator()(PortService_ptr port_ref)
Definition: PortBase.h:2277