20 #ifndef RTC_PORTBASE_H 21 #define RTC_PORTBASE_H 29 #include <rtm/idl/RTCSkel.h> 38 #pragma warning( disable : 4290 ) 43 class ConnectionCallback;
136 :
public virtual POA_RTC::PortService,
137 public virtual PortableServer::RefCountServantBase
238 throw (CORBA::SystemException);
320 throw (CORBA::SystemException);
362 throw (CORBA::SystemException);
521 virtual ReturnCode_t
connect(ConnectorProfile& connector_profile)
522 throw (CORBA::SystemException);
639 virtual ReturnCode_t
notify_connect(ConnectorProfile& connector_profile)
640 throw (CORBA::SystemException);
707 virtual ReturnCode_t
disconnect(
const char* connector_id)
708 throw (CORBA::SystemException);
799 throw (CORBA::SystemException);
821 throw (CORBA::SystemException);
881 void setName(
const char* name);
1360 virtual ReturnCode_t
1389 virtual ReturnCode_t
connectNext(ConnectorProfile& connector_profile);
1417 virtual ReturnCode_t
disconnectNext(ConnectorProfile& connector_profile);
1482 virtual ReturnCode_t
1592 bool isEmptyId(
const ConnectorProfile& connector_profile)
const;
1613 const std::string
getUUID()
const;
1634 void setUUID(ConnectorProfile& connector_profile)
const;
1834 PortInterfacePolarity pol);
1890 template <
class ValueType>
1971 #ifndef ORB_IS_RTORB 1972 bool checkPorts(::RTC::PortServiceList& ports);
1973 #else // ORB_IS_RTORB 1975 #endif // ORB_IS_RTORB 1979 RTC::ConnectorProfile& profile)
1989 RTC::ConnectorProfile& profile)
1998 RTC::ConnectorProfile& profile)
2008 RTC::ConnectorProfile& profile,
2020 RTC::ConnectorProfile& profile,
2032 RTC::ConnectorProfile& profile,
2044 RTC::ConnectorProfile& profile,
2050 portconnret_[
ON_CONNECTED].notify(portname, profile, ret);
2055 RTC::ConnectorProfile& profile,
2066 RTC::ConnectorProfile& profile,
2252 return m_id == std::string(cprof.connector_id);
2269 return m_port->_is_equivalent(port_ref);
2284 : m_name(name), m_pol(pol)
2289 CORBA::String_var name(CORBA::string_dup(prof.instance_name));
2290 return ((m_name == (
const char *)name) && (m_pol == prof.polarity));
2299 #pragma warning( default : 4290 ) 2302 #endif // RTC_PORTBASE_H SDOPackage::NameValue newNV(const char *name, Value value)
NameValue を生成する
Definition: NVUtil.h:79
Definition: PortConnectListener.h:163
void setOnSubscribeInterfaces(ConnectionCallback *on_subscribe)
インターフェースを取得する際に呼ばれるコールバックをセットする
bool isEmptyId(const ConnectorProfile &connector_profile) const
ConnectorProfile の connector_id フィールドが空かどうか判定
void onPublishInterfaces(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Definition: PortBase.h:2007
coil::Guard< coil::Mutex > Guard
Definition: PortBase.h:2111
const PortProfile & getProfile() const
PortProfileを取得する
virtual ReturnCode_t connect(ConnectorProfile &connector_profile)
[CORBA interface] Port の接続を行う
PortInterfacePolarity m_pol
Definition: PortBase.h:2293
void setUUID(ConnectorProfile &connector_profile) const
UUIDを生成し ConnectorProfile にセットする
Definition: PortConnectListener.h:51
std::string m_ownerInstanceName
インスタンス名
Definition: PortBase.h:2120
virtual ReturnCode_t _publishInterfaces(void)
Interface情報を公開する
bool operator()(const PortInterfaceProfile &prof)
Definition: PortBase.h:2287
ConnectionCallback * m_onSubscribeInterfaces
Callback functor オブジェクト
Definition: PortBase.h:2159
virtual DirectPortBase * getDirectPort()
direct通信用ポートオブジェクト取得
ConnectionCallback * m_onUnsubscribeInterfaces
Callback functor オブジェクト
Definition: PortBase.h:2188
void onNotifyConnect(const char *portname, RTC::ConnectorProfile &profile)
Definition: PortBase.h:1978
Mutex クラス
Definition: Mutex.h:40
RT component logger class.
void onDisconnectNextport(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Definition: PortBase.h:2054
find_interface(const char *name, PortInterfacePolarity pol)
Definition: PortBase.h:2283
coil::Mutex m_connectorsMutex
Definition: PortBase.h:2110
coil::Mutex m_profile_mutex
PortProfile の mutex.
Definition: PortBase.h:2109
id を持つ ConnectorProfile を探す Functor
Definition: PortBase.h:2247
bool appendStringValue(SDOPackage::NVList &nv, const char *name, const char *value)
指定された文字列を NVList の要素に追加する。
Definition: PortConnectListener.h:168
void setOnPublishInterfaces(ConnectionCallback *on_publish)
インターフェースを公開する際に呼ばれるコールバックをセットする
ConnectionCallback * m_onDisconnected
Callback functor オブジェクト
Definition: PortBase.h:2202
void onDisconnected(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Definition: PortBase.h:2065
void setOnConnected(ConnectionCallback *on_connected)
接続完了時に呼ばれるコールバックをセットする
virtual void setConnectionLimit(int limit_value)
接続の最大数を設定する。
Definition: PortConnectListener.h:52
void setOwner(RTObject_ptr owner)
Port の owner の RTObject を指定する
bool deleteInterface(const char *name, PortInterfacePolarity pol)
PortInterfaceProfile からインターフェース登録を削除する
virtual ReturnCode_t connectNext(ConnectorProfile &connector_profile)
次の Port に対して notify_connect() をコールする
bool operator()(PortService_ptr port_ref)
Definition: PortBase.h:2267
const char * getName() const
Port の名前を取得する
void setOnUnsubscribeInterfaces(ConnectionCallback *on_subscribe)
インターフェースを解放する際に呼ばれるコールバックをセットする
virtual PortProfile * get_port_profile()
[CORBA interface] PortProfileを取得する
name と polarity から interface を探す Functor
Definition: PortBase.h:2281
virtual ReturnCode_t notify_disconnect(const char *connector_id)
[CORBA interface] Port の接続解除通知を行う
std::string m_id
Definition: PortBase.h:2254
virtual void activateInterfaces()=0
Port の全てのインターフェースを activates する
virtual ConnectorProfileList * get_connector_profiles()
[CORBA interface] ConnectorProfileListを取得する
void setPortRef(PortService_ptr port_ref)
Port のオブジェクト参照を設定する
virtual ReturnCode_t disconnect_all()
[CORBA interface] Port の全接続を解除する
bool operator()(const ConnectorProfile &cprof)
Definition: PortBase.h:2250
direct接続用Port基底クラス
Definition: DirectPortBase.h:46
void onConnectNextport(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Definition: PortBase.h:2019
coil::Properties m_properties
プロパティ
Definition: PortBase.h:1933
void appendProperty(const char *key, const char *value)
PortProfile の properties に NameValue 値を要素に追加する
Definition: PortBase.h:1922
ConnectionCallback * m_onConnected
Callback functor オブジェクト
Definition: PortBase.h:2174
Port の基底クラス
Definition: PortBase.h:135
void setPortConnectListenerHolder(PortConnectListeners *portconnListeners)
PortConnectListeners のホルダをセットする
PortService_ptr m_port
Definition: PortBase.h:2271
PortConnectListeners クラス
Definition: PortConnectListener.h:487
std::string m_name
Definition: PortBase.h:2292
NameValue and NVList utility functions.
Definition: PortConnectListener.h:166
PortBase(const char *name="")
コンストラクタ
CORBA sequence utility template functions.
void onConnected(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Definition: PortBase.h:2043
DirectPortBase * m_directport
Definition: PortBase.h:2235
CORBA::Long findConnProfileIndex(const char *id)
id を持つ ConnectorProfile を探す
Logger クラス
Definition: SystemLogger.h:99
void setOnConnectionLost(ConnectionCallback *on_connection_lost)
ポートの接続がロストした場合に呼び出されるコールバックをセットする
virtual void unsubscribeInterfaces(const ConnectorProfile &connector_profile)=0
Interface の接続を解除する
void updateConnectors()
存在しないポートをdisconnectする。
virtual ReturnCode_t disconnect(const char *connector_id)
[CORBA interface] Port の接続を解除する
Definition: PortConnectListener.h:165
PortProfile m_profile
Port の PortProfile.
Definition: PortBase.h:2092
プロパティセットを表現するクラス
Definition: Properties.h:101
virtual ReturnCode_t publishInterfaces(ConnectorProfile &connector_profile)=0
Interface 情報を公開する
PortService_ptr getPortRef() const
Port のオブジェクト参照を取得する
PortConnectListeners * m_portconnListeners
PortConnectListenerホルダ
Definition: PortBase.h:2233
bool eraseConnectorProfile(const char *id)
ConnectorProfile を削除する
find_conn_id(const char *id)
Definition: PortBase.h:2249
Definition: PortConnectListener.h:167
virtual ReturnCode_t notify_connect(ConnectorProfile &connector_profile)
[CORBA interface] Port の接続通知を行う
void onUnsubscribeInterfaces(const char *portname, RTC::ConnectorProfile &profile)
Definition: PortBase.h:1997
bool isExistingConnId(const char *id)
id が既存の ConnectorProfile のものかどうか判定する
virtual void deactivateInterfaces()=0
全ての Port のインターフェースを deactivates する
virtual ReturnCode_t disconnectNext(ConnectorProfile &connector_profile)
次の Port に対して notify_disconnect() をコールする
bool appendInterface(const char *name, const char *type_name, PortInterfacePolarity pol)
PortInterfaceProfile に インターフェースを登録する
virtual ReturnCode_t subscribeInterfaces(const ConnectorProfile &connector_profile)=0
Interface 情報を公開する
void onSubscribeInterfaces(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Definition: PortBase.h:2031
void onNotifyDisconnect(const char *portname, RTC::ConnectorProfile &profile)
Definition: PortBase.h:1988
int m_connectionLimit
Port の接続の最大数
Definition: PortBase.h:2129
RTC::PortService_var m_objref
Port の オブジェクト参照
Definition: PortBase.h:2101
void push_back(CorbaSequence &seq, SequenceElement elem)
CORBA sequence の最後に要素を追加する
Definition: CORBA_SeqUtil.h:175
Definition: PortConnectListener.h:53
ConnectionCallback * m_onConnectionLost
Callback functor オブジェクト
Definition: PortBase.h:2218
find_port_ref(PortService_ptr port_ref)
Definition: PortBase.h:2266
const std::string getUUID() const
UUIDを生成する
void addProperty(const char *key, ValueType value)
PortProfile の properties に NameValue 値を追加する
Definition: PortBase.h:1891
ConnectionCallback * m_onPublishInterfaces
Callback functor オブジェクト
Definition: PortBase.h:2145
bool checkPorts(::RTC::PortServiceList &ports)
ポートの存在を確認する。
const PortProfile & getPortProfile() const
PortProfile を取得する。
コンストラクタ引数 port_ref と同じオブジェクト参照を探す Functor
Definition: PortBase.h:2264
void updateConnectorProfile(const ConnectorProfile &connector_profile)
ConnectorProfile の追加もしくは更新
connect/notify_connect() 時のコールバック抽象クラス
Definition: PortCallback.h:55
void setName(const char *name)
Port の名前を設定する
ConnectorProfile findConnProfile(const char *id)
id を持つ ConnectorProfile を探す
port's internal action listener classes
Definition: PortConnectListener.h:164
virtual ConnectorProfile * get_connector_profile(const char *connector_id)
[CORBA interface] ConnectorProfile を取得する
void setOnDisconnected(ConnectionCallback *on_disconnected)
接続解除に呼ばれるコールバックをセットする
Logger rtclog
ロガーストリーム
Definition: PortBase.h:2084
virtual ~PortBase(void)
デストラクタ