[openrtm-commit:01804] r794 - trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port
openrtm @ openrtm.org
openrtm @ openrtm.org
2016年 3月 5日 (土) 18:24:10 JST
Author: win-ei
Date: 2016-03-05 18:24:09 +0900 (Sat, 05 Mar 2016)
New Revision: 794
Modified:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/CorbaConsumer.java
Log:
Direct connect functionality with service ports has been implemented. refs #3393
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/CorbaConsumer.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/CorbaConsumer.java 2016-03-05 07:07:22 UTC (rev 793)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/CorbaConsumer.java 2016-03-05 09:24:09 UTC (rev 794)
@@ -1,7 +1,9 @@
package jp.go.aist.rtm.RTC.port;
+import jp.go.aist.rtm.RTC.Manager;
import jp.go.aist.rtm.RTC.util.TypeCast;
import org.omg.CORBA.Object;
+import org.omg.PortableServer.POA;
/**
* <p>CORBAを通信手段とするコンシューマの実装クラスです。</p>
@@ -66,7 +68,19 @@
* @return CORBAオブジェクト
*/
public OBJECT_TYPE _ptr() {
-
+ if(m_sev != null){
+ return this.m_sev;
+ }
+ try{
+ POA poa = Manager.instance().getPOA();
+ m_sev = (OBJECT_TYPE)(poa.reference_to_servant((Object)m_var));
+ if(m_sev != null){
+ return this.m_sev;
+ }
+ }
+ catch(Exception ex){
+ return this.m_var;
+ }
return this.m_var;
}
@@ -78,12 +92,16 @@
super.releaseObject();
this.m_var = null;
+ this.m_sev = null;
}
/**
* <p>設定されているCORBAオブジェクトです。</p>
*/
protected OBJECT_TYPE m_var;
+ protected OBJECT_TYPE m_sev;
private TypeCast<OBJECT_TYPE> TYPE_CAST;
+
+
}
More information about the openrtm-commit
mailing list