[openrtm-commit:00593] r502 - trunk/OpenRTM-aist-Python/OpenRTM_aist
openrtm @ openrtm.org
openrtm @ openrtm.org
2012年 1月 18日 (水) 17:43:11 JST
Author: kurihara
Date: 2012-01-18 17:43:11 +0900 (Wed, 18 Jan 2012)
New Revision: 502
Modified:
trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerServant.py
Log:
[compat change] ManagerServant::delete_component() has been changed. Now it just call RTC's exit() function, instead of calling Manager's deleteComp().
[compat change] Manager::instance() function now calls initManagerServant(). Bug. refs #2326
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py 2012-01-18 08:24:10 UTC (rev 501)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py 2012-01-18 08:43:11 UTC (rev 502)
@@ -228,7 +228,7 @@
manager.initExecContext()
manager.initComposite()
manager.initTimer()
- #manager.initManagerServant()
+ manager.initManagerServant()
return manager
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerServant.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerServant.py 2012-01-18 08:24:10 UTC (rev 501)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerServant.py 2012-01-18 08:43:11 UTC (rev 502)
@@ -403,7 +403,17 @@
# ReturnCode_t delete_component(const char* instance_name)
def delete_component(self, instance_name):
self._rtcout.RTC_TRACE("delete_component(%s)", instance_name)
- self._mgr.deleteComponent(instance_name)
+ comp_ = self._mgr.getComponent(instance_name)
+ if not comp_:
+ self._rtcout.RTC_WARN("No such component exists: %s", instance_name)
+ return RTC.BAD_PARAMETER
+
+ try:
+ comp_.exit()
+ except:
+ self._rtcout.RTC_ERROR("Unknown exception was raised, when RTC was finalized.")
+ return RTC.RTC_ERROR
+
return RTC.RTC_OK
openrtm-commit メーリングリストの案内