[openrtm-commit:02101] r735 - trunk/OpenRTM-aist-Python/OpenRTM_aist
openrtm @ openrtm.org
openrtm @ openrtm.org
2016年 11月 8日 (火) 19:33:02 JST
Author: miyamoto
Date: 2016-11-08 19:33:02 +0900 (Tue, 08 Nov 2016)
New Revision: 735
Modified:
trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicECSharedComposite.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicTask.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/PortConnectListener.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeMeasure.py
Log:
[compat,bugfix,->RELENG_1_2] fixed bug.
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicECSharedComposite.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicECSharedComposite.py 2016-11-01 10:32:03 UTC (rev 734)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicECSharedComposite.py 2016-11-08 10:33:02 UTC (rev 735)
@@ -673,12 +673,13 @@
def __del__(self):
self._rtcout.RTC_TRACE("destructor of PeriodicECSharedComposite")
OpenRTM_aist.RTObject_impl.__del__(self)
+
+ def shutdown(self):
+ OpenRTM_aist.RTObject_impl.shutdown(self)
poa = OpenRTM_aist.Manager.instance().getPOA()
poa.deactivate_object(poa.servant_to_id(self._org))
del self._org
-
-
##
# @if jp
# @brief 初期化
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicTask.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicTask.py 2016-11-01 10:32:03 UTC (rev 734)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicTask.py 2016-11-08 10:33:02 UTC (rev 735)
@@ -405,6 +405,7 @@
def updateExecStat(self):
if self._execCount > self._execCountMax:
guard = OpenRTM_aist.ScopedLock(self._execStat.mutex)
+
self._execStat.stat = self._execTime.getStatistics()
self._execCount = 0
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/PortConnectListener.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/PortConnectListener.py 2016-11-01 10:32:03 UTC (rev 734)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/PortConnectListener.py 2016-11-08 10:33:02 UTC (rev 735)
@@ -143,10 +143,10 @@
"ON_UPDATE_CONFIG_PARAM",
""]
- if type < ConfigurationParamListenerType.CONFIG_PARAM_LISTENER_NUM:
+ if type < PortConnectListenerType.PORT_CONNECT_LISTENER_NUM:
return typeString[type]
- return "";
+ return ""
toString = staticmethod(toString)
@@ -281,7 +281,18 @@
# @endif
#static const char* toString(PortConnectRetListenerType type);
def toString(type):
- return
+ typeString = ["ON_PUBLISH_INTERFACES",
+ "ON_CONNECT_NEXTPORT",
+ "ON_SUBSCRIBE_INTERFACES",
+ "ON_CONNECTED",
+ "ON_DISCONNECT_NEXT",
+ "ON_DISCONNECTED",
+ ""]
+
+ if type < PortConnectRetListenerType.PORT_CONNECT_RET_LISTENER_NUM:
+ return typeString[type]
+
+ return ""
toString = staticmethod(toString)
@@ -595,27 +606,24 @@
"""
def __init__(self):
- pass
-
-
- ##
- # @if jp
- # @brief PortConnectListenerType リスナ配列
- # PortConnectListenerType リスナを格納
- # @else
- # @brief PortConnectListenerType listener array
- # The PortConnectListenerType listener is stored.
- # @endif
- portconnect_num = PortConnectListenerType.PORT_CONNECT_LISTENER_NUM
- portconnect_ = [PortConnectListenerHolder() for i in range(portconnect_num)]
+ ##
+ # @if jp
+ # @brief PortConnectListenerType リスナ配列
+ # PortConnectListenerType リスナを格納
+ # @else
+ # @brief PortConnectListenerType listener array
+ # The PortConnectListenerType listener is stored.
+ # @endif
+ self.portconnect_num = PortConnectListenerType.PORT_CONNECT_LISTENER_NUM
+ self.portconnect_ = [PortConnectListenerHolder() for i in range(self.portconnect_num)]
- ##
- # @if jp
- # @brief PortConnectRetTypeリスナ配列
- # PortConnectRetTypeリスナを格納
- # @else
- # @brief PortConnectRetType listener array
- # The PortConnectRetType listener is stored.
- # @endif
- portconnret_num = PortConnectRetListenerType.PORT_CONNECT_RET_LISTENER_NUM
- portconnret_ = [PortConnectRetListenerHolder() for i in range(portconnret_num)]
+ ##
+ # @if jp
+ # @brief PortConnectRetTypeリスナ配列
+ # PortConnectRetTypeリスナを格納
+ # @else
+ # @brief PortConnectRetType listener array
+ # The PortConnectRetType listener is stored.
+ # @endif
+ self.portconnret_num = PortConnectRetListenerType.PORT_CONNECT_RET_LISTENER_NUM
+ self.portconnret_ = [PortConnectRetListenerHolder() for i in range(self.portconnret_num)]
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeMeasure.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeMeasure.py 2016-11-01 10:32:03 UTC (rev 734)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeMeasure.py 2016-11-08 10:33:02 UTC (rev 735)
@@ -244,6 +244,7 @@
#
def count(self):
if self._recurred:
+
return len(self._record)
else:
return self._count
@@ -263,7 +264,9 @@
min_i = [0.0]
mean_i = [0.0]
stdd = [0.0]
- return self.getStatistics(max_i, min_i, mean_i, stdd)
+
+ self.getStatistics(max_i, min_i, mean_i, stdd)
+ return self.Statistics(max_i[0], min_i[0], mean_i[0], stdd[0])
max_interval[0] = 0.0
min_interval[0] = ULLONG_MAX
More information about the openrtm-commit
mailing list