[openrtm-commit:00483] r498 - trunk/OpenRTM-aist-Python/OpenRTM_aist/examples/ConfigSample
openrtm @ openrtm.org
openrtm @ openrtm.org
2011年 12月 15日 (木) 12:19:12 JST
Author: kurihara
Date: 2011-12-15 12:19:12 +0900 (Thu, 15 Dec 2011)
New Revision: 498
Modified:
trunk/OpenRTM-aist-Python/OpenRTM_aist/examples/ConfigSample/ConfigSample.py
Log:
Added sample of ConfigurationParamListener.
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/examples/ConfigSample/ConfigSample.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/examples/ConfigSample/ConfigSample.py 2011-11-18 08:11:11 UTC (rev 497)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/examples/ConfigSample/ConfigSample.py 2011-12-15 03:19:12 UTC (rev 498)
@@ -37,7 +37,15 @@
i = (i+1) % 4
return str_[i]
+class MyConfigurationParamListner(OpenRTM_aist.ConfigurationParamListener):
+ def __init__(self):
+ pass
+ def __call__(self, config_set_name, config_param_name):
+ print "Changed config_set_name: ", config_set_name, " config_param_name: ", config_param_name
+ return
+
+
class ConfigSample(OpenRTM_aist.DataFlowComponentBase):
# class constructor
def __init__(self, manager):
@@ -60,7 +68,8 @@
self.bindParameter("str_param0", self._str_param0, "hoge")
self.bindParameter("str_param1", self._str_param1, "dara")
self.bindParameter("vector_param0", self._vector_param0, "0.0,1.0,2.0,3.0,4.0")
-
+ self.addConfigurationParamListener(OpenRTM_aist.ConfigurationParamListenerType.ON_UPDATE_CONFIG_PARAM,
+ MyConfigurationParamListner())
print "\n Please change configuration values from RtcLink"
openrtm-commit メーリングリストの案内