[openrtm-commit:00320] r531 - branches/work/ForPortConnectListener/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port
openrtm @ openrtm.org
openrtm @ openrtm.org
2011年 8月 5日 (金) 17:51:01 JST
Author: fsi-katami
Date: 2011-08-05 17:51:01 +0900 (Fri, 05 Aug 2011)
New Revision: 531
Modified:
branches/work/ForPortConnectListener/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/PortBase.java
Log:
Implemented of PortConnect listener. refs #2048
Modified: branches/work/ForPortConnectListener/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/PortBase.java
===================================================================
--- branches/work/ForPortConnectListener/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/PortBase.java 2011-08-05 08:15:19 UTC (rev 530)
+++ branches/work/ForPortConnectListener/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/PortBase.java 2011-08-05 08:51:01 UTC (rev 531)
@@ -735,6 +735,7 @@
rtcout.println(Logbuf.ERROR,
"publishInterfaces() in notify_connect() failed.");
}
+ onPublishInterfaces(getName(), connector_profile.value, retval[0]);
if (m_onPublishInterfaces != null) {
m_onPublishInterfaces.run(connector_profile);
}
@@ -746,6 +747,7 @@
rtcout.println(Logbuf.ERROR,
"connectNext() in notify_connect() failed.");
}
+ onConnectNextport(getName(), connector_profile.value, retval[1]);
// subscribe interface from the ConnectorProfile's information
if (m_onSubscribeInterfaces != null) {
@@ -757,6 +759,7 @@
rtcout.println(Logbuf.ERROR,
"subscribeInterfaces() in notify_connect() failed.");
}
+ onSubscribeInterfaces(getName(), connector_profile.value, retval[2]);
rtcout.println(Logbuf.PARANOID,
m_profile.connector_profiles.length
@@ -785,6 +788,7 @@
for (int i=0, len=retval.length; i < len; ++i) {
if (! ReturnCode_t.RTC_OK.equals(retval[i])) {
+ onConnected(getName(), connector_profile.value, retval[i]);
return retval[i];
}
}
@@ -793,6 +797,7 @@
if (m_onConnected != null) {
m_onConnected.run(connector_profile);
}
+ onConnected(getName(), connector_profile.value, ReturnCode_t.RTC_OK);
return ReturnCode_t.RTC_OK;
}
}
@@ -1019,13 +1024,16 @@
ConnectorProfile prof
= this.m_profile.connector_profiles[index];
+ onNotifyDisconnect(getName(), prof);
ReturnCode_t retval = disconnectNext(prof);
+ onDisconnectNextport(getName(), prof, retval);
if (m_onUnsubscribeInterfaces != null) {
ConnectorProfileHolder holder
= new ConnectorProfileHolder(prof);
m_onUnsubscribeInterfaces.run(holder);
prof = holder.value;
}
+ onUnsubscribeInterfaces(getName(), prof);
unsubscribeInterfaces(prof);
if (m_onDisconnected != null) {
@@ -1041,7 +1049,7 @@
CORBA_SeqUtil.erase(holder, index);
this.m_profile.connector_profiles = holder.value;
-
+ onDisconnected(getName(), prof, retval);
return retval;
}
}
openrtm-commit メーリングリストの案内