[openrtm-commit:02261] r907 - 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月 18日 (水) 17:53:24 JST
Author: win-ei
Date: 2017-01-18 17:53:24 +0900 (Wed, 18 Jan 2017)
New Revision: 907
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/OutPortPushConnector.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
Log:
[FSM4RTC,compat,new prop] PortProfile/ConnectorProfile \"dataport.io_mode\" has been added. refs #3779
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-17 10:54:38 UTC (rev 906)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortBase.java 2017-01-18 08:53:24 UTC (rev 907)
@@ -75,6 +75,12 @@
rtcout.println(Logbuf.DEBUG,
"available subscription_type: "+pubs);
addProperty("dataport.subscription_type", pubs, String.class);
+
+ // FSM4RTC formal/16-04-01 p.25
+ // In the FSM4RTC specification, publisher type is defined as "io_mode"
+ addProperty("dataport.io_mode", pubs, String.class);
+
+
}
/**
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortPushConnector.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortPushConnector.java 2017-01-17 10:54:38 UTC (rev 906)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortPushConnector.java 2017-01-18 08:53:24 UTC (rev 907)
@@ -353,9 +353,23 @@
* <p> create publisher </p>
*/
protected PublisherBase createPublisher(ConnectorInfo profile) {
- String pub_type;
- pub_type = profile.properties.getProperty("subscription_type",
- "flush");
+ String pub_type="";
+ pub_type = profile.properties.getProperty("io_mode");
+ if(pub_type.isEmpty()) {
+ pub_type = profile.properties.getProperty("subscription_type",
+ "flush");
+
+ if(pub_type.equals("flush")) {
+ profile.properties.setProperty("io_mode","block");
+ }
+ else if(pub_type.equals("new")) {
+ profile.properties.setProperty("io_mode","nonblock");
+ }
+ else {
+ profile.properties.setProperty("io_mode",pub_type);
+ }
+
+ }
pub_type = StringUtil.normalize(pub_type);
PublisherBaseFactory<PublisherBase,String> factory
= PublisherBaseFactory.instance();
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-17 10:54:38 UTC (rev 906)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherFlush.java 2017-01-18 08:53:24 UTC (rev 907)
@@ -264,6 +264,13 @@
factory.addFactory(id_name,
new PublisherFlush(),
new PublisherFlush());
+
+ // FSM4RTC formal/16-04-01 p.25
+ // In the FSM4RTC specification, publisher type is defined as "io_mode"
+ // Publisher "flush" is functionally equals to "io_mode: block".
+ factory.addFactory("block",
+ new PublisherFlush(),
+ new PublisherFlush());
}
/**
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-17 10:54:38 UTC (rev 906)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/publisher/PublisherNew.java 2017-01-18 08:53:24 UTC (rev 907)
@@ -634,6 +634,12 @@
factory.addFactory(id_name,
new PublisherNew(),
new PublisherNew());
+ // FSM4RTC formal/16-04-01 p.25
+ // In the FSM4RTC specification, publisher type is defined as "io_mode"
+ // Publisher "new" is functionally equals to "io_mode: nonblock".
+ factory.addFactory("nonblock",
+ new PublisherNew(),
+ new PublisherNew());
}
/**
More information about the openrtm-commit
mailing list