[openrtm-commit:02133] r750 - trunk/OpenRTM-aist-Python/OpenRTM_aist
openrtm @ openrtm.org
openrtm @ openrtm.org
2016年 11月 24日 (木) 12:40:53 JST
Author: miyamoto
Date: 2016-11-24 12:40:53 +0900 (Thu, 24 Nov 2016)
New Revision: 750
Modified:
trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortSHMConsumer.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerConfig.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortCorbaCdrConsumer.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortSHMProvider.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/RingBuffer.py
Log:
[compat,bugfix,->RELENG_1_2] fixed bug.
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortSHMConsumer.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortSHMConsumer.py 2016-11-22 10:39:54 UTC (rev 749)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/InPortSHMConsumer.py 2016-11-24 03:40:53 UTC (rev 750)
@@ -133,13 +133,16 @@
+
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 = OpenRTM_aist.split(endian, ",")
+
endian = OpenRTM_aist.normalize(endian)
if endian == "little":
self._endian = True
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py 2016-11-22 10:39:54 UTC (rev 749)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py 2016-11-24 03:40:53 UTC (rev 750)
@@ -1857,31 +1857,34 @@
affinity_str = self._config.getProperty("manager.cpu_affinity")
- self._rtcout.RTC_DEBUG("CPU affinity property: %s", affinity_str)
- tmp = affinity_str.split(",")
-
- cpu_num = []
- for num in tmp:
- try:
- cpu_num.append(int(num))
- self._rtcout.RTC_DEBUG("CPU affinity mask set to %d", int(num))
- except:
- pass
-
-
+ if affinity_str:
+ self._rtcout.RTC_DEBUG("CPU affinity property: %s", affinity_str)
- if len(cpu_num) == 0:
- return
+ tmp = affinity_str.split(",")
+
+ cpu_num = []
+ for num in tmp:
+ try:
+ cpu_num.append(int(num))
+ self._rtcout.RTC_DEBUG("CPU affinity mask set to %d", int(num))
+ except:
+ pass
+
+
- ret = OpenRTM_aist.setProcessAffinity(cpu_num)
+ if len(cpu_num) == 0:
+ return
+
+
+ ret = OpenRTM_aist.setProcessAffinity(cpu_num)
+
+ if ret == False:
+ self._rtcout.RTC_ERROR("CPU affinity mask setting failed")
- if ret == False:
- self._rtcout.RTC_ERROR("CPU affinity mask setting failed")
-
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerConfig.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerConfig.py 2016-11-22 10:39:54 UTC (rev 749)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerConfig.py 2016-11-24 03:40:53 UTC (rev 750)
@@ -422,6 +422,6 @@
fp.close()
return True
- return False
+
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py 2016-11-22 10:39:54 UTC (rev 749)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py 2016-11-24 03:40:53 UTC (rev 750)
@@ -1055,7 +1055,7 @@
OpenRTM_aist.flatten(provider_types))
if self._properties.hasKey("provider_types") and \
- OpenRTM_aist.normalize(self._properties.getProperty("provider_types")) != "all":
+ OpenRTM_aist.normalize([self._properties.getProperty("provider_types")]) != "all":
self._rtcout.RTC_DEBUG("allowed providers: %s",
self._properties.getProperty("provider_types"))
@@ -1097,7 +1097,7 @@
OpenRTM_aist.flatten(consumer_types))
if self._properties.hasKey("consumer_types") and \
- OpenRTM_aist.normalize(self._properties.getProperty("consumer_types")) != "all":
+ OpenRTM_aist.normalize([self._properties.getProperty("consumer_types")]) != "all":
self._rtcout.RTC_DEBUG("allowed consumers: %s",
self._properties.getProperty("consumer_types"))
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortCorbaCdrConsumer.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortCorbaCdrConsumer.py 2016-11-22 10:39:54 UTC (rev 749)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortCorbaCdrConsumer.py 2016-11-24 03:40:53 UTC (rev 750)
@@ -71,6 +71,7 @@
#
def __init__(self):
OpenRTM_aist.CorbaConsumer.__init__(self)
+ print "test"
self._rtcout = OpenRTM_aist.Manager.instance().getLogbuf("OutPortCorbaCdrConsumer")
self._buffer = None
self._profile = None
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortSHMProvider.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortSHMProvider.py 2016-11-22 10:39:54 UTC (rev 749)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortSHMProvider.py 2016-11-24 03:40:53 UTC (rev 750)
@@ -122,6 +122,7 @@
endian = prop.getProperty("serializer.cdr.endian")
if not endian:
self._rtcout.RTC_ERROR("init(): endian is not set.")
+ endian = "little"
endian = OpenRTM_aist.split(endian, ",")
endian = OpenRTM_aist.normalize(endian)
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py 2016-11-22 10:39:54 UTC (rev 749)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py 2016-11-24 03:40:53 UTC (rev 750)
@@ -522,7 +522,6 @@
#
# @endif
def add_component(self, comp):
- print "add"
return OpenRTM_aist.ExecutionContextBase.addComponent(self, comp)
@@ -754,17 +753,18 @@
self._rtcout.RTC_TRACE("setCpuAffinity()")
affinity_str = props.getProperty("cpu_affinity")
- self._rtcout.RTC_DEBUG("CPU affinity property: %s",affinity_str)
+ if affinity_str:
+ self._rtcout.RTC_DEBUG("CPU affinity property: %s",affinity_str)
+
+ tmp = affinity_str.split(",")
+ self._cpu = []
+ for num in tmp:
+ try:
+ self._cpu.append(int(num))
+ self._rtcout.RTC_DEBUG("CPU affinity int value: %d added.",int(num))
+ except ValueError:
+ pass
- tmp = affinity_str.split(",")
- self._cpu = []
- for num in tmp:
- try:
- self._cpu.append(int(num))
- self._rtcout.RTC_DEBUG("CPU affinity int value: %d added.",int(num))
- except ValueError:
- pass
-
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/RingBuffer.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/RingBuffer.py 2016-11-22 10:39:54 UTC (rev 749)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/RingBuffer.py 2016-11-24 03:40:53 UTC (rev 750)
@@ -359,7 +359,7 @@
if overwrite and not timedwrite: # "overwrite" mode
self.advanceRptr()
- elif not overwrite and not timedwrite: # "do_nothiong" mode
+ elif not overwrite and not timedwrite: # "do_nothing" mode
self._full_cond.release()
return OpenRTM_aist.BufferStatus.BUFFER_FULL
@@ -608,7 +608,7 @@
return OpenRTM_aist.BufferStatus.BUFFER_EMPTY
self.advanceRptr(-1)
- elif not readback and not timedread: # "do_nothiong" mode
+ elif not readback and not timedread: # "do_nothing" mode
self._empty_cond.release()
return OpenRTM_aist.BufferStatus.BUFFER_EMPTY
More information about the openrtm-commit
mailing list