[openrtm-commit:02465] r952 - trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 2月 20日 (月) 10:04:54 JST
Author: win-ei
Date: 2017-02-20 10:04:53 +0900 (Mon, 20 Feb 2017)
New Revision: 952
Modified:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPort.java
Log:
[FSM4RTC] added APIs for multi-buffer mode. refs #3780
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPort.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPort.java 2017-02-17 14:41:34 UTC (rev 951)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPort.java 2017-02-20 01:04:53 UTC (rev 952)
@@ -260,6 +260,42 @@
/**
*
*/
+ public boolean isNew(String conenctor) {
+ rtcout.println(Logbuf.TRACE, "isNew()");
+ synchronized (m_directNewDataMutex){
+ if (m_directNewData == true) {
+ rtcout.println(Logbuf.DEBUG,
+ "isNew() returns true because of direct write.");
+ return true;
+ }
+ }
+ synchronized (m_connectorsMutex){
+ synchronized (m_connectors){
+ if (m_connectors.size() == 0) {
+ rtcout.println(Logbuf.DEBUG, "no connectors");
+ return false;
+ }
+ int r = 0;
+ for(int ic=0;ic<m_connectors.size();++ic){
+ if (m_connectors.elementAt(ic).name().equals(conenctor)) {
+ r = m_connectors.elementAt(ic).getBuffer().readable();
+ if (r > 0) {
+ String name = m_connectors.elementAt(ic).name();
+ rtcout.println(Logbuf.DEBUG,
+ "isNew() = true, connector name="+ name +
+ ", readable data: " + r);
+ return true;
+ }
+ return false;
+ }
+ }
+ return false;
+ }
+ }
+ }
+ /**
+ *
+ */
public boolean isNew(ArrayList<String> names) {
rtcout.println(Logbuf.TRACE, "isNew()");
openrtm-commit メーリングリストの案内