[openrtm-commit:01054] r555 - in branches/RELENG_1_1/OpenRTM-aist-Python: OpenRTM_aist installer/install_scripts
openrtm @ openrtm.org
openrtm @ openrtm.org
2013年 4月 17日 (水) 16:46:37 JST
Author: n-ando
Date: 2013-04-17 16:46:37 +0900 (Wed, 17 Apr 2013)
New Revision: 555
Modified:
branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/ManagerServant.py
branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/OutPort.py
branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py
branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py
branches/RELENG_1_1/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_ubuntu.sh
Log:
Merging r494 through r547 from trunk compatible modificatioin.
Modified: branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/ManagerServant.py
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/ManagerServant.py 2013-04-17 07:31:41 UTC (rev 554)
+++ branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/ManagerServant.py 2013-04-17 07:46:37 UTC (rev 555)
@@ -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
Modified: branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/OutPort.py
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/OutPort.py 2013-04-17 07:31:41 UTC (rev 554)
+++ branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/OutPort.py 2013-04-17 07:46:37 UTC (rev 555)
@@ -162,7 +162,7 @@
# check number of connectors
conn_size = len(self._connectors)
if not conn_size > 0:
- return True
+ return False
# set timestamp
#tm = Time()
Modified: branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py 2013-04-17 07:31:41 UTC (rev 554)
+++ branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py 2013-04-17 07:46:37 UTC (rev 555)
@@ -773,7 +773,7 @@
compIn._sm._sm.goTo(RTC.INACTIVE_STATE)
count_ = 0
usec_per_sec_ = 1.0e6
- sleeptime_ = 10.0 * usec_per_sec_ / float(self.get_rate())
+ sleeptime_ = usec_per_sec_ / float(self.get_rate())
self._rtcout.RTC_PARANOID("Sleep time is %f [us]", sleeptime_)
while compIn._sm._sm.isIn(RTC.ACTIVE_STATE):
self._rtcout.RTC_TRACE("Waiting to be the INACTIVE state %d %f", (count_, float(time.time())))
Modified: branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py 2013-04-17 07:31:41 UTC (rev 554)
+++ branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py 2013-04-17 07:46:37 UTC (rev 555)
@@ -509,9 +509,9 @@
return RTC.PRECONDITION_NOT_MET
ret = self.on_initialize()
+ self._created = False
if ret is not RTC.RTC_OK:
return ret
- self._created = False
# -- entering alive state --
for i in range(len(self._ecMine)):
@@ -634,6 +634,8 @@
self._rtcout.RTC_TRACE("exit()")
if self._created:
return RTC.PRECONDITION_NOT_MET
+ if self._exiting:
+ return RTC.RTC_OK
# deactivate myself on owned EC
OpenRTM_aist.CORBA_SeqUtil.for_each(self._ecMine,
@@ -1150,8 +1152,10 @@
if self._configsets.haveConfig(active_set):
self._configsets.update(active_set)
+ self._configsets.activateConfigurationSet(active_set)
else:
self._configsets.update("default")
+ self._configsets.activateConfigurationSet("default")
self.postOnInitialize(0,ret)
return ret
@@ -2598,6 +2602,77 @@
##
# @if jp
#
+ # @brief コンフィギュレーションサービスを取得する
+ #
+ # コンフィギュレーションサービスオブジェクトを取得する。このサービ
+ # スオブジェクトを利用して、コンフィギュレーションパラメータの操作
+ # を行うことができる。主な操作としては、
+ #
+ # - unbindParameter(): パラメータのアンバインド
+ # - update(): パラメータの更新
+ # - update(set_name): 特定のセットの更新
+ # - update(set_name, param_name): 特定のセットのパラメータの更新
+ # - isExist(): パラメータの存在確認
+ # - isChanged(): パラメータが変更されたかの確認
+ # - changedParameters(): 変更されたパラメータのリスト
+ # - getActiveId(): アクティブセット名の取得
+ # - haveConfig(config_id): コンフィグセットを持っているかどうか
+ # - getConfigurationSets(): 全コンフィギュレーションセットの取得
+ # - getConfigurationSet(set_id): 特定セットを取得
+ #
+ # コールバック関連
+ # - addConfigurationParamListener(): リスナの追加
+ # - removeConfigurationParamListener(): リスナの削除
+ # - addConfigurationSetListener(): リスナの追加
+ # - removeConfigurationSetListener(): リスナの削除
+ # - addConfigurationSetNameListener(): リスナの追加
+ # - removeConfigurationSetNameListener(): リスナの削除
+ #
+ # 詳細はConfigAdminクラスリファレンスを参照のこと。
+ #
+ # @return ConfigAdmin object
+ #
+ # @else
+ #
+ # @brief Getting configuration service
+ #
+ # This operation returns configuration service object. By using
+ # this service, user can manipulate configuration
+ # parameters. Mainly the following operations are supported.
+ #
+ # - unbindParameter(): Unbinding parameters
+ # - update(): Updateing parameters
+ # - update(set_name): Updating a specific configuration set
+ # - update(set_name, param_name): Updating specific parameter in a set
+ # - isExist(): Checking existence of a parameter
+ # - isChanged(): Check if a parameter was updated
+ # - changedParameters(): Getting changed parameter list
+ # - getActiveId(): Getting active configuration set name
+ # - haveConfig(config_id): Checking if having a specified configuration set
+ # - getConfigurationSets(): getting all the configuration sets
+ # - getConfigurationSet(set_id): Getting a configuration set
+ #
+ # Callback related member functions
+ # - addConfigurationParamListener(): Adding listener
+ # - removeConfigurationParamListener(): Removing listener
+ # - addConfigurationSetListener(): Adding listener
+ # - removeConfigurationSetListener(): Removing listener
+ # - addConfigurationSetNameListener(): Adding listener
+ # - removeConfigurationSetNameListener(): Removing listener
+ #
+ # See details in the ConfigAdmin class reference
+ #
+ # @return ConfigAdmin object
+ #
+ # @endif
+ #
+ # ConfigAdmin& getConfigService() { return m_configsets; }
+ def getConfigService(self):
+ return self._configsets
+
+ ##
+ # @if jp
+ #
# @brief コンフィギュレーションパラメータの更新(ID指定)
#
# 指定したIDのコンフィギュレーションセットに設定した値で、
@@ -2804,7 +2879,7 @@
# bool removeInPort(InPortBase& port);
def removeInPort(self, port):
self._rtcout.RTC_TRACE("removeInPort()")
- ret = self.removePort(inport)
+ ret = self.removePort(port)
if ret:
for inport in self._inports:
@@ -2843,7 +2918,7 @@
# bool removeOutPort(OutPortBase& port);
def removeOutPort(self, port):
self._rtcout.RTC_TRACE("removeOutPort()")
- ret = self.removePort(outport)
+ ret = self.removePort(port)
if ret:
for outport in self._outports:
Modified: branches/RELENG_1_1/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_ubuntu.sh
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_ubuntu.sh 2013-04-17 07:31:41 UTC (rev 554)
+++ branches/RELENG_1_1/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_ubuntu.sh 2013-04-17 07:46:37 UTC (rev 555)
@@ -11,7 +11,8 @@
#---------------------------------------
# ããã±ã¼ã¸ãªã¹ã
#---------------------------------------
-omnipy="python python-omniorb2-omg omniidl4-python omniorb4-nameserver"
+omnipy_old="python python-omniorb2-omg omniidl4-python omniorb4-nameserver"
+omnipy="$omnipy_old python-omniorb-omg omniidl-python omniorb-nameserver"
openrtm="openrtm-aist-python openrtm-aist-python-example"
packages="$omnipy $openrtm"
u_packages="$omnipy $openrtm "
More information about the openrtm-commit
mailing list