[openrtm-commit:02355] r926 - 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月 30日 (月) 18:51:49 JST
Author: win-ei
Date: 2017-01-30 18:51:49 +0900 (Mon, 30 Jan 2017)
New Revision: 926
Modified:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/ConnectorDataListenerHolder.java
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/InPortPullConnector.java
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/InPortSHMProvider.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortBase.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/publisher/PublisherFlush.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/ConnectorDataListenerHolder.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/ConnectorDataListenerHolder.java 2017-01-29 10:45:32 UTC (rev 925)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/ConnectorDataListenerHolder.java 2017-01-30 09:51:49 UTC (rev 926)
@@ -21,7 +21,6 @@
}
public ReturnCode notify(ConnectorBase.ConnectorInfo info,
DataRef<OutputStream> cdrdata) {
-// OutputStream cdrdata) {
super.setChanged();
ReturnCode ret = ReturnCode.NO_CHANGE;
//ConnectorDataListenerArgument arg
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-29 10:45:32 UTC (rev 925)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortCorbaCdrProvider.java 2017-01-30 09:51:49 UTC (rev 926)
@@ -211,7 +211,6 @@
protected OpenRTM.PortStatus
convertReturn(jp.go.aist.rtm.RTC.buffer.ReturnCode status,
DataRef<OutputStream> data){
-// EncapsOutputStreamExt data) {
switch (status) {
case BUFFER_OK:
onBufferWrite(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-29 10:45:32 UTC (rev 925)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortDSProvider.java 2017-01-30 09:51:49 UTC (rev 926)
@@ -193,7 +193,6 @@
protected RTC.PortStatus
convertReturn(jp.go.aist.rtm.RTC.buffer.ReturnCode status,
DataRef<OutputStream> data){
-// final EncapsOutputStreamExt data) {
switch (status) {
case BUFFER_OK:
onBufferWrite(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-29 10:45:32 UTC (rev 925)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortDirectProvider.java 2017-01-30 09:51:49 UTC (rev 926)
@@ -211,7 +211,6 @@
protected OpenRTM.PortStatus
convertReturn(jp.go.aist.rtm.RTC.buffer.ReturnCode status,
DataRef<OutputStream> data){
-// EncapsOutputStreamExt data) {
switch (status) {
case BUFFER_OK:
onBufferWrite(data);
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortPullConnector.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortPullConnector.java 2017-01-29 10:45:32 UTC (rev 925)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortPullConnector.java 2017-01-30 09:51:49 UTC (rev 926)
@@ -148,12 +148,10 @@
public ReturnCode read(DataRef<InputStream> data){
rtcout.println(Logbuf.TRACE, "InPortPullConnector.read()");
if (m_directOutPort != null) {
- OutPort outport = (OutPort)m_directOutPort;
- //DataRef<DataType> dataref
- // = new DataRef<DataType>(data);
- outport.read(data);
- // ON_RECEIVED(In,Out) callback
- return ReturnCode.PORT_OK;
+ return ReturnCode.BUFFER_EMPTY;
+ //OutPort outport = (OutPort)m_directOutPort;
+ //outport.read(data);
+ //return ReturnCode.PORT_OK;
}
if (m_consumer == null) {
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-29 10:45:32 UTC (rev 925)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortPushConnector.java 2017-01-30 09:51:49 UTC (rev 926)
@@ -265,10 +265,7 @@
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/InPortSHMProvider.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortSHMProvider.java 2017-01-29 10:45:32 UTC (rev 925)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortSHMProvider.java 2017-01-30 09:51:49 UTC (rev 926)
@@ -193,7 +193,6 @@
protected OpenRTM.PortStatus
convertReturn(jp.go.aist.rtm.RTC.buffer.ReturnCode status,
DataRef<OutputStream> data){
-// final EncapsOutputStreamExt data) {
switch (status) {
case BUFFER_OK:
onBufferWrite(data);
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortBase.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortBase.java 2017-01-29 10:45:32 UTC (rev 925)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortBase.java 2017-01-30 09:51:49 UTC (rev 926)
@@ -1599,7 +1599,22 @@
return null;
}
rtcout.println(Logbuf.TRACE, "OutPortPullConnector create");
+
+ String type = prop.getProperty("interface_type").trim();
+ rtcout.println(Logbuf.PARANOID, "interface_type= " + type);
+ if (type.equals("direct")) {
+ InPortBase inport = getLocalInPort(profile);
+ if (inport == null) {
+ rtcout.println(Logbuf.DEBUG,
+ "interface_type is direct, " +
+ "but a peer InPort servant could not be obtained.");
+ //delete connector;
+ return null;
+ }
+ connector.setInPort(inport);
+ }
+
m_connectors.add(connector);
rtcout.println(Logbuf.PARANOID,
"connector push backed: "+m_connectors.size());
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-29 10:45:32 UTC (rev 925)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortCorbaCdrConsumer.java 2017-01-30 09:51:49 UTC (rev 926)
@@ -173,7 +173,6 @@
DataRef<OutputStream> dataref = new DataRef<OutputStream>(data);
onReceived(dataref);
data = (EncapsOutputStreamExt)dataref.v;
- //onReceived(data);
dataref.v = data;
onBufferWrite(dataref);
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-29 10:45:32 UTC (rev 925)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortDSConsumer.java 2017-01-30 09:51:49 UTC (rev 926)
@@ -517,7 +517,6 @@
* {@.ja OutputStream}
* {@.en OutputStream}
*/
- //private void onReceived(final OutputStream data) {
private void onReceived(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_RECEIVED].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-29 10:45:32 UTC (rev 925)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortDirectProvider.java 2017-01-30 09:51:49 UTC (rev 926)
@@ -210,7 +210,6 @@
protected OpenRTM.PortStatus
convertReturn(jp.go.aist.rtm.RTC.buffer.ReturnCode status,
DataRef<OutputStream> data) {
-// final EncapsOutputStreamExt data) {
switch (status) {
case BUFFER_OK:
onBufferWrite(data);
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherFlush.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherFlush.java 2017-01-29 10:45:32 UTC (rev 925)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherFlush.java 2017-01-30 09:51:49 UTC (rev 926)
@@ -189,7 +189,6 @@
dataref.v = data;
onReceived(dataref);
data = (EncapsOutputStreamExt)dataref.v;
- //onReceived(data);
return ret;
case PORT_ERROR:
onReceiverError(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-29 10:45:32 UTC (rev 925)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherNew.java 2017-01-30 09:51:49 UTC (rev 926)
@@ -106,13 +106,11 @@
while (m_buffer.readable() > 0) {
OutputStream cdr = m_buffer.get();
DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
- //onBufferRead(cdr);
onBufferRead(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
dataref.v = cdr;
onSend(dataref);
- //onSend(cdr);
cdr = (EncapsOutputStreamExt)dataref.v;
ReturnCode ret = m_consumer.put(cdr);
@@ -123,7 +121,6 @@
dataref.v = cdr;
onReceived(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
- //onReceived(cdr);
m_buffer.advanceRptr();
}
@@ -150,7 +147,6 @@
dataref.v = cdr;
onSend(dataref);
- //onSend(cdr);
cdr = (EncapsOutputStreamExt)dataref.v;
ReturnCode ret = m_consumer.put(cdr);
@@ -161,7 +157,6 @@
dataref.v = cdr;
onReceived(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
- //onReceived(cdr);
m_buffer.advanceRptr();
@@ -195,7 +190,6 @@
dataref.v = cdr;
onSend(dataref);
- //onSend(cdr);
cdr = (EncapsOutputStreamExt)dataref.v;
ret = m_consumer.put(cdr);
if (!ret.equals(ReturnCode.PORT_OK)) {
@@ -206,7 +200,6 @@
dataref.v = cdr;
onReceived(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
- //onReceived(cdr);
postskip = m_skipn +1;
}
m_buffer.advanceRptr(m_buffer.readable());
@@ -245,7 +238,6 @@
cdr = (EncapsOutputStreamExt)dataref.v;
dataref.v = cdr;
- //onSend(cdr);
onSend(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
ReturnCode ret = m_consumer.put(cdr);
@@ -257,7 +249,6 @@
dataref.v = cdr;
onReceived(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
- //onReceived(cdr);
m_buffer.advanceRptr();
return ret;
}
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-29 10:45:32 UTC (rev 925)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherPeriodic.java 2017-01-30 09:51:49 UTC (rev 926)
@@ -87,12 +87,10 @@
while (m_buffer.readable() > 0) {
OutputStream cdr = m_buffer.get();
DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
- //onBufferRead(cdr);
onBufferRead(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
dataref.v = cdr;
- //onSend(cdr);
onSend(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
ReturnCode ret = m_consumer.put(cdr);
@@ -104,7 +102,6 @@
dataref.v = cdr;
onReceived(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
- //onReceived(cdr);
m_buffer.advanceRptr();
}
return ReturnCode.PORT_OK;
@@ -124,12 +121,10 @@
}
OutputStream cdr = m_buffer.get();
DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
- //onBufferRead(cdr);
onBufferRead(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
dataref.v = cdr;
- //onSend(cdr);
onSend(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
ReturnCode ret = m_consumer.put(cdr);
@@ -173,7 +168,6 @@
cdr = (EncapsOutputStreamExt)dataref.v;
dataref.v = cdr;
- //onSend(cdr);
onSend(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
ret = m_consumer.put(cdr);
@@ -212,12 +206,10 @@
OutputStream cdr = m_buffer.get();
DataRef<OutputStream> dataref = new DataRef<OutputStream>(cdr);
- //onBufferRead(cdr);
onBufferRead(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
dataref.v =cdr;
- //onSend(cdr);
onSend(dataref);
cdr = (EncapsOutputStreamExt)dataref.v;
ReturnCode ret = m_consumer.put(cdr);
@@ -800,7 +792,6 @@
m_listeners.connectorData_[ConnectorDataListenerType.ON_SEND].notify(m_profile, data);
}
- //protected void onReceived(OutputStream data) {
protected void onReceived(DataRef<OutputStream> data) {
m_listeners.connectorData_[ConnectorDataListenerType.ON_RECEIVED].notify(m_profile, data);
}
@@ -849,7 +840,6 @@
private int m_leftskip;
private String m_retmutex = new String();;
private boolean m_readback;
-//zxc private ConnectorListeners m_listeners = new ConnectorListeners();
private ConnectorListeners m_listeners;
private ConnectorBase.ConnectorInfo m_profile;
}
More information about the openrtm-commit
mailing list