[openrtm-commit:00481] r597 - in trunk: . jp.go.aist.rtm.RTC jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port
openrtm @ openrtm.org
openrtm @ openrtm.org
2011年 12月 12日 (月) 10:45:49 JST
Author: fsi-katami
Date: 2011-12-12 10:45:48 +0900 (Mon, 12 Dec 2011)
New Revision: 597
Added:
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/EncapsOutputStreamExt.java
Modified:
trunk/
trunk/jp.go.aist.rtm.RTC/
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/IopIorInterceptor.java
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/Manager.java
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPort.java
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortConnector.java
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortCorbaCdrConsumer.java
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortCorbaCdrProvider.java
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortPullConnector.java
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPort.java
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortCorbaCdrProvider.java
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortPullConnector.java
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortPushConnector.java
Log:
Corrected source codes. To reduce the difference with Android version.
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/RELENG_1_0_0:60-401
/branches/work/ForComponentActionListener:521-522
/branches/work/ForComponentObserverConsumer:534-543
/branches/work/ForConfigurationListener:524-526
/branches/work/ForLogFormat:518-519
/branches/work/ForPortConnectListener:528-532
/branches/work/ForSDOServiceAdminClass:505-507
/branches/work/ToGetProperties:545-548
/branches/work/ToIFR_ID:509-514
+ /branches/RELENG_1_0_0:60-401
/branches/work/ForComponentActionListener:521-522
/branches/work/ForComponentObserverConsumer:534-543
/branches/work/ForConfigurationListener:524-526
/branches/work/ForLogFormat:518-519
/branches/work/ForPortConnectListener:528-532
/branches/work/ForSDOServiceAdminClass:505-507
/branches/work/SourceSharing:591-596
/branches/work/ToGetProperties:545-548
/branches/work/ToIFR_ID:509-514
Property changes on: trunk/jp.go.aist.rtm.RTC
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/RELENG_1_0/jp.go.aist.rtm.RTC:408-498
/branches/RELENG_1_0_0/jp.go.aist.rtm.RTC:60-401
/branches/work/ForComponentActionListener/jp.go.aist.rtm.RTC:521-522
/branches/work/ForComponentObserverConsumer/jp.go.aist.rtm.RTC:534-543
/branches/work/ForConfigurationListener/jp.go.aist.rtm.RTC:524-526
/branches/work/ForLogFormat/jp.go.aist.rtm.RTC:518-519
/branches/work/ForPortConnectListener/jp.go.aist.rtm.RTC:528-532
/branches/work/ForSDOServiceAdminClass/jp.go.aist.rtm.RTC:505-507
/branches/work/ToGetProperties/jp.go.aist.rtm.RTC:545-548
/branches/work/ToIFR_ID/jp.go.aist.rtm.RTC:509-514
+ /branches/RELENG_1_0/jp.go.aist.rtm.RTC:408-498
/branches/RELENG_1_0_0/jp.go.aist.rtm.RTC:60-401
/branches/work/ForComponentActionListener/jp.go.aist.rtm.RTC:521-522
/branches/work/ForComponentObserverConsumer/jp.go.aist.rtm.RTC:534-543
/branches/work/ForConfigurationListener/jp.go.aist.rtm.RTC:524-526
/branches/work/ForLogFormat/jp.go.aist.rtm.RTC:518-519
/branches/work/ForPortConnectListener/jp.go.aist.rtm.RTC:528-532
/branches/work/ForSDOServiceAdminClass/jp.go.aist.rtm.RTC:505-507
/branches/work/SourceSharing/jp.go.aist.rtm.RTC:591-596
/branches/work/ToGetProperties/jp.go.aist.rtm.RTC:545-548
/branches/work/ToIFR_ID/jp.go.aist.rtm.RTC:509-514
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/IopIorInterceptor.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/IopIorInterceptor.java 2011-12-08 05:42:14 UTC (rev 596)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/IopIorInterceptor.java 2011-12-12 01:45:48 UTC (rev 597)
@@ -14,6 +14,15 @@
import org.omg.IOP.TaggedComponent;
import org.omg.PortableInterceptor.IORInterceptor;
+/*
+//<+JacORB
+import org.jacorb.orb.etf.ProtocolAddressBase;
+import org.jacorb.orb.iiop.IIOPAddress;
+import org.jacorb.orb.iiop.IIOPProfile;
+import java.util.List;
+import java.util.Iterator;
+//+>
+*/
/**
* {@.ja ポータブルインターセプタを利用してIORを書き換える.}
@@ -93,6 +102,7 @@
return;
}
+ //<+ sun
com.sun.corba.se.spi.orb.ORB sunorb
= (com.sun.corba.se.spi.orb.ORB)orb;
@@ -103,7 +113,30 @@
= (com.sun.corba.se.spi.ior.iiop.IIOPProfileTemplate)iop.getTaggedProfileTemplate();
String host = ptemp.getPrimaryAddress().getHost();
short port = (short)ptemp.getPrimaryAddress().getPort();
+ //+>
+/*
+ //<+ JacORB
+ ProtocolAddressBase address = null;
+ org.jacorb.orb.ORB jacorb = (org.jacorb.orb.ORB)orb;
+ if (jacorb.getBasicAdapter() == null) {
+ return;
+ }
+ List eplist = jacorb.getBasicAdapter().getEndpointProfiles();
+ for (Iterator i = eplist.iterator(); i.hasNext(); ) {
+ org.omg.ETF.Profile p = (org.omg.ETF.Profile)i.next();
+ if (p instanceof IIOPProfile) {
+ address = ((IIOPProfile)p).getAddress();
+ break;
+ }
+ }
+ if (address == null) {
+ return;
+ }
+ short port = (short)((IIOPAddress)address).getPort();
+ //+>
+*/
+
for(int ic=0;ic<m_endpoints.size();ic++){
if(m_endpoints.get(ic).Port==0){
m_endpoints.get(ic).Port = port;
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/Manager.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/Manager.java 2011-12-08 05:42:14 UTC (rev 596)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/Manager.java 2011-12-12 01:45:48 UTC (rev 597)
@@ -2182,12 +2182,12 @@
if(endpoint != null && (endpoint.indexOf(":")>=0)) {
String[] endPointInfo = endpoint.split(":");
if( !endPointInfo[0].equals("") ) {
- result.put("com.sun.CORBA.ORBServerHost", endPointInfo[0]);
+ result.put(SERVER_HOST, endPointInfo[0]);
}
if( endPointInfo.length>1 ) {
try {
short port = (short)Integer.parseInt(endPointInfo[1]);
- result.put("com.sun.CORBA.ORBServerPort", endPointInfo[1]);
+ result.put(SERVER_PORT, endPointInfo[1]);
}
catch(Exception ex){
rtcout.println(Logbuf.WARN, ""+endPointInfo[1]);
@@ -2216,7 +2216,7 @@
"localhost:2810");
String portNumber[] = mm.split(":");
- result.put("com.sun.CORBA.POA.ORBPersistentServerPort",
+ result.put(LISTENER_PORT,
portNumber[1]);
}
@@ -2271,7 +2271,7 @@
String[] endPoints = endpoints.split(",");
int loopstart = 0;
for(int ic=loopstart;ic<endPoints.length;++ic) {
- if(result.getProperty("com.sun.CORBA.ORBServerHost")==null){
+ if(result.getProperty(SERVER_HOST)==null){
parsesCorbaEndpoint(endPoints[ic], result);
}
else{
@@ -2283,7 +2283,7 @@
}
else{
- if(result.getProperty("com.sun.CORBA.ORBServerHost")==null){
+ if(result.getProperty(SERVER_HOST)==null){
parsesCorbaEndpoint(endpoints, result);
}
else {
@@ -3471,4 +3471,11 @@
*
*/
Finalized m_finalized = new Finalized();
+
+ private static final String SERVER_HOST = "com.sun.CORBA.ORBServerHost";
+ private static final String SERVER_PORT = "com.sun.CORBA.ORBServerPort";
+ private static final String LISTENER_PORT = "com.sun.CORBA.POA.ORBPersistentServerPort";
+ //private static final String SERVER_HOST = "OAIAddr";
+ //private static final String SERVER_PORT = "OAPort";
+ //private static final String LISTENER_PORT = "OAPort";
}
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java 2011-12-08 05:42:14 UTC (rev 596)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ManagerServant.java 2011-12-12 01:45:48 UTC (rev 597)
@@ -59,11 +59,7 @@
try{
//Registers the reference
- m_mgr.getPOA().activate_object( this );
- com.sun.corba.se.impl.orb.ORBImpl orb
- = (com.sun.corba.se.impl.orb.ORBImpl)m_mgr.getORB();
- orb.register_initial_reference(
- "manager", m_mgr.getPOA().servant_to_reference(this) );
+ createManagerCORBAServant();
}
catch(Exception ex){
rtcout.println(Logbuf.WARN,
@@ -105,11 +101,7 @@
try{
//Registers the reference
- m_mgr.getPOA().activate_object( this );
- com.sun.corba.se.impl.orb.ORBImpl orb
- = (com.sun.corba.se.impl.orb.ORBImpl)m_mgr.getORB();
- orb.register_initial_reference(
- "manager", m_mgr.getPOA().servant_to_reference(this) );
+ createManagerCORBAServant();
}
catch(Exception ex){
rtcout.println(Logbuf.WARN,
@@ -179,14 +171,6 @@
rtcout.println(Logbuf.DEBUG, "createINSManager()");
try{
-/*
- //Registers the reference
- m_mgr.getPOA().activate_object( this );
- com.sun.corba.se.impl.orb.ORBImpl orb
- = (com.sun.corba.se.impl.orb.ORBImpl)m_mgr.getORB();
- orb.register_initial_reference(
- "manager", m_mgr.getPOA().servant_to_reference(this) );
-*/
//
rtcout.println(Logbuf.DEBUG, "gets object.");
@@ -1227,6 +1211,18 @@
*/
/**
+ *
+ */
+ private void createManagerCORBAServant() throws Exception {
+ m_mgr.getPOA().activate_object( this );
+ com.sun.corba.se.impl.orb.ORBImpl orb
+ = (com.sun.corba.se.impl.orb.ORBImpl)m_mgr.getORB();
+// org.jacorb.orb.ORB orb
+// = (org.jacorb.orb.ORB)m_mgr.getORB();
+ orb.register_initial_reference(
+ "manager", m_mgr.getPOA().servant_to_reference(this) );
+ }
+ /**
* <p></p>
*/
private jp.go.aist.rtm.RTC.Manager m_mgr;
Copied: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/EncapsOutputStreamExt.java (from rev 596, branches/work/SourceSharing/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/EncapsOutputStreamExt.java)
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/EncapsOutputStreamExt.java (rev 0)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/EncapsOutputStreamExt.java 2011-12-12 01:45:48 UTC (rev 597)
@@ -0,0 +1,35 @@
+package jp.go.aist.rtm.RTC.port;
+/**
+ * {@.ja EncapsOutputStreamの拡張クラス。}
+ * {@.en Expansion class of EncapsOutputStream}
+ */
+
+import com.sun.corba.se.impl.encoding.EncapsOutputStream;
+import com.sun.corba.se.spi.orb.ORB;
+//import org.jacorb.orb.CDROutputStream;
+//import org.omg.CORBA.ORB;
+
+
+//public class EncapsOutputStreamExt extends CDROutputStream {
+public class EncapsOutputStreamExt extends EncapsOutputStream {
+ /**
+ * {@.ja コンストラクタ}
+ * {@.en Constructor}
+ * <p>
+ *
+ */
+ public EncapsOutputStreamExt(org.omg.CORBA.ORB orb, boolean isLittleEndian) {
+ super((ORB)orb,isLittleEndian);
+ //super((ORB)orb);
+ }
+
+ /**
+ * {@.ja ストリームの内容を配列で取得する。}
+ * {@.en Gets the content of the stream in the array.}
+ * <p>
+ */
+ public final byte[] getByteArray(){
+ return toByteArray();
+ //return getBufferCopy();
+ }
+}
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPort.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPort.java 2011-12-08 05:42:14 UTC (rev 596)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPort.java 2011-12-12 01:45:48 UTC (rev 597)
@@ -13,7 +13,6 @@
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.Streamable;
-import com.sun.corba.se.impl.encoding.EncapsOutputStream;
/**
* <p>入力ポートのためのベース実装クラスです。
@@ -125,7 +124,6 @@
this.m_OnOverflow = null;
this.m_OnUnderflow = null;
- m_spi_orb = (com.sun.corba.se.spi.orb.ORB)ORBUtil.getOrb();
m_orb = ORBUtil.getOrb();
Class cl = value.v.getClass();
@@ -315,7 +313,7 @@
}
ReturnCode ret;
- EncapsOutputStream cdr = new EncapsOutputStream(m_spi_orb,
+ EncapsOutputStreamExt cdr = new EncapsOutputStreamExt(m_orb,
isLittleEndian());
DataRef<InputStream> dataref
= new DataRef<InputStream>(cdr.create_input_stream());
@@ -538,6 +536,5 @@
private Streamable m_streamable = null;
private Field m_field = null;
- private com.sun.corba.se.spi.orb.ORB m_spi_orb;
private ORB m_orb;
}
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortConnector.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortConnector.java 2011-12-08 05:42:14 UTC (rev 596)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortConnector.java 2011-12-12 01:45:48 UTC (rev 597)
@@ -33,7 +33,6 @@
m_profile = profile;
m_buffer = buffer;
m_isLittleEndian = true;
- m_spi_orb = (com.sun.corba.se.spi.orb.ORB)ORBUtil.getOrb();
m_orb = ORBUtil.getOrb();
}
@@ -169,7 +168,6 @@
protected ConnectorInfo m_profile;
protected BufferBase<OutputStream> m_buffer;
protected boolean m_isLittleEndian;
- protected com.sun.corba.se.spi.orb.ORB m_spi_orb;
protected org.omg.CORBA.ORB m_orb;
}
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortCorbaCdrConsumer.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortCorbaCdrConsumer.java 2011-12-08 05:42:14 UTC (rev 596)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortCorbaCdrConsumer.java 2011-12-12 01:45:48 UTC (rev 597)
@@ -15,7 +15,6 @@
import _SDOPackage.NVListHolder;
-import com.sun.corba.se.impl.encoding.EncapsOutputStream;
/**
* {@.ja InPortCorbaCdrConsumer クラス}
@@ -41,10 +40,8 @@
*/
public InPortCorbaCdrConsumer() {
super(OpenRTM.InPortCdr.class);
- m_spi_orb = (com.sun.corba.se.spi.orb.ORB)ORBUtil.getOrb();
rtcout = new Logbuf("InPortCorbaCdrConsumer");
// rtcout.setLevel("PARANOID");
- m_spi_orb = (com.sun.corba.se.spi.orb.ORB)ORBUtil.getOrb();
m_orb = ORBUtil.getOrb();
}
/**
@@ -109,16 +106,15 @@
public ReturnCode put(final OutputStream data) {
rtcout.println(Logbuf.PARANOID, "put");
- EncapsOutputStream cdr;
- cdr = (EncapsOutputStream)data;
- byte[] ch = cdr.toByteArray();
- EncapsOutputStream output_stream
- = new EncapsOutputStream(m_spi_orb, m_connector.isLittleEndian());
+ EncapsOutputStreamExt cdr;
+ cdr = (EncapsOutputStreamExt)data;
+ byte[] ch = cdr.getByteArray();
+ EncapsOutputStreamExt output_stream
+ = new EncapsOutputStreamExt(m_orb, m_connector.isLittleEndian());
output_stream.write_octet_array(ch,0,ch.length);
try {
-// OpenRTM.PortStatus ret = _ptr().put(cdr.toByteArray());
- OpenRTM.PortStatus ret = _ptr().put(output_stream.toByteArray());
+ OpenRTM.PortStatus ret = _ptr().put(output_stream.getByteArray());
return convertReturn(ret);
}
catch (Exception e) {
@@ -471,7 +467,6 @@
private Logbuf rtcout;
private Properties m_properties;
- private com.sun.corba.se.spi.orb.ORB m_spi_orb;
private OutPortConnector m_connector;
private ORB m_orb;
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortCorbaCdrProvider.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortCorbaCdrProvider.java 2011-12-08 05:42:14 UTC (rev 596)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortCorbaCdrProvider.java 2011-12-12 01:45:48 UTC (rev 597)
@@ -19,7 +19,6 @@
import OpenRTM.InPortCdrPOA;
import _SDOPackage.NVListHolder;
-import com.sun.corba.se.impl.encoding.EncapsOutputStream;
/**
* {@.ja InPortCorbaCdrProvider クラス}
@@ -57,7 +56,7 @@
NVUtil.newNV("dataport.corba_cdr.inport_ref",
m_objref, OpenRTM.InPortCdr.class ));
- m_spi_orb = (com.sun.corba.se.spi.orb.ORB)ORBUtil.getOrb();
+ m_orb = ORBUtil.getOrb();
}
/**
@@ -148,8 +147,8 @@
rtcout.println(Logbuf.PARANOID, "InPortCorbaCdrProvider.put()");
if (m_buffer == null) {
- EncapsOutputStream cdr
- = new EncapsOutputStream(m_spi_orb,m_connector.isLittleEndian());
+ EncapsOutputStreamExt cdr
+ = new EncapsOutputStreamExt(m_orb,m_connector.isLittleEndian());
cdr.write_octet_array(data, 0, data.length);
onReceiverError(cdr);
return OpenRTM.PortStatus.PORT_ERROR;
@@ -159,11 +158,11 @@
rtcout.println(Logbuf.PARANOID, "received data size: "+data.length);
- EncapsOutputStream cdr
- = new EncapsOutputStream(m_spi_orb,m_connector.isLittleEndian());
+ EncapsOutputStreamExt cdr
+ = new EncapsOutputStreamExt(m_orb,m_connector.isLittleEndian());
cdr.write_octet_array(data, 0, data.length);
- int len = cdr.toByteArray().length;
+ int len = cdr.getByteArray().length;
rtcout.println(Logbuf.PARANOID, "converted CDR data size: "+len);
onReceived(cdr);
jp.go.aist.rtm.RTC.buffer.ReturnCode ret = m_buffer.write(cdr);
@@ -203,7 +202,7 @@
*/
protected OpenRTM.PortStatus
convertReturn(jp.go.aist.rtm.RTC.buffer.ReturnCode status,
- final EncapsOutputStream data) {
+ final EncapsOutputStreamExt data) {
switch (status) {
case BUFFER_OK:
onBufferWrite(data);
@@ -611,7 +610,7 @@
private BufferBase<OutputStream> m_buffer;
private OpenRTM.InPortCdr m_objref;
- private com.sun.corba.se.spi.orb.ORB m_spi_orb;
+ private ORB m_orb;
private InPortConnector m_connector;
private ConnectorListeners m_listeners;
private ConnectorBase.ConnectorInfo m_profile;
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortPullConnector.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortPullConnector.java 2011-12-08 05:42:14 UTC (rev 596)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortPullConnector.java 2011-12-12 01:45:48 UTC (rev 597)
@@ -9,7 +9,6 @@
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
-import com.sun.corba.se.impl.encoding.EncapsOutputStream;
/**
* {@.ja InPortPullConnector クラス}
@@ -146,7 +145,7 @@
if (m_consumer == null) {
return ReturnCode.PORT_ERROR;
}
- EncapsOutputStream cdr = new EncapsOutputStream(m_spi_orb,
+ EncapsOutputStreamExt cdr = new EncapsOutputStreamExt(m_orb,
m_isLittleEndian);
ReturnCode ret = m_consumer.get(cdr);
DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPort.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPort.java 2011-12-08 05:42:14 UTC (rev 596)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPort.java 2011-12-12 01:45:48 UTC (rev 597)
@@ -234,7 +234,6 @@
this.m_OnOverflow = null;
this.m_OnUnderflow = null;
- m_spi_orb = (com.sun.corba.se.spi.orb.ORB)ORBUtil.getOrb();
Class cl = valueRef.v.getClass();
String str = cl.getName();
@@ -701,6 +700,5 @@
private Streamable m_streamable = null;
private Field m_field = null;
- private com.sun.corba.se.spi.orb.ORB m_spi_orb;
private Vector<ReturnCode> m_status = new Vector<ReturnCode>();
}
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortCorbaCdrProvider.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortCorbaCdrProvider.java 2011-12-08 05:42:14 UTC (rev 596)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortCorbaCdrProvider.java 2011-12-12 01:45:48 UTC (rev 597)
@@ -19,7 +19,6 @@
import OpenRTM.OutPortCdrPOA;
import _SDOPackage.NVListHolder;
-import com.sun.corba.se.impl.encoding.EncapsOutputStream;
/**
* {@.ja OutPortCorbaCdrProvider クラス}
@@ -168,9 +167,9 @@
if (ret.equals(jp.go.aist.rtm.RTC.buffer.ReturnCode.BUFFER_OK)) {
- EncapsOutputStream outcdr;
- outcdr = (EncapsOutputStream)cdr_ref.v;
- data.value = outcdr.toByteArray();
+ EncapsOutputStreamExt outcdr;
+ outcdr = (EncapsOutputStreamExt)cdr_ref.v;
+ data.value = outcdr.getByteArray();
}
return convertReturn(ret);
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortPullConnector.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortPullConnector.java 2011-12-08 05:42:14 UTC (rev 596)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortPullConnector.java 2011-12-12 01:45:48 UTC (rev 597)
@@ -8,7 +8,7 @@
import org.omg.CORBA.portable.OutputStream;
-import com.sun.corba.se.impl.encoding.EncapsOutputStream;
+import org.omg.CORBA.ORB;
/**
* {@.ja OutPortPullConnector クラス}
@@ -146,7 +146,7 @@
m_provider = provider;
m_buffer = buffer;
m_listeners = listeners;
- m_spi_orb = (com.sun.corba.se.spi.orb.ORB)ORBUtil.getOrb();
+ m_orb = ORBUtil.getOrb();
// create buffer
if (m_buffer == null) {
m_buffer = createBuffer(profile);
@@ -179,7 +179,7 @@
rtcout.println(Logbuf.TRACE, "write()");
OutPort out = (OutPort)m_outport;
OutputStream cdr
- = new EncapsOutputStream(m_spi_orb,m_isLittleEndian);
+ = new EncapsOutputStreamExt(m_orb,m_isLittleEndian);
out.write_stream(data,cdr);
m_buffer.write(cdr);
return ReturnCode.PORT_OK;
@@ -305,7 +305,7 @@
* <p> the pointer to the buffer </p>
*/
protected BufferBase<OutputStream> m_buffer;
- private com.sun.corba.se.spi.orb.ORB m_spi_orb;
+ private ORB m_orb;
private OutPortBase m_outport;
/**
* <p> A reference to a ConnectorListener </p>
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortPushConnector.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortPushConnector.java 2011-12-08 05:42:14 UTC (rev 596)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortPushConnector.java 2011-12-12 01:45:48 UTC (rev 597)
@@ -14,7 +14,7 @@
import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.Streamable;
-import com.sun.corba.se.impl.encoding.EncapsOutputStream;
+import org.omg.CORBA.ORB;
public class OutPortPushConnector extends OutPortConnector {
/**
@@ -153,7 +153,7 @@
m_publisher.setBuffer(m_buffer);
m_publisher.setListener(m_profile, m_listeners);
- m_spi_orb = (com.sun.corba.se.spi.orb.ORB)ORBUtil.getOrb();
+ m_orb = ORBUtil.getOrb();
onConnect();
@@ -199,7 +199,7 @@
rtcout.println(Logbuf.TRACE, "write()");
OutPort out = (OutPort)m_outport;
OutputStream cdr
- = new EncapsOutputStream(m_spi_orb,m_isLittleEndian);
+ = new EncapsOutputStreamExt(m_orb,m_isLittleEndian);
out.write_stream(data,cdr);
return m_publisher.write(cdr,0,0);
}
@@ -353,7 +353,7 @@
private BufferBase<OutputStream> m_buffer;
private Streamable m_streamable = null;
private Field m_field = null;
- private com.sun.corba.se.spi.orb.ORB m_spi_orb;
+ private ORB m_orb;
private OutPortBase m_outport;
/**
* <p> A reference to a ConnectorListener </p>
openrtm-commit メーリングリストの案内