[openrtm-commit:03111] r928 - trunk/OpenRTM-aist-Python/OpenRTM_aist
openrtm @ openrtm.org
openrtm @ openrtm.org
2018年 1月 23日 (火) 14:05:14 JST
Author: miyamoto
Date: 2018-01-23 14:05:14 +0900 (Tue, 23 Jan 2018)
New Revision: 928
Modified:
trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPort.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortConnector.py
Log:
[incompat, ->RELENG_1_2] refs #4429
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPort.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPort.py 2018-01-23 04:13:33 UTC (rev 927)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPort.py 2018-01-23 05:05:14 UTC (rev 928)
@@ -105,6 +105,7 @@
self._directNewData = False
self._valueMutex = threading.RLock()
+
def __del__(self, OutPortBase=OpenRTM_aist.OutPortBase):
OutPortBase.__del__(self)
@@ -182,11 +183,14 @@
guard = OpenRTM_aist.ScopedLock(self._connector_mutex)
for con in self._connectors:
- ret = con.write(value)
- if ret != self.PORT_OK:
- result = False
- if ret == self.CONNECTION_LOST:
- self.disconnect(con.id())
+ if not con.directMode():
+ ret = con.write(value)
+ if ret != self.PORT_OK:
+ result = False
+ if ret == self.CONNECTION_LOST:
+ self.disconnect(con.id())
+ else:
+ self._directNewData = True
del guard
return result
@@ -316,7 +320,7 @@
data[0] = self._OnWriteConvert(data[0])
del guard
def isEmpty(self):
- return False
+ return (not self._directNewData)
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortConnector.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortConnector.py 2018-01-23 04:13:33 UTC (rev 927)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortConnector.py 2018-01-23 05:05:14 UTC (rev 928)
@@ -57,6 +57,7 @@
self._rtcout = OpenRTM_aist.Manager.instance().getLogbuf("OutPortConnector")
self._profile = info
self._endian = True
+ self._directMode = False
return
##
@@ -150,3 +151,36 @@
self._endian = True # little endian
return RTC.RTC_OK
+
+ ##
+ # @if jp
+ # @brief ¥À¥¤¥ì¥¯¥ÈÀܳ¥â¡¼¥É¤ËÀßÄê
+ #
+ #
+ # @else
+ # @brief
+ #
+ # This
+ #
+ # @endif
+ #
+ # const char* name();
+ def setDirectMode(self):
+ self._directMode = True
+
+ ##
+ # @if jp
+ # @brief ¥À¥¤¥ì¥¯¥ÈÀܳ¥â¡¼¥É¤«¤ÎȽÄê
+ #
+ # @return True¡§¥À¥¤¥ì¥¯¥ÈÀܳ¥â¡¼¥É,false¡§¤½¤ì°Ê³°
+ #
+ # @else
+ # @brief
+ #
+ # @return
+ #
+ # @endif
+ #
+ # const char* name();
+ def directMode(self):
+ return self._directMode
More information about the openrtm-commit
mailing list