[openrtm-commit:02334] r918 - trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 1月 25日 (水) 17:49:47 JST
Author: win-ei
Date: 2017-01-25 17:49:46 +0900 (Wed, 25 Jan 2017)
New Revision: 918
Modified:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortPushConnector.java
Log:
[FSM4RTC,incompat] Some callback points have been added. 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-25 08:46:24 UTC (rev 917)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortPushConnector.java 2017-01-25 08:49:46 UTC (rev 918)
@@ -145,7 +145,7 @@
jp.go.aist.rtm.RTC.buffer.ReturnCode ret
= m_buffer.read(dataref, -1, -1);
data.v = dataref.v.create_input_stream();
- return convertReturn(ret);
+ return convertReturn(ret,dataref.v);
}
/**
@@ -236,6 +236,18 @@
m_profile);
}
+ protected void onBufferRead(OutputStream data) {
+ m_listeners.connectorData_[ConnectorDataListenerType.ON_BUFFER_READ].notify(m_profile, data);
+ }
+
+ protected void onBufferEmpty() {
+ m_listeners.connector_[ConnectorListenerType.ON_BUFFER_EMPTY].notify(m_profile);
+ }
+
+ protected void onBufferReadTimeout(){
+ m_listeners.connector_[ConnectorListenerType.ON_BUFFER_READ_TIMEOUT].notify(m_profile);
+ }
+
/**
* {@.ja buffer.ReturnCodeをport.ReturnCodeに変換する。}
* {@.en Converts buffer.ReturnCode into port.ReturnCode.}
@@ -247,13 +259,16 @@
* {@.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) {
+ protected ReturnCode convertReturn(jp.go.aist.rtm.RTC.buffer.ReturnCode status, OutputStream data) {
switch (status) {
case BUFFER_OK:
+ onBufferRead(data);
return ReturnCode.PORT_OK;
case BUFFER_EMPTY:
+ onBufferEmpty();
return ReturnCode.BUFFER_EMPTY;
case TIMEOUT:
+ onBufferReadTimeout();
return ReturnCode.BUFFER_TIMEOUT;
case PRECONDITION_NOT_MET:
return ReturnCode.PRECONDITION_NOT_MET;
More information about the openrtm-commit
mailing list