[openrtm-commit:02114] r740 - in trunk/OpenRTM-aist-Python/OpenRTM_aist: . utils/rtcd

openrtm @ openrtm.org openrtm @ openrtm.org
2016年 11月 17日 (木) 12:28:22 JST


Author: miyamoto
Date: 2016-11-17 12:28:22 +0900 (Thu, 17 Nov 2016)
New Revision: 740

Modified:
   trunk/OpenRTM-aist-Python/OpenRTM_aist/OpenHRPExecutionContext.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/SdoServiceAdmin.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtcd/rtcd_python.bat
Log:
[compat,bugfix,->RELENG_1_2] fixed bug.

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/OpenHRPExecutionContext.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/OpenHRPExecutionContext.py	2016-11-16 09:29:15 UTC (rev 739)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/OpenHRPExecutionContext.py	2016-11-17 03:28:22 UTC (rev 740)
@@ -266,6 +266,42 @@
     return OpenRTM_aist.ExecutionContextBase.getProfile(self)
 
 
+  def onAddedComponent(self, rtobj):
+    guard = OpenRTM_aist.ScopedLock(self._tickmutex)
+    self._worker.updateComponentList()
+    return RTC.RTC_OK
+
+  def onRemovedComponent(self, rtobj):
+    guard = OpenRTM_aist.ScopedLock(self._tickmutex)
+    self._worker.updateComponentList()
+    return RTC.RTC_OK
+
+  def onWaitingActivated(self, comp, count):
+    self._rtcout.RTC_TRACE("onWaitingActivated(count = %d)", count)
+    self._rtcout.RTC_PARANOID("curr: %s, next: %s",
+                              (self.getStateString(comp.getStates().curr),
+                               self.getStateString(comp.getStates().next)))
+    self.tick()
+    return RTC.RTC_OK
+
+  def onWaitingDeactivated(self, comp, count):
+    self._rtcout.RTC_TRACE("onWaitingDeactivated(count = %d)", count)
+    self._rtcout.RTC_PARANOID("curr: %s, next: %s",
+                              (self.getStateString(comp.getStates().curr),
+                               self.getStateString(comp.getStates().next)))
+    self.tick()
+    return RTC.RTC_OK
+
+  def onWaitingReset(self, comp, count):
+    self._rtcout.RTC_TRACE("onWaitingReset(count = %d)", count)
+    self._rtcout.RTC_PARANOID("curr: %s, next: %s",
+                              (self.getStateString(comp.getStates().curr),
+                               self.getStateString(comp.getStates().next)))
+    self.tick()
+    return RTC.RTC_OK
+
+
+
 def OpenHRPExecutionContextInit(manager):
   OpenRTM_aist.ExecutionContextFactory.instance().addFactory("OpenHRPExecutionContext",
                                                              OpenRTM_aist.OpenHRPExecutionContext,

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py	2016-11-16 09:29:15 UTC (rev 739)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py	2016-11-17 03:28:22 UTC (rev 740)
@@ -4527,7 +4527,11 @@
     if self._manager:
       self._rtcout.RTC_DEBUG("Cleanup on Manager")
       self._manager.notifyFinalized(self)
+      
+    del self._actionListeners 
+    del self._portconnListeners
 
+
     return
 
   # inline void preOnInitialize(UniqueId ec_id)

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/SdoServiceAdmin.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/SdoServiceAdmin.py	2016-11-16 09:29:15 UTC (rev 739)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/SdoServiceAdmin.py	2016-11-17 03:28:22 UTC (rev 740)
@@ -198,6 +198,7 @@
 
     # If types include '[Aa][Ll][Ll]', all types allowed in this RTC
     for ctype in self._consumerTypes:
+      
       tmp = ctype.lower()
       if tmp == "all":
         self._allConsumerEnabled = True
@@ -216,7 +217,7 @@
   # Virtual destractor.
   # @endif
   def __del__(self):
-    len_ = len(self._proiders)
+    len_ = len(self._providers)
     for i in range(len_):
       idx = (len_ - 1) - i
       self._providers[idx].finalize()
@@ -300,7 +301,7 @@
     for i in range(len(self._providers)):
       if id == str(self._providers[i].getProfile().id):
         self._rtcout.RTC_ERROR("SDO service(id=%s, ifr=%s) already exists",
-                               str(prof.id), str(prof.interface_type))
+                               (str(prof.id), str(prof.interface_type)))
         return False
 
     self._providers.append(provider)
@@ -351,7 +352,7 @@
     if not self.isEnabledConsumerType(sProfile):
       self._rtcout.RTC_ERROR("Not supported consumer type. %s", profile.id)
       return False
-
+  
     if not self.isExistingConsumerType(sProfile):
       self._rtcout.RTC_ERROR("type %s already exists.", profile.id)
       return False

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtcd/rtcd_python.bat
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtcd/rtcd_python.bat	2016-11-16 09:29:15 UTC (rev 739)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtcd/rtcd_python.bat	2016-11-17 03:28:22 UTC (rev 740)
@@ -6,4 +6,4 @@
 rem     National Institute of
 rem         Advanced Industrial Science and Technology (AIST), Japan
 rem     All rights reserved.
-%CD%\python.exe rtcd.py %*
+%~dp0\python.exe %~dp0\rtcd.py %*



More information about the openrtm-commit mailing list