[openrtm-commit:02797] r1034 - in trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC: . port
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 9月 4日 (月) 13:57:52 JST
Author: t-katami
Date: 2017-09-04 13:57:52 +0900 (Mon, 04 Sep 2017)
New Revision: 1034
Modified:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ComponentObserverConsumer.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/LoggerConsumer.java
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/InPortCorbaCdrConsumer.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortSHMConsumer.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortCorbaCdrConsumer.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortSHMConsumer.java
Log:
[compat,bugfix,->releng_1_2] Canceled the change. refs #3393
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ComponentObserverConsumer.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ComponentObserverConsumer.java 2017-09-01 08:42:38 UTC (rev 1033)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ComponentObserverConsumer.java 2017-09-04 04:57:52 UTC (rev 1034)
@@ -84,7 +84,7 @@
* {@.en Re-initialization}
*/
public boolean reinit(final _SDOPackage.ServiceProfile profile){
- if (!m_observer._ptr(true)._is_equivalent(profile.service)) {
+ if (!m_observer._ptr()._is_equivalent(profile.service)) {
CorbaConsumer<ComponentObserver> tmp = new CorbaConsumer<ComponentObserver>();
if (!tmp.setObject(profile.service)) {
return false;
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/LoggerConsumer.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/LoggerConsumer.java 2017-09-01 08:42:38 UTC (rev 1033)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/LoggerConsumer.java 2017-09-04 04:57:52 UTC (rev 1034)
@@ -51,7 +51,7 @@
* {@.en Re-initialization}
*/
public boolean reinit(final _SDOPackage.ServiceProfile profile){
- if (!m_observer._ptr(true)._is_equivalent(profile.service)) {
+ if (!m_observer._ptr()._is_equivalent(profile.service)) {
CorbaConsumer<Logger> tmp = new CorbaConsumer<Logger>();
if (!tmp.setObject(profile.service)) {
return false;
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 2017-09-01 08:42:38 UTC (rev 1033)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/CorbaConsumer.java 2017-09-04 04:57:52 UTC (rev 1034)
@@ -2,12 +2,8 @@
import jp.go.aist.rtm.RTC.Manager;
import jp.go.aist.rtm.RTC.util.TypeCast;
-import jp.go.aist.rtm.RTC.util.ORBUtil;
import org.omg.CORBA.Object;
-import org.omg.CORBA.ORB;
import org.omg.PortableServer.POA;
-import org.omg.PortableServer.POAHelper;
-import org.omg.PortableServer.Servant;
/**
* <p>CORBAを通信手段とするコンシューマの実装クラスです。</p>
@@ -73,47 +69,9 @@
*/
public OBJECT_TYPE _ptr() {
- if(this.m_sev != null){
- return this.m_sev;
- }
- if(this.m_var != null){
-
- try{
- ORB orb = ORBUtil.getOrb();
- Object obj = orb.resolve_initial_references("RootPOA");
- POA poa = POAHelper.narrow(obj);
- if (poa == null) {
- return this.m_var;
- }
- 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;
}
-
- /**
- * <p>設定されているCORBAオブジェクトを取得します。</p>
- *
- * @param
- * @return CORBAオブジェクト
- */
- public OBJECT_TYPE _ptr(boolean ref) {
-
- if(ref) {
- return this.m_var;
- }
-
- return this._ptr();
-
- }
/**
* <p>CORBAオブジェクトの設定をクリアします。<br />
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortCorbaCdrConsumer.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortCorbaCdrConsumer.java 2017-09-01 08:42:38 UTC (rev 1033)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortCorbaCdrConsumer.java 2017-09-04 04:57:52 UTC (rev 1034)
@@ -114,12 +114,10 @@
output_stream.write_octet_array(ch,0,ch.length);
try {
- OpenRTM.PortStatus ret = ((OpenRTM.InPortCdrOperations)_ptr()).put(output_stream.getByteArray());
+ OpenRTM.PortStatus ret = _ptr().put(output_stream.getByteArray());
return convertReturn(ret);
}
catch (Exception e) {
- String crlf = System.getProperty("line.separator");
- rtcout.println(Logbuf.PARANOID, "Exception"+crlf+e.toString());
return ReturnCode.CONNECTION_LOST;
}
}
@@ -339,7 +337,7 @@
ORB orb = ORBUtil.getOrb();
org.omg.CORBA.Object var = orb.string_to_object(ior);
- if (!(_ptr(true)._is_equivalent(var))) {
+ if (!(_ptr()._is_equivalent(var))) {
rtcout.println(Logbuf.ERROR, "connector property inconsistency");
return false;
}
@@ -377,7 +375,7 @@
return false;
}
- if (!(_ptr(true)._is_equivalent(obj))) {
+ if (!(_ptr()._is_equivalent(obj))) {
rtcout.println(Logbuf.ERROR, "connector property inconsistency");
return false;
}
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortSHMConsumer.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortSHMConsumer.java 2017-09-01 08:42:38 UTC (rev 1033)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortSHMConsumer.java 2017-09-04 04:57:52 UTC (rev 1034)
@@ -397,7 +397,7 @@
ORB orb = ORBUtil.getOrb();
org.omg.CORBA.Object var = orb.string_to_object(ior);
- if (!(_ptr(true)._is_equivalent(var))) {
+ if (!(_ptr()._is_equivalent(var))) {
rtcout.println(Logbuf.ERROR, "connector property inconsistency");
return false;
}
@@ -435,7 +435,7 @@
return false;
}
- if (!(_ptr(true)._is_equivalent(obj))) {
+ if (!(_ptr()._is_equivalent(obj))) {
rtcout.println(Logbuf.ERROR, "connector property inconsistency");
return false;
}
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortCorbaCdrConsumer.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortCorbaCdrConsumer.java 2017-09-01 08:42:38 UTC (rev 1033)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortCorbaCdrConsumer.java 2017-09-04 04:57:52 UTC (rev 1034)
@@ -162,7 +162,7 @@
rtcout.println(Logbuf.TRACE, "OutPutCorbaCdrConsumer.get()");
OpenRTM.CdrDataHolder cdr_data = new OpenRTM.CdrDataHolder();
try {
- OpenRTM.PortStatus ret = ((OpenRTM.OutPortCdrOperations)_ptr()).get(cdr_data);
+ OpenRTM.PortStatus ret = _ptr().get(cdr_data);
if (ret == OpenRTM.PortStatus.PORT_OK) {
rtcout.println(Logbuf.DEBUG, "get() successful");
data.write_octet_array(cdr_data.value, 0,
@@ -312,7 +312,7 @@
"dataport.corba_cdr.outport_ior found.");
ORB orb = Manager.instance().getORB();
Object var = orb.string_to_object(ior);
- if (_ptr(true)._is_equivalent(var)) {
+ if (_ptr()._is_equivalent(var)) {
releaseObject();
rtcout.println(Logbuf.DEBUG,
"CorbaConsumer's reference was released.");
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortSHMConsumer.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortSHMConsumer.java 2017-09-01 08:42:38 UTC (rev 1033)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortSHMConsumer.java 2017-09-04 04:57:52 UTC (rev 1034)
@@ -360,7 +360,7 @@
"dataport.corba_cdr.outport_ior found.");
ORB orb = Manager.instance().getORB();
Object var = orb.string_to_object(ior);
- if (_ptr(true)._is_equivalent(var)) {
+ if (_ptr()._is_equivalent(var)) {
releaseObject();
rtcout.println(Logbuf.DEBUG,
"CorbaConsumer's reference was released.");
More information about the openrtm-commit
mailing list