[openrtm-commit:01785] r678 - trunk/OpenRTM-aist-Python/OpenRTM_aist
openrtm @ openrtm.org
openrtm @ openrtm.org
2016年 2月 28日 (日) 17:04:26 JST
Author: miyamoto
Date: 2016-02-28 17:04:26 +0900 (Sun, 28 Feb 2016)
New Revision: 678
Modified:
trunk/OpenRTM-aist-Python/OpenRTM_aist/CORBA_RTCUtil.py
Log:
[incompat,bugfix,func,->RELENG_1_2] The bug of get_state() has been fixed. refs #3400.
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/CORBA_RTCUtil.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/CORBA_RTCUtil.py 2016-02-27 15:58:19 UTC (rev 677)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/CORBA_RTCUtil.py 2016-02-28 08:04:26 UTC (rev 678)
@@ -263,23 +263,23 @@
#
# @brief 対象のRTコンポーネントの指定した実行コンテキストでの状態を取得
#
-#
+#
+# @param state RTCの状態
# @param rtc 対象のRTコンポーネント
# @param ec_id 実行コンテキストのID
-# @param state RTCの状態
# @return rtc、ecがnilの場合はFalseを返す。
# nilではない場合はstate[0]に状態を代入してTrueを返す。
#
# @else
#
-# @brief
+# @brief
+# @param state
# @param rtc
# @param ec_id
-# @param state
# @return
#
# @endif
-def get_state(rtc, ec_id=0, state=[None]):
+def get_state(state, rtc, ec_id=0):
if CORBA.is_nil(rtc):
return False
ec = get_actual_ec(rtc, ec_id)
@@ -308,9 +308,9 @@
#
# @endif
def is_in_inactive(rtc, ec_id=0):
- ret = [None]
- if get_state(rtc, ec_id, ret):
- if ret[0] == RTC.INACTIVE_STATE:
+ state = [None]
+ if get_state(state, rtc, ec_id):
+ if state[0] == RTC.INACTIVE_STATE:
return True
return False
@@ -334,9 +334,9 @@
#
# @endif
def is_in_active(rtc, ec_id=0):
- ret = [None]
- if get_state(rtc, ec_id, ret):
- if ret[0] == RTC.ACTIVE_STATE:
+ state = [None]
+ if get_state(state, rtc, ec_id):
+ if state[0] == RTC.ACTIVE_STATE:
return True
return False
@@ -360,9 +360,9 @@
#
# @endif
def is_in_error(rtc, ec_id=0):
- ret = [None]
- if get_state(rtc, ec_id, ret):
- if ret[0] == RTC.ERROR_STATE:
+ state = [None]
+ if get_state(state,rtc, ec_id):
+ if state[0] == RTC.ERROR_STATE:
return True
return False
More information about the openrtm-commit
mailing list