[openrtm-commit:02333] r917 - in trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src: RTMExamples/SimpleIO RTMExamples/StaticFsm jp/go/aist/rtm/RTC/port
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 1月 25日 (水) 17:46:24 JST
Author: win-ei
Date: 2017-01-25 17:46:24 +0900 (Wed, 25 Jan 2017)
New Revision: 917
Modified:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SimpleIO/ConsoleInImpl.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SimpleIO/ConsoleOutImpl.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsmImpl.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/ConnectorDataListener.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/ConnectorListener.java
Log:
[FSM4RTC,incompat] Connector listeners intarfaces have been changed to modify info and data in the listeners and return its status. refs #3886
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SimpleIO/ConsoleInImpl.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SimpleIO/ConsoleInImpl.java 2017-01-25 07:34:37 UTC (rev 916)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SimpleIO/ConsoleInImpl.java 2017-01-25 08:46:24 UTC (rev 917)
@@ -230,8 +230,8 @@
m_name = name;
}
- public ReturnCode operator(final ConnectorBase.ConnectorInfo arg,
- final TimedLong data) {
+ public ReturnCode operator(ConnectorBase.ConnectorInfo arg,
+ TimedLong data) {
ConnectorBase.ConnectorInfo info =(ConnectorBase.ConnectorInfo)arg;
System.out.println("------------------------------");
System.out.println("Listener: "+m_name);
@@ -250,7 +250,7 @@
m_name = name;
}
- public ReturnCode operator(final ConnectorBase.ConnectorInfo arg){
+ public ReturnCode operator(ConnectorBase.ConnectorInfo arg){
System.out.println("------------------------------");
System.out.println("Listener: "+m_name);
System.out.println("Profile::name: "+arg.name);
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SimpleIO/ConsoleOutImpl.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SimpleIO/ConsoleOutImpl.java 2017-01-25 07:34:37 UTC (rev 916)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SimpleIO/ConsoleOutImpl.java 2017-01-25 08:46:24 UTC (rev 917)
@@ -218,8 +218,8 @@
m_name = name;
}
- public ReturnCode operator(final ConnectorBase.ConnectorInfo arg,
- final TimedLong data) {
+ public ReturnCode operator(ConnectorBase.ConnectorInfo arg,
+ TimedLong data) {
ConnectorBase.ConnectorInfo info =(ConnectorBase.ConnectorInfo)arg;
System.out.println("------------------------------");
System.out.println("Listener: "+m_name);
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsmImpl.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsmImpl.java 2017-01-25 07:34:37 UTC (rev 916)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/StaticFsm/StaticFsmImpl.java 2017-01-25 08:46:24 UTC (rev 917)
@@ -458,8 +458,8 @@
m_que = que;
}
- public ReturnCode operator(final ConnectorBase.ConnectorInfo arg,
- final TimedLong data) {
+ public ReturnCode operator(ConnectorBase.ConnectorInfo arg,
+ TimedLong data) {
ConnectorBase.ConnectorInfo info =(ConnectorBase.ConnectorInfo)arg;
System.out.println("------------------------------");
System.out.println("Listener: "+m_name);
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/ConnectorDataListener.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/ConnectorDataListener.java 2017-01-25 07:34:37 UTC (rev 916)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/ConnectorDataListener.java 2017-01-25 08:46:24 UTC (rev 917)
@@ -40,8 +40,7 @@
* super(TimedLong.class);
* m_name = name;
* }
- * public void operator()(ConnectorInfo& info, TimedLong& data) {
- * ConnectorBase.ConnectorInfo info =(ConnectorBase.ConnectorInfo)arg;
+ * public ReturnCode operator(ConnectorBase.ConnectorInfo info, TimedLong data) {
* System.out.println("Listener: "+m_name);
* System.out.println("Data: "+data.data);
* System.out.println("Profile::name: "+info.name);
@@ -169,11 +168,21 @@
* value. The following example is the use of ConnectorDataListenerT.
*
* <pre>{@code
- * protected ReturnCode_t onInitialize() {
- * m_outOut.addConnectorDataListener(
- * ConnectorDataListenerType.ON_BUFFER_WRITE,
- * new MyDataListener("ON_BUFFER_WRITE"));
- * :
+ * class MyDataListener extends ConnectorDataListenerT<RTC::TimedLong> {
+ * public MyDataListener(final String name){
+ * super(TimedLong.class);
+ * m_name = name;
+ * }
+ * public ReturnCode operator(ConnectorBase.ConnectorInfo info, TimedLong data) {
+ * System.out.println("Listener: "+m_name);
+ * System.out.println("Data: "+data.data);
+ * System.out.println("Profile::name: "+info.name);
+ * System.out.println("Profile::id: "+info.id);
+ * System.out.println("Profile::properties: ");
+ * System.out.println(info.properties);
+ * };
+ * public String m_name;
+ * };
* }</pre>
*
* The listener class defained as above can be attached to a
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/ConnectorListener.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/ConnectorListener.java 2017-01-25 07:34:37 UTC (rev 916)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/ConnectorListener.java 2017-01-25 08:46:24 UTC (rev 917)
@@ -33,7 +33,7 @@
* public MyListener(final String name){
* m_name = name;
* }
- * public void operator(final ConnectorBase.ConnectorInfo arg){
+ * public ReturnCode operator(ConnectorBase.ConnectorInfo arg){
* System.out.println("Listener: "+m_name);
* System.out.println("Profile::name: "+arg.name);
* System.out.println("Profile::id: "+arg.id);
@@ -143,7 +143,7 @@
* public MyListener(final String name){
* m_name = name;
* }
- * public void operator(final ConnectorBase.ConnectorInfo arg){
+ * public ReturnCode operator(ConnectorBase.ConnectorInfo arg){
* System.out.println("Listener: "+m_name);
* System.out.println("Profile::name: "+arg.name);
* System.out.println("Profile::id: "+arg.id);
More information about the openrtm-commit
mailing list