[openrtm-commit:02338] r922 - 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月 26日 (木) 19:15:39 JST
Author: win-ei
Date: 2017-01-26 19:15:39 +0900 (Thu, 26 Jan 2017)
New Revision: 922
Modified:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortPushConnector.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortCorbaCdrProvider.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortDSProvider.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortSHMProvider.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/Timestamp.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/InPortPushConnector.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortPushConnector.java 2017-01-26 09:19:52 UTC (rev 921)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortPushConnector.java 2017-01-26 10:15:39 UTC (rev 922)
@@ -144,8 +144,11 @@
DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
jp.go.aist.rtm.RTC.buffer.ReturnCode ret
= m_buffer.read(dataref, -1, -1);
+ //data.v = dataref.v.create_input_stream();
+ //return convertReturn(ret,dataref.v);
+ ReturnCode code = convertReturn(ret,dataref);
data.v = dataref.v.create_input_stream();
- return convertReturn(ret,dataref.v);
+ return code;
}
/**
@@ -236,7 +239,7 @@
m_profile);
}
- protected void onBufferRead(OutputStream data) {
+ protected void onBufferRead(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_READ].notify(m_profile, data);
}
@@ -259,10 +262,13 @@
* {@.ja jp.go.aist.rtm.RTC.port.ReturnCode}
* {@.en jp.go.aist.rtm.RTC.port.ReturnCode}
*/
- protected ReturnCode convertReturn(jp.go.aist.rtm.RTC.buffer.ReturnCode status, OutputStream data) {
+ protected ReturnCode convertReturn(jp.go.aist.rtm.RTC.buffer.ReturnCode status, DataRef<OutputStream> data) {
switch (status) {
case BUFFER_OK:
+ //DataRef<OutputStream> dataref = new DataRef<OutputStream>(data);
+ //onBufferRead(data);
onBufferRead(data);
+ //data = (EncapsOutputStreamExt)dataref.v;
return ReturnCode.PORT_OK;
case BUFFER_EMPTY:
onBufferEmpty();
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortCorbaCdrProvider.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortCorbaCdrProvider.java 2017-01-26 09:19:52 UTC (rev 921)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortCorbaCdrProvider.java 2017-01-26 10:15:39 UTC (rev 922)
@@ -478,8 +478,7 @@
// connectorData_[ConnectorDataListenerType.ON_BUFFER_OVERWRITE].notify(m_profile, data);
// }
- private void onBufferRead(OutputStream data)
- {
+ private void onBufferRead(DataRef<OutputStream> data) {
m_listeners.
connectorData_[ConnectorDataListenerType.ON_BUFFER_READ].notify(m_profile, data);
}
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortDSProvider.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortDSProvider.java 2017-01-26 09:19:52 UTC (rev 921)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortDSProvider.java 2017-01-26 10:15:39 UTC (rev 922)
@@ -479,8 +479,7 @@
// connectorData_[ConnectorDataListenerType.ON_BUFFER_OVERWRITE].notify(m_profile, data);
// }
- private void onBufferRead(final OutputStream data)
- {
+ private void onBufferRead(DataRef<OutputStream> data) {
m_listeners.
connectorData_[ConnectorDataListenerType.ON_BUFFER_READ].notify(m_profile, data);
}
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortSHMProvider.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortSHMProvider.java 2017-01-26 09:19:52 UTC (rev 921)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortSHMProvider.java 2017-01-26 10:15:39 UTC (rev 922)
@@ -470,8 +470,7 @@
// connectorData_[ConnectorDataListenerType.ON_BUFFER_OVERWRITE].notify(m_profile, data);
// }
- private void onBufferRead(final OutputStream data)
- {
+ private void onBufferRead(DataRef<OutputStream> data) {
m_listeners.
connectorData_[ConnectorDataListenerType.ON_BUFFER_READ].notify(m_profile, data);
}
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/Timestamp.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/Timestamp.java 2017-01-26 09:19:52 UTC (rev 921)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/Timestamp.java 2017-01-26 10:15:39 UTC (rev 922)
@@ -21,7 +21,6 @@
TimeValue tv = m_clock.getTime();
RTC.Time tm = new RTC.Time((int)(tv.getSec()),
(int)(tv.getUsec()*1000));
-// RTC.Time tm = new RTC.Time((int)0, (int)0);
Class cl = data.getClass();
String str = cl.getName();
try {
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 09:19:52 UTC (rev 921)
+++ 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)
@@ -105,9 +105,12 @@
try {
while (m_buffer.readable() > 0) {
OutputStream cdr = m_buffer.get();
- onBufferRead(cdr);
+ DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
+ //onBufferRead(cdr);
+ onBufferRead(dataref);
+ cdr = (EncapsOutputStreamExt)dataref.v;
- DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
+ dataref.v = cdr;
onSend(dataref);
//onSend(cdr);
cdr = (EncapsOutputStreamExt)dataref.v;
@@ -140,9 +143,12 @@
rtcout.println(Logbuf.TRACE, "pushFifo()");
try {
OutputStream cdr = m_buffer.get();
- onBufferRead(cdr);
+ DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
+ //onBufferRead(cdr);
+ onBufferRead(dataref);
+ cdr = (EncapsOutputStreamExt)dataref.v;
- DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
+ dataref.v = cdr;
onSend(dataref);
//onSend(cdr);
cdr = (EncapsOutputStreamExt)dataref.v;
@@ -182,9 +188,12 @@
m_buffer.advanceRptr(postskip);
OutputStream cdr = m_buffer.get();
- onBufferRead(cdr);
+ DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
+ //onBufferRead(cdr);
+ onBufferRead(dataref);
+ cdr = (EncapsOutputStreamExt)dataref.v;
- DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
+ dataref.v = cdr;
onSend(dataref);
//onSend(cdr);
cdr = (EncapsOutputStreamExt)dataref.v;
@@ -230,9 +239,12 @@
m_buffer.advanceRptr(m_buffer.readable() - 1);
OutputStream cdr = m_buffer.get();
- onBufferRead(cdr);
+ DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
+ //onBufferRead(cdr);
+ onBufferRead(dataref);
+ cdr = (EncapsOutputStreamExt)dataref.v;
- DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
+ dataref.v = cdr;
//onSend(cdr);
onSend(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
@@ -771,7 +783,8 @@
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_OVERWRITE].notify(m_profile, data);
}
- protected void onBufferRead(OutputStream data) {
+ //protected void onBufferRead(OutputStream data) {
+ protected void onBufferRead(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_READ].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 09:19:52 UTC (rev 921)
+++ 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)
@@ -86,9 +86,12 @@
while (m_buffer.readable() > 0) {
OutputStream cdr = m_buffer.get();
- onBufferRead(cdr);
+ DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
+ //onBufferRead(cdr);
+ onBufferRead(dataref);
+ cdr = (EncapsOutputStreamExt)dataref.v;
- DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
+ dataref.v = cdr;
//onSend(cdr);
onSend(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
@@ -120,9 +123,12 @@
return ReturnCode.BUFFER_EMPTY;
}
OutputStream cdr = m_buffer.get();
- onBufferRead(cdr);
+ DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
+ //onBufferRead(cdr);
+ onBufferRead(dataref);
+ cdr = (EncapsOutputStreamExt)dataref.v;
- DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
+ dataref.v = cdr;
//onSend(cdr);
onSend(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
@@ -161,9 +167,12 @@
for (int i = 0; i < loopcnt; ++i) {
m_buffer.advanceRptr(postskip);
OutputStream cdr = m_buffer.get();
- onBufferRead(cdr);
+ DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
+ //onBufferRead(cdr);
+ onBufferRead(dataref);
+ cdr = (EncapsOutputStreamExt)dataref.v;
- DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
+ dataref.v = cdr;
//onSend(cdr);
onSend(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
@@ -202,9 +211,12 @@
m_buffer.advanceRptr(m_buffer.readable() - 1);
OutputStream cdr = m_buffer.get();
- onBufferRead(cdr);
+ DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
+ //onBufferRead(cdr);
+ onBufferRead(dataref);
+ cdr = (EncapsOutputStreamExt)dataref.v;
- DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
+ dataref.v =cdr;
//onSend(cdr);
onSend(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
@@ -778,7 +790,7 @@
// m_listeners.connectorData_[ConnectorListenerType.ON_BUFFER_OVERWRITE].notify(m_profile, data);
// }
- protected void onBufferRead(OutputStream data) {
+ protected void onBufferRead(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_READ].notify(m_profile, data);
}
More information about the openrtm-commit
mailing list