[openrtm-commit:02339] r923 - in trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port: . publisher
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 1月 27日 (金) 00:50:30 JST
Author: win-ei
Date: 2017-01-27 00:50:29 +0900 (Fri, 27 Jan 2017)
New Revision: 923
Modified:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortCorbaCdrProvider.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortDSProvider.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortDirectProvider.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortSHMProvider.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/OutPortDSConsumer.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortDirectProvider.java
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/publisher/PublisherNew.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherPeriodic.java
Log:
[FSM4RTC,bugfix]Fixed bugs. refs #3886
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortCorbaCdrProvider.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortCorbaCdrProvider.java 2017-01-26 10:15:39 UTC (rev 922)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortCorbaCdrProvider.java 2017-01-26 15:50:29 UTC (rev 923)
@@ -151,7 +151,10 @@
EncapsOutputStreamExt cdr
= new EncapsOutputStreamExt(m_orb,m_connector.isLittleEndian());
cdr.write_octet_array(data, 0, data.length);
- onReceiverError(cdr);
+ DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
+ //onReceiverError(cdr);
+ onReceiverError(dataref);
+ cdr = (EncapsOutputStreamExt)dataref.v;
return OpenRTM.PortStatus.PORT_ERROR;
}
@@ -169,7 +172,9 @@
onReceived(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
jp.go.aist.rtm.RTC.buffer.ReturnCode ret = m_buffer.write(cdr);
- return convertReturn(ret,cdr);
+ //return convertReturn(ret,cdr);
+ OpenRTM.PortStatus stat = convertReturn(ret,dataref);
+ return stat;
}
/**
@@ -205,7 +210,8 @@
*/
protected OpenRTM.PortStatus
convertReturn(jp.go.aist.rtm.RTC.buffer.ReturnCode status,
- EncapsOutputStreamExt data) {
+ DataRef<OutputStream> data){
+// EncapsOutputStreamExt data) {
switch (status) {
case BUFFER_OK:
onBufferWrite(data);
@@ -486,7 +492,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onBufferWrite(OutputStream data) {
+ private void onBufferWrite(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_WRITE].notify(m_profile, data);
}
@@ -497,7 +503,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onBufferFull(OutputStream data) {
+ private void onBufferFull(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_FULL].notify(m_profile, data);
}
@@ -508,7 +514,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onBufferWriteTimeout(OutputStream data) {
+ private void onBufferWriteTimeout(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_WRITE_TIMEOUT].notify(m_profile, data);
}
@@ -549,7 +555,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onReceiverFull(OutputStream data) {
+ private void onReceiverFull(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_RECEIVER_FULL].notify(m_profile, data);
}
@@ -560,7 +566,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onReceiverTimeout(OutputStream data) {
+ private void onReceiverTimeout(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_RECEIVER_TIMEOUT].notify(m_profile, data);
}
@@ -571,7 +577,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onReceiverError(OutputStream data) {
+ private void onReceiverError(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_RECEIVER_ERROR].notify(m_profile, data);
}
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortDSProvider.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortDSProvider.java 2017-01-26 10:15:39 UTC (rev 922)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortDSProvider.java 2017-01-26 15:50:29 UTC (rev 923)
@@ -192,7 +192,8 @@
*/
protected RTC.PortStatus
convertReturn(jp.go.aist.rtm.RTC.buffer.ReturnCode status,
- final EncapsOutputStreamExt data) {
+ DataRef<OutputStream> data){
+// final EncapsOutputStreamExt data) {
switch (status) {
case BUFFER_OK:
onBufferWrite(data);
@@ -472,7 +473,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onBufferWrite(final OutputStream data) {
+ private void onBufferWrite(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_WRITE].notify(m_profile, data);
}
@@ -483,7 +484,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onBufferFull(final OutputStream data) {
+ private void onBufferFull(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_FULL].notify(m_profile, data);
}
@@ -494,7 +495,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onBufferWriteTimeout(final OutputStream data) {
+ private void onBufferWriteTimeout(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_WRITE_TIMEOUT].notify(m_profile, data);
}
@@ -536,7 +537,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onReceiverFull(final OutputStream data) {
+ private void onReceiverFull(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_RECEIVER_FULL].notify(m_profile, data);
}
@@ -547,7 +548,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onReceiverTimeout(final OutputStream data) {
+ private void onReceiverTimeout(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_RECEIVER_TIMEOUT].notify(m_profile, data);
}
@@ -558,7 +559,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onReceiverError(final OutputStream data) {
+ private void onReceiverError(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_RECEIVER_ERROR].notify(m_profile, data);
}
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortDirectProvider.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortDirectProvider.java 2017-01-26 10:15:39 UTC (rev 922)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortDirectProvider.java 2017-01-26 15:50:29 UTC (rev 923)
@@ -210,7 +210,8 @@
*/
protected OpenRTM.PortStatus
convertReturn(jp.go.aist.rtm.RTC.buffer.ReturnCode status,
- EncapsOutputStreamExt data) {
+ DataRef<OutputStream> data){
+// EncapsOutputStreamExt data) {
switch (status) {
case BUFFER_OK:
onBufferWrite(data);
@@ -498,7 +499,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onBufferWrite(OutputStream data) {
+ private void onBufferWrite(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_WRITE].notify(m_profile, data);
}
@@ -509,7 +510,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onBufferFull(OutputStream data) {
+ private void onBufferFull(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_FULL].notify(m_profile, data);
}
@@ -520,7 +521,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onBufferWriteTimeout(OutputStream data) {
+ private void onBufferWriteTimeout(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_WRITE_TIMEOUT].notify(m_profile, data);
}
@@ -562,7 +563,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onReceiverFull(OutputStream data) {
+ private void onReceiverFull(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_RECEIVER_FULL].notify(m_profile, data);
}
@@ -573,7 +574,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onReceiverTimeout(OutputStream data) {
+ private void onReceiverTimeout(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_RECEIVER_TIMEOUT].notify(m_profile, data);
}
@@ -584,7 +585,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onReceiverError(OutputStream data) {
+ private void onReceiverError(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_RECEIVER_ERROR].notify(m_profile, data);
}
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortSHMProvider.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortSHMProvider.java 2017-01-26 10:15:39 UTC (rev 922)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortSHMProvider.java 2017-01-26 15:50:29 UTC (rev 923)
@@ -192,7 +192,8 @@
*/
protected OpenRTM.PortStatus
convertReturn(jp.go.aist.rtm.RTC.buffer.ReturnCode status,
- final EncapsOutputStreamExt data) {
+ DataRef<OutputStream> data){
+// final EncapsOutputStreamExt data) {
switch (status) {
case BUFFER_OK:
onBufferWrite(data);
@@ -472,7 +473,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onBufferWrite(final OutputStream data) {
+ private void onBufferWrite(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_WRITE].notify(m_profile, data);
}
@@ -483,7 +484,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onBufferFull(final OutputStream data) {
+ private void onBufferFull(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_FULL].notify(m_profile, data);
}
@@ -494,7 +495,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onBufferWriteTimeout(final OutputStream data) {
+ private void onBufferWriteTimeout(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_WRITE_TIMEOUT].notify(m_profile, data);
}
@@ -536,7 +537,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onReceiverFull(final OutputStream data) {
+ private void onReceiverFull(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_RECEIVER_FULL].notify(m_profile, data);
}
@@ -547,7 +548,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onReceiverTimeout(final OutputStream data) {
+ private void onReceiverTimeout(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_RECEIVER_TIMEOUT].notify(m_profile, data);
}
@@ -558,7 +559,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onReceiverError(final OutputStream data) {
+ private void onReceiverError(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_RECEIVER_ERROR].notify(m_profile, data);
}
@@ -685,7 +686,10 @@
EncapsOutputStreamExt cdr
= new EncapsOutputStreamExt(m_orb,m_connector.isLittleEndian());
cdr.write_octet_array(cdr_data.value, 0, cdr_data.value.length);
- onReceiverError(cdr);
+ DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
+ //onReceiverError(cdr);
+ onReceiverError(dataref);
+ cdr = (EncapsOutputStreamExt)dataref.v;
return OpenRTM.PortStatus.PORT_ERROR;
}
@@ -710,7 +714,11 @@
jp.go.aist.rtm.RTC.buffer.ReturnCode ret = m_buffer.write(cdr);
//jp.go.aist.rtm.RTC.buffer.ReturnCode ret = m_connector.write(cdr);
- return convertReturn(ret,cdr);
+ //return convertReturn(ret,cdr);
+ dataref.v = cdr;
+ OpenRTM.PortStatus stat = convertReturn(ret,dataref);
+ cdr = (EncapsOutputStreamExt)dataref.v;
+ return stat;
}
/**
* <p>インタフェース情報を保持するオブジェクトです。</p>
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-01-26 10:15:39 UTC (rev 922)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortCorbaCdrConsumer.java 2017-01-26 15:50:29 UTC (rev 923)
@@ -174,8 +174,11 @@
onReceived(dataref);
data = (EncapsOutputStreamExt)dataref.v;
//onReceived(data);
- onBufferWrite(data);
+ dataref.v = data;
+ onBufferWrite(dataref);
+ data = (EncapsOutputStreamExt)dataref.v;
+
if (m_buffer.full()) {
rtcout.println(Logbuf.INFO,
"InPort buffer is full.");
@@ -429,7 +432,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onBufferWrite(OutputStream data) {
+ private void onBufferWrite(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_WRITE].notify(m_profile, data);
}
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortDSConsumer.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortDSConsumer.java 2017-01-26 10:15:39 UTC (rev 922)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortDSConsumer.java 2017-01-26 15:50:29 UTC (rev 923)
@@ -221,8 +221,11 @@
onReceived(dataref);
data = (EncapsOutputStreamExt)dataref.v;
//onReceived(data);
- onBufferWrite(data);
+ dataref.v = data;
+ onBufferWrite(dataref);
+ data = (EncapsOutputStreamExt)dataref.v;
+
if (m_buffer.full()) {
rtcout.println(Logbuf.INFO,
"InPort buffer is full.");
@@ -476,7 +479,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onBufferWrite(final OutputStream data) {
+ private void onBufferWrite(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_WRITE].notify(m_profile, data);
}
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortDirectProvider.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortDirectProvider.java 2017-01-26 10:15:39 UTC (rev 922)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortDirectProvider.java 2017-01-26 15:50:29 UTC (rev 923)
@@ -209,7 +209,8 @@
*/
protected OpenRTM.PortStatus
convertReturn(jp.go.aist.rtm.RTC.buffer.ReturnCode status,
- final EncapsOutputStreamExt data) {
+ DataRef<OutputStream> data) {
+// final EncapsOutputStreamExt data) {
switch (status) {
case BUFFER_OK:
onBufferWrite(data);
@@ -497,7 +498,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onBufferWrite(final OutputStream data) {
+ private void onBufferWrite(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_WRITE].notify(m_profile, data);
}
@@ -508,7 +509,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onBufferFull(final OutputStream data) {
+ private void onBufferFull(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_FULL].notify(m_profile, data);
}
@@ -519,7 +520,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onBufferWriteTimeout(final OutputStream data) {
+ private void onBufferWriteTimeout(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_WRITE_TIMEOUT].notify(m_profile, data);
}
@@ -530,7 +531,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onBufferWriteOverwrite(final OutputStream data) {
+ private void onBufferWriteOverwrite(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_OVERWRITE].notify(m_profile, data);
}
@@ -561,7 +562,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onReceiverFull(final OutputStream data) {
+ private void onReceiverFull(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_RECEIVER_FULL].notify(m_profile, data);
}
@@ -572,7 +573,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onReceiverTimeout(final OutputStream data) {
+ private void onReceiverTimeout(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_RECEIVER_TIMEOUT].notify(m_profile, data);
}
@@ -583,7 +584,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onReceiverError(final OutputStream data) {
+ private void onReceiverError(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_RECEIVER_ERROR].notify(m_profile, data);
}
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-01-26 10:15:39 UTC (rev 922)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortSHMConsumer.java 2017-01-26 15:50:29 UTC (rev 923)
@@ -218,7 +218,10 @@
onReceived(dataref);
data = (EncapsOutputStreamExt)dataref.v;
//onReceived(data);
- onBufferWrite(data);
+
+ dataref.v = data;
+ onBufferWrite(dataref);
+ data = (EncapsOutputStreamExt)dataref.v;
if (m_buffer.full()) {
rtcout.println(Logbuf.INFO,
"InPort buffer is full.");
@@ -474,7 +477,7 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- private void onBufferWrite(final OutputStream data) {
+ private void onBufferWrite(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_WRITE].notify(m_profile, data);
}
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherNew.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherNew.java 2017-01-26 10:15:39 UTC (rev 922)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherNew.java 2017-01-26 15:50:29 UTC (rev 923)
@@ -598,7 +598,9 @@
assert m_buffer != null;
- onBufferWrite(data);
+ DataRef<OutputStream> dataref = new DataRef<OutputStream>(data);
+ onBufferWrite(dataref);
+ data = (EncapsOutputStreamExt)dataref.v;
jp.go.aist.rtm.RTC.buffer.ReturnCode ret;
ret = m_buffer.write(data, sec, usec);
@@ -767,7 +769,7 @@
/**
* <p> Connector data listener functions </p>
*/
- private void onBufferWrite(OutputStream data) {
+ private void onBufferWrite(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_WRITE].notify(m_profile, data);
}
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherPeriodic.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherPeriodic.java 2017-01-26 10:15:39 UTC (rev 922)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherPeriodic.java 2017-01-26 15:50:29 UTC (rev 923)
@@ -613,7 +613,9 @@
return ReturnCode.BUFFER_FULL;
}
- onBufferWrite(data);
+ DataRef<OutputStream> dataref = new DataRef<OutputStream>(data);
+ onBufferWrite(dataref);
+ data = (EncapsOutputStreamExt)dataref.v;
jp.go.aist.rtm.RTC.buffer.ReturnCode ret;
ret = m_buffer.write(data, sec, usec);
rtcout.println(Logbuf.DEBUG, ret.name() +" = write()" );
@@ -774,7 +776,7 @@
/**
* <p> Connector data listener functions </p>
*/
- protected void onBufferWrite(OutputStream data) {
+ protected void onBufferWrite(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_WRITE].notify(m_profile, data);
}
More information about the openrtm-commit
mailing list