[openrtm-commit:02149] r762 - trunk/OpenRTM-aist-Python/OpenRTM_aist

openrtm @ openrtm.org openrtm @ openrtm.org
2016年 11月 29日 (火) 18:29:58 JST


Author: miyamoto
Date: 2016-11-29 18:29:58 +0900 (Tue, 29 Nov 2016)
New Revision: 762

Modified:
   trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortCorbaCdrProvider.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortSHMProvider.py
Log:
[compat,bugfix,->RELENG_1_2] fixed bug.

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortCorbaCdrProvider.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortCorbaCdrProvider.py	2016-11-29 04:43:33 UTC (rev 761)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortCorbaCdrProvider.py	2016-11-29 09:29:58 UTC (rev 762)
@@ -190,9 +190,9 @@
     except:
       self._rtcout.RTC_TRACE(OpenRTM_aist.Logger.print_exception())
       return OpenRTM.UNKNOWN_ERROR
-    return OpenRTM.UNKNOWN_ERROR
 
 
+
   def convertReturn(self, status, data):
     if status == OpenRTM_aist.BufferStatus.BUFFER_OK:
       self.onBufferWrite(data)

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortSHMProvider.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortSHMProvider.py	2016-11-29 04:43:33 UTC (rev 761)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortSHMProvider.py	2016-11-29 09:29:58 UTC (rev 762)
@@ -119,10 +119,8 @@
 
 
     if prop.hasKey("serializer"):
-      endian = prop.getProperty("serializer.cdr.endian")
-      if not endian:
-        self._rtcout.RTC_ERROR("init(): endian is not set.")
-        endian = "little"
+      endian = prop.getProperty("serializer.cdr.endian", "little")
+
         
       endian = OpenRTM_aist.split(endian, ",")
       endian = OpenRTM_aist.normalize(endian)
@@ -183,7 +181,7 @@
       ret = self._buffer.read(cdr)
       
       if ret == OpenRTM_aist.BufferStatus.BUFFER_OK:
-        if not cdr[0]:
+        if cdr[0] is None:
           self._rtcout.RTC_ERROR("buffer is empty.")
           return OpenRTM.BUFFER_EMPTY
       
@@ -268,12 +266,11 @@
     else:
       return OpenRTM.UNKNOWN_ERROR
     
-    self.onSenderError()
-    return OpenRTM.UNKNOWN_ERROR
 
 
 
 
+
 def OutPortSHMProviderInit():
   factory = OpenRTM_aist.OutPortProviderFactory.instance()
   factory.addFactory("shared_memory",



More information about the openrtm-commit mailing list