[openrtm-commit:00256] r2201 - in trunk/OpenRTM-aist: etc src/lib/rtm
openrtm @ openrtm.org
openrtm @ openrtm.org
2011年 7月 19日 (火) 16:15:21 JST
Author: n-ando
Date: 2011-07-19 16:15:20 +0900 (Tue, 19 Jul 2011)
New Revision: 2201
Modified:
trunk/OpenRTM-aist/etc/rtc.conf.sample
trunk/OpenRTM-aist/src/lib/rtm/DefaultConfiguration.h
trunk/OpenRTM-aist/src/lib/rtm/Manager.cpp
Log:
New option "manager.auto_shutdown_duration" has been added.
Modified: trunk/OpenRTM-aist/etc/rtc.conf.sample
===================================================================
--- trunk/OpenRTM-aist/etc/rtc.conf.sample 2011-07-15 01:13:19 UTC (rev 2200)
+++ trunk/OpenRTM-aist/etc/rtc.conf.sample 2011-07-19 07:15:20 UTC (rev 2201)
@@ -45,6 +45,7 @@
# process will be shutdown in case no rtc exists on periodic check.
manager.shutdown_on_nortcs: YES
manager.shutdown_auto: YES
+manager.auto_shutdown_duration: 10.0
#============================================================
# CORBA configuration
Modified: trunk/OpenRTM-aist/src/lib/rtm/DefaultConfiguration.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/DefaultConfiguration.h 2011-07-15 01:13:19 UTC (rev 2200)
+++ trunk/OpenRTM-aist/src/lib/rtm/DefaultConfiguration.h 2011-07-19 07:15:20 UTC (rev 2201)
@@ -81,6 +81,7 @@
"manager.corba_servant", "YES",
"manager.shutdown_on_nortcs", "YES",
"manager.shutdown_auto", "YES",
+ "manager.auto_shutdown_duration", "10.0",
"manager.name", "manager",
"manager.command", "rtcd",
"manager.supported_languages", "C++, Python, Java",
Modified: trunk/OpenRTM-aist/src/lib/rtm/Manager.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/Manager.cpp 2011-07-15 01:13:19 UTC (rev 2200)
+++ trunk/OpenRTM-aist/src/lib/rtm/Manager.cpp 2011-07-19 07:15:20 UTC (rev 2201)
@@ -909,12 +909,21 @@
if (coil::toBool(m_config["manager.shutdown_auto"], "YES", "NO", true) &&
!coil::toBool(m_config["manager.is_master"], "YES", "NO", false))
{
- coil::TimeValue tm(10, 0);
+ coil::TimeValue tm(10, 0);
+ if (m_config.findNode("manager.auto_shutdown_duration") != NULL)
+ {
+ double duration;
+ const char* s = m_config["manager.auto_shutdown_duration"].c_str();
+ if (coil::stringTo(duration, s))
+ {
+ tm = duration;
+ }
+ }
if (m_timer != NULL)
- {
- m_timer->registerListenerObj(this,
- &Manager::shutdownOnNoRtcs, tm);
- }
+ {
+ m_timer->registerListenerObj(this,
+ &Manager::shutdownOnNoRtcs, tm);
+ }
}
{
openrtm-commit メーリングリストの案内