[openrtm-commit:00394] r470 - branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist
openrtm @ openrtm.org
openrtm @ openrtm.org
2011年 9月 8日 (木) 11:50:26 JST
Author: kurihara
Date: 2011-09-08 11:50:26 +0900 (Thu, 08 Sep 2011)
New Revision: 470
Modified:
branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/Manager.py
Log:
New option manager.auto_shutdown_duration has been added.
RTC's configuration parameter can be given from rtc.conf and
-o option from command line arguments.
Modified: branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/Manager.py
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/Manager.py 2011-09-08 02:42:30 UTC (rev 469)
+++ branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/Manager.py 2011-09-08 02:50:26 UTC (rev 470)
@@ -874,7 +874,7 @@
# The property specified by the parameter of createComponent() is set.
# The property("exported_ports") specified by the parameter of createComponent()
# must be set here.
- comp.setProperties(comp_prop)
+ #comp.setProperties(comp_prop)
# Component initialization
if comp.initialize() != RTC.RTC_OK:
@@ -1173,8 +1173,13 @@
"YES", "NO", True) and \
not OpenRTM_aist.toBool(self._config.getProperty("manager.is_master"),
"YES", "NO", False):
+ tm = OpenRTM_aist.TimeValue(10, 0)
+ if self._config.findNode("manager.auto_shutdown_duration"):
+ duration = float(self._config.getProperty("manager.auto_shutdown_duration"))
+ if duration:
+ tm.set_time(duration)
+
if self._timer:
- tm = OpenRTM_aist.TimeValue(10, 0)
self._timer.registerListenerObj(self,
OpenRTM_aist.Manager.shutdownOnNoRtcs,
tm)
@@ -1972,6 +1977,9 @@
else:
name_prop.load(conff)
+ if self._config.findNode(category + "." + inst_name):
+ name_prop.mergeProperties(self._config.getNode(category + "." + inst_name))
+
if self._config.getProperty(type_conf) != "":
try:
conff = open(self._config.getProperty(type_conf))
@@ -1981,6 +1989,9 @@
else:
type_prop.load(conff)
+ if self._config.findNode(category + "." + type_name):
+ type_prop.mergeProperties(self._config.getNode(category + "." + type_name))
+
comp.setProperties(prop)
type_prop.mergeProperties(name_prop)
comp.setProperties(type_prop)
openrtm-commit メーリングリストの案内