[openrtm-commit:00900] r361 - in trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python: resource/100/base/inport1 resource/100/base/inport2 resource/100/base/name resource/100/base/name2 resource/100/base/outport1 resource/100/base/outport2 resource/100/base/service1 resource/100/base/service2 src/jp/go/aist/rtm/rtcbuilder/python/manager src/jp/go/aist/rtm/rtcbuilder/python/template/python
openrtm @ openrtm.org
openrtm @ openrtm.org
2012年 10月 25日 (木) 22:55:55 JST
Author:
Date: 2012-10-25 22:55:55 +0900 (Thu, 25 Oct 2012)
New Revision: 361
Modified:
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/inport1/foo.py
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/inport2/foo.py
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/name/foo.py
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/name2/Foo.py
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/outport1/foo.py
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/outport2/foo.py
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/service1/MyService_idl_example.py
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/service1/foo.py
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/service2/MyService_idl_example.py
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/service2/foo.py
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/src/jp/go/aist/rtm/rtcbuilder/python/manager/TemplateHelperPy.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/src/jp/go/aist/rtm/rtcbuilder/python/template/python/Py_RTC.py.vsl
Log:
Modified import
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/inport1/foo.py
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/inport1/foo.py 2012-10-17 08:45:35 UTC (rev 360)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/inport1/foo.py 2012-10-25 13:55:55 UTC (rev 361)
@@ -1,32 +1,23 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- Python -*-
-
"""
- \file foo.py
- \brief MDesc
- \date $Date$
-
-
+ @file foo.py
+ @brief MDesc
+ @date $Date$
"""
import sys
import time
sys.path.append(".")
-
# Import RTM module
import RTC
import OpenRTM_aist
-
# Import Service implementation class
# <rtc-template block="service_impl">
-
# </rtc-template>
-
# Import Service stub modules
# <rtc-template block="consumer_import">
# </rtc-template>
-
-
# This module's spesification
# <rtc-template block="module_spec">
foo_spec = ["implementation_id", "foo",
@@ -41,21 +32,19 @@
"lang_type", "SCRIPT",
""]
# </rtc-template>
-
+##
+# @class foo
+# @brief MDesc
+#
+#
class foo(OpenRTM_aist.DataFlowComponentBase):
- """
- \class foo
- \brief MDesc
-
- """
+ ##
+ # @brief constructor
+ # @param manager Maneger Object
+ #
def __init__(self, manager):
- """
- \brief constructor
- \param manager Maneger Object
- """
OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
-
self._d_InP1 = RTC.TimedShort(RTC.Time(0,0),0)
"""
"""
@@ -65,18 +54,16 @@
# <rtc-template block="init_conf_param">
# </rtc-template>
-
-
+ ##
+ #
+ # The initialize action (on CREATED->ALIVE transition)
+ # formaer rtc_init_entry()
+ #
+ # @return RTC::ReturnCode_t
+ #
+ #
def onInitialize(self):
- """
-
- The initialize action (on CREATED->ALIVE transition)
- formaer rtc_init_entry()
-
- \return RTC::ReturnCode_t
-
- """
# Bind variables and configuration variable
# Set InPort buffers
@@ -91,183 +78,172 @@
# Set CORBA Service Ports
return RTC.RTC_OK
-
+ # ##
+ # #
+ # # The finalize action (on ALIVE->END transition)
+ # # formaer rtc_exiting_entry()
+ # #
+ # # @return RTC::ReturnCode_t
+ #
+ # #
#def onFinalize(self, ec_id):
- # """
#
- # The finalize action (on ALIVE->END transition)
- # formaer rtc_exiting_entry()
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The startup action when ExecutionContext startup
+ # # former rtc_starting_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onStartup(self, ec_id):
- # """
#
- # The startup action when ExecutionContext startup
- # former rtc_starting_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The shutdown action when ExecutionContext stop
+ # # former rtc_stopping_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onShutdown(self, ec_id):
- # """
#
- # The shutdown action when ExecutionContext stop
- # former rtc_stopping_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The activated action (Active state entry action)
+ # # former rtc_active_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onActivated(self, ec_id):
- # """
#
- # The activated action (Active state entry action)
- # former rtc_active_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The deactivated action (Active state exit action)
+ # # former rtc_active_exit()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onDeactivated(self, ec_id):
- # """
#
- # The deactivated action (Active state exit action)
- # former rtc_active_exit()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The execution action that is invoked periodically
+ # # former rtc_active_do()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onExecute(self, ec_id):
- # """
#
- # The execution action that is invoked periodically
- # former rtc_active_do()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The aborting action when main logic error occurred.
+ # # former rtc_aborting_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onAborting(self, ec_id):
- # """
#
- # The aborting action when main logic error occurred.
- # former rtc_aborting_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The error action in ERROR state
+ # # former rtc_error_do()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onError(self, ec_id):
- # """
#
- # The error action in ERROR state
- # former rtc_error_do()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The reset action that is invoked resetting
+ # # This is same but different the former rtc_init_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onReset(self, ec_id):
- # """
#
- # The reset action that is invoked resetting
- # This is same but different the former rtc_init_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The state update action that is invoked after onExecute() action
+ # # no corresponding operation exists in OpenRTm-aist-0.2.0
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onStateUpdate(self, ec_id):
- # """
#
- # The state update action that is invoked after onExecute() action
- # no corresponding operation exists in OpenRTm-aist-0.2.0
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The action that is invoked when execution context's rate is changed
+ # # no corresponding operation exists in OpenRTm-aist-0.2.0
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onRateChanged(self, ec_id):
- # """
#
- # The action that is invoked when execution context's rate is changed
- # no corresponding operation exists in OpenRTm-aist-0.2.0
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
-
-
-
def fooInit(manager):
profile = OpenRTM_aist.Properties(defaults_str=foo_spec)
manager.registerFactory(profile,
foo,
OpenRTM_aist.Delete)
-
def MyModuleInit(manager):
fooInit(manager)
-
# Create a component
comp = manager.createComponent("foo")
-
-
-
def main():
mgr = OpenRTM_aist.Manager.init(sys.argv)
mgr.setModuleInitProc(MyModuleInit)
mgr.activateManager()
mgr.runManager()
-
if __name__ == "__main__":
main()
-
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/inport2/foo.py
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/inport2/foo.py 2012-10-17 08:45:35 UTC (rev 360)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/inport2/foo.py 2012-10-25 13:55:55 UTC (rev 361)
@@ -1,32 +1,23 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- Python -*-
-
"""
- \file foo.py
- \brief MDesc
- \date $Date$
-
-
+ @file foo.py
+ @brief MDesc
+ @date $Date$
"""
import sys
import time
sys.path.append(".")
-
# Import RTM module
import RTC
import OpenRTM_aist
-
# Import Service implementation class
# <rtc-template block="service_impl">
-
# </rtc-template>
-
# Import Service stub modules
# <rtc-template block="consumer_import">
# </rtc-template>
-
-
# This module's spesification
# <rtc-template block="module_spec">
foo_spec = ["implementation_id", "foo",
@@ -41,21 +32,19 @@
"lang_type", "SCRIPT",
""]
# </rtc-template>
-
+##
+# @class foo
+# @brief MDesc
+#
+#
class foo(OpenRTM_aist.DataFlowComponentBase):
- """
- \class foo
- \brief MDesc
-
- """
+ ##
+ # @brief constructor
+ # @param manager Maneger Object
+ #
def __init__(self, manager):
- """
- \brief constructor
- \param manager Maneger Object
- """
OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
-
self._d_InP1 = RTC.TimedShort(RTC.Time(0,0),0)
"""
"""
@@ -69,18 +58,16 @@
# <rtc-template block="init_conf_param">
# </rtc-template>
-
-
+ ##
+ #
+ # The initialize action (on CREATED->ALIVE transition)
+ # formaer rtc_init_entry()
+ #
+ # @return RTC::ReturnCode_t
+ #
+ #
def onInitialize(self):
- """
-
- The initialize action (on CREATED->ALIVE transition)
- formaer rtc_init_entry()
-
- \return RTC::ReturnCode_t
-
- """
# Bind variables and configuration variable
# Set InPort buffers
@@ -96,183 +83,172 @@
# Set CORBA Service Ports
return RTC.RTC_OK
-
+ # ##
+ # #
+ # # The finalize action (on ALIVE->END transition)
+ # # formaer rtc_exiting_entry()
+ # #
+ # # @return RTC::ReturnCode_t
+ #
+ # #
#def onFinalize(self, ec_id):
- # """
#
- # The finalize action (on ALIVE->END transition)
- # formaer rtc_exiting_entry()
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The startup action when ExecutionContext startup
+ # # former rtc_starting_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onStartup(self, ec_id):
- # """
#
- # The startup action when ExecutionContext startup
- # former rtc_starting_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The shutdown action when ExecutionContext stop
+ # # former rtc_stopping_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onShutdown(self, ec_id):
- # """
#
- # The shutdown action when ExecutionContext stop
- # former rtc_stopping_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The activated action (Active state entry action)
+ # # former rtc_active_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onActivated(self, ec_id):
- # """
#
- # The activated action (Active state entry action)
- # former rtc_active_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The deactivated action (Active state exit action)
+ # # former rtc_active_exit()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onDeactivated(self, ec_id):
- # """
#
- # The deactivated action (Active state exit action)
- # former rtc_active_exit()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The execution action that is invoked periodically
+ # # former rtc_active_do()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onExecute(self, ec_id):
- # """
#
- # The execution action that is invoked periodically
- # former rtc_active_do()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The aborting action when main logic error occurred.
+ # # former rtc_aborting_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onAborting(self, ec_id):
- # """
#
- # The aborting action when main logic error occurred.
- # former rtc_aborting_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The error action in ERROR state
+ # # former rtc_error_do()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onError(self, ec_id):
- # """
#
- # The error action in ERROR state
- # former rtc_error_do()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The reset action that is invoked resetting
+ # # This is same but different the former rtc_init_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onReset(self, ec_id):
- # """
#
- # The reset action that is invoked resetting
- # This is same but different the former rtc_init_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The state update action that is invoked after onExecute() action
+ # # no corresponding operation exists in OpenRTm-aist-0.2.0
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onStateUpdate(self, ec_id):
- # """
#
- # The state update action that is invoked after onExecute() action
- # no corresponding operation exists in OpenRTm-aist-0.2.0
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The action that is invoked when execution context's rate is changed
+ # # no corresponding operation exists in OpenRTm-aist-0.2.0
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onRateChanged(self, ec_id):
- # """
#
- # The action that is invoked when execution context's rate is changed
- # no corresponding operation exists in OpenRTm-aist-0.2.0
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
-
-
-
def fooInit(manager):
profile = OpenRTM_aist.Properties(defaults_str=foo_spec)
manager.registerFactory(profile,
foo,
OpenRTM_aist.Delete)
-
def MyModuleInit(manager):
fooInit(manager)
-
# Create a component
comp = manager.createComponent("foo")
-
-
-
def main():
mgr = OpenRTM_aist.Manager.init(sys.argv)
mgr.setModuleInitProc(MyModuleInit)
mgr.activateManager()
mgr.runManager()
-
if __name__ == "__main__":
main()
-
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/name/foo.py
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/name/foo.py 2012-10-17 08:45:35 UTC (rev 360)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/name/foo.py 2012-10-25 13:55:55 UTC (rev 361)
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
"""
- \file foo.py
- \brief MDesc
- \date $Date$
+ @file foo.py
+ @brief MDesc
+ @date $Date$
"""
import sys
import time
@@ -32,18 +32,18 @@
"lang_type", "SCRIPT",
""]
# </rtc-template>
+##
+# @class foo
+# @brief MDesc
+#
+#
class foo(OpenRTM_aist.DataFlowComponentBase):
- """
- \class foo
- \brief MDesc
-
- """
+ ##
+ # @brief constructor
+ # @param manager Maneger Object
+ #
def __init__(self, manager):
- """
- \brief constructor
- \param manager Maneger Object
- """
OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
# initialize of configuration-data.
@@ -51,15 +51,15 @@
# </rtc-template>
+ ##
+ #
+ # The initialize action (on CREATED->ALIVE transition)
+ # formaer rtc_init_entry()
+ #
+ # @return RTC::ReturnCode_t
+ #
+ #
def onInitialize(self):
- """
-
- The initialize action (on CREATED->ALIVE transition)
- formaer rtc_init_entry()
-
- \return RTC::ReturnCode_t
-
- """
# Bind variables and configuration variable
# Set InPort buffers
@@ -74,156 +74,156 @@
return RTC.RTC_OK
+ # ##
+ # #
+ # # The finalize action (on ALIVE->END transition)
+ # # formaer rtc_exiting_entry()
+ # #
+ # # @return RTC::ReturnCode_t
+ #
+ # #
#def onFinalize(self, ec_id):
- # """
#
- # The finalize action (on ALIVE->END transition)
- # formaer rtc_exiting_entry()
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The startup action when ExecutionContext startup
+ # # former rtc_starting_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onStartup(self, ec_id):
- # """
#
- # The startup action when ExecutionContext startup
- # former rtc_starting_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The shutdown action when ExecutionContext stop
+ # # former rtc_stopping_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onShutdown(self, ec_id):
- # """
#
- # The shutdown action when ExecutionContext stop
- # former rtc_stopping_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The activated action (Active state entry action)
+ # # former rtc_active_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onActivated(self, ec_id):
- # """
#
- # The activated action (Active state entry action)
- # former rtc_active_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The deactivated action (Active state exit action)
+ # # former rtc_active_exit()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onDeactivated(self, ec_id):
- # """
#
- # The deactivated action (Active state exit action)
- # former rtc_active_exit()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The execution action that is invoked periodically
+ # # former rtc_active_do()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onExecute(self, ec_id):
- # """
#
- # The execution action that is invoked periodically
- # former rtc_active_do()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The aborting action when main logic error occurred.
+ # # former rtc_aborting_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onAborting(self, ec_id):
- # """
#
- # The aborting action when main logic error occurred.
- # former rtc_aborting_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The error action in ERROR state
+ # # former rtc_error_do()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onError(self, ec_id):
- # """
#
- # The error action in ERROR state
- # former rtc_error_do()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The reset action that is invoked resetting
+ # # This is same but different the former rtc_init_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onReset(self, ec_id):
- # """
#
- # The reset action that is invoked resetting
- # This is same but different the former rtc_init_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The state update action that is invoked after onExecute() action
+ # # no corresponding operation exists in OpenRTm-aist-0.2.0
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onStateUpdate(self, ec_id):
- # """
#
- # The state update action that is invoked after onExecute() action
- # no corresponding operation exists in OpenRTm-aist-0.2.0
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The action that is invoked when execution context's rate is changed
+ # # no corresponding operation exists in OpenRTm-aist-0.2.0
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onRateChanged(self, ec_id):
- # """
#
- # The action that is invoked when execution context's rate is changed
- # no corresponding operation exists in OpenRTm-aist-0.2.0
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
def fooInit(manager):
@@ -231,10 +231,8 @@
manager.registerFactory(profile,
foo,
OpenRTM_aist.Delete)
-
def MyModuleInit(manager):
fooInit(manager)
-
# Create a component
comp = manager.createComponent("foo")
def main():
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/name2/Foo.py
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/name2/Foo.py 2012-10-17 08:45:35 UTC (rev 360)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/name2/Foo.py 2012-10-25 13:55:55 UTC (rev 361)
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
"""
- \file Foo.py
- \brief MDesc
- \date $Date$
+ @file Foo.py
+ @brief MDesc
+ @date $Date$
"""
import sys
import time
@@ -32,18 +32,18 @@
"lang_type", "SCRIPT",
""]
# </rtc-template>
+##
+# @class Foo
+# @brief MDesc
+#
+#
class Foo(OpenRTM_aist.DataFlowComponentBase):
- """
- \class Foo
- \brief MDesc
-
- """
+ ##
+ # @brief constructor
+ # @param manager Maneger Object
+ #
def __init__(self, manager):
- """
- \brief constructor
- \param manager Maneger Object
- """
OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
# initialize of configuration-data.
@@ -51,15 +51,15 @@
# </rtc-template>
+ ##
+ #
+ # The initialize action (on CREATED->ALIVE transition)
+ # formaer rtc_init_entry()
+ #
+ # @return RTC::ReturnCode_t
+ #
+ #
def onInitialize(self):
- """
-
- The initialize action (on CREATED->ALIVE transition)
- formaer rtc_init_entry()
-
- \return RTC::ReturnCode_t
-
- """
# Bind variables and configuration variable
# Set InPort buffers
@@ -74,156 +74,156 @@
return RTC.RTC_OK
+ # ##
+ # #
+ # # The finalize action (on ALIVE->END transition)
+ # # formaer rtc_exiting_entry()
+ # #
+ # # @return RTC::ReturnCode_t
+ #
+ # #
#def onFinalize(self, ec_id):
- # """
#
- # The finalize action (on ALIVE->END transition)
- # formaer rtc_exiting_entry()
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The startup action when ExecutionContext startup
+ # # former rtc_starting_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onStartup(self, ec_id):
- # """
#
- # The startup action when ExecutionContext startup
- # former rtc_starting_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The shutdown action when ExecutionContext stop
+ # # former rtc_stopping_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onShutdown(self, ec_id):
- # """
#
- # The shutdown action when ExecutionContext stop
- # former rtc_stopping_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The activated action (Active state entry action)
+ # # former rtc_active_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onActivated(self, ec_id):
- # """
#
- # The activated action (Active state entry action)
- # former rtc_active_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The deactivated action (Active state exit action)
+ # # former rtc_active_exit()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onDeactivated(self, ec_id):
- # """
#
- # The deactivated action (Active state exit action)
- # former rtc_active_exit()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The execution action that is invoked periodically
+ # # former rtc_active_do()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onExecute(self, ec_id):
- # """
#
- # The execution action that is invoked periodically
- # former rtc_active_do()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The aborting action when main logic error occurred.
+ # # former rtc_aborting_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onAborting(self, ec_id):
- # """
#
- # The aborting action when main logic error occurred.
- # former rtc_aborting_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The error action in ERROR state
+ # # former rtc_error_do()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onError(self, ec_id):
- # """
#
- # The error action in ERROR state
- # former rtc_error_do()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The reset action that is invoked resetting
+ # # This is same but different the former rtc_init_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onReset(self, ec_id):
- # """
#
- # The reset action that is invoked resetting
- # This is same but different the former rtc_init_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The state update action that is invoked after onExecute() action
+ # # no corresponding operation exists in OpenRTm-aist-0.2.0
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onStateUpdate(self, ec_id):
- # """
#
- # The state update action that is invoked after onExecute() action
- # no corresponding operation exists in OpenRTm-aist-0.2.0
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The action that is invoked when execution context's rate is changed
+ # # no corresponding operation exists in OpenRTm-aist-0.2.0
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onRateChanged(self, ec_id):
- # """
#
- # The action that is invoked when execution context's rate is changed
- # no corresponding operation exists in OpenRTm-aist-0.2.0
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
def FooInit(manager):
@@ -231,10 +231,8 @@
manager.registerFactory(profile,
Foo,
OpenRTM_aist.Delete)
-
def MyModuleInit(manager):
FooInit(manager)
-
# Create a component
comp = manager.createComponent("Foo")
def main():
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/outport1/foo.py
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/outport1/foo.py 2012-10-17 08:45:35 UTC (rev 360)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/outport1/foo.py 2012-10-25 13:55:55 UTC (rev 361)
@@ -1,32 +1,23 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- Python -*-
-
"""
- \file foo.py
- \brief MDesc
- \date $Date$
-
-
+ @file foo.py
+ @brief MDesc
+ @date $Date$
"""
import sys
import time
sys.path.append(".")
-
# Import RTM module
import RTC
import OpenRTM_aist
-
# Import Service implementation class
# <rtc-template block="service_impl">
-
# </rtc-template>
-
# Import Service stub modules
# <rtc-template block="consumer_import">
# </rtc-template>
-
-
# This module's spesification
# <rtc-template block="module_spec">
foo_spec = ["implementation_id", "foo",
@@ -41,21 +32,19 @@
"lang_type", "SCRIPT",
""]
# </rtc-template>
-
+##
+# @class foo
+# @brief MDesc
+#
+#
class foo(OpenRTM_aist.DataFlowComponentBase):
- """
- \class foo
- \brief MDesc
-
- """
+ ##
+ # @brief constructor
+ # @param manager Maneger Object
+ #
def __init__(self, manager):
- """
- \brief constructor
- \param manager Maneger Object
- """
OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
-
self._d_InP1 = RTC.TimedShort(RTC.Time(0,0),0)
"""
"""
@@ -73,18 +62,16 @@
# <rtc-template block="init_conf_param">
# </rtc-template>
-
-
+ ##
+ #
+ # The initialize action (on CREATED->ALIVE transition)
+ # formaer rtc_init_entry()
+ #
+ # @return RTC::ReturnCode_t
+ #
+ #
def onInitialize(self):
- """
-
- The initialize action (on CREATED->ALIVE transition)
- formaer rtc_init_entry()
-
- \return RTC::ReturnCode_t
-
- """
# Bind variables and configuration variable
# Set InPort buffers
@@ -101,183 +88,172 @@
# Set CORBA Service Ports
return RTC.RTC_OK
-
+ # ##
+ # #
+ # # The finalize action (on ALIVE->END transition)
+ # # formaer rtc_exiting_entry()
+ # #
+ # # @return RTC::ReturnCode_t
+ #
+ # #
#def onFinalize(self, ec_id):
- # """
#
- # The finalize action (on ALIVE->END transition)
- # formaer rtc_exiting_entry()
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The startup action when ExecutionContext startup
+ # # former rtc_starting_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onStartup(self, ec_id):
- # """
#
- # The startup action when ExecutionContext startup
- # former rtc_starting_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The shutdown action when ExecutionContext stop
+ # # former rtc_stopping_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onShutdown(self, ec_id):
- # """
#
- # The shutdown action when ExecutionContext stop
- # former rtc_stopping_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The activated action (Active state entry action)
+ # # former rtc_active_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onActivated(self, ec_id):
- # """
#
- # The activated action (Active state entry action)
- # former rtc_active_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The deactivated action (Active state exit action)
+ # # former rtc_active_exit()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onDeactivated(self, ec_id):
- # """
#
- # The deactivated action (Active state exit action)
- # former rtc_active_exit()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The execution action that is invoked periodically
+ # # former rtc_active_do()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onExecute(self, ec_id):
- # """
#
- # The execution action that is invoked periodically
- # former rtc_active_do()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The aborting action when main logic error occurred.
+ # # former rtc_aborting_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onAborting(self, ec_id):
- # """
#
- # The aborting action when main logic error occurred.
- # former rtc_aborting_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The error action in ERROR state
+ # # former rtc_error_do()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onError(self, ec_id):
- # """
#
- # The error action in ERROR state
- # former rtc_error_do()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The reset action that is invoked resetting
+ # # This is same but different the former rtc_init_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onReset(self, ec_id):
- # """
#
- # The reset action that is invoked resetting
- # This is same but different the former rtc_init_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The state update action that is invoked after onExecute() action
+ # # no corresponding operation exists in OpenRTm-aist-0.2.0
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onStateUpdate(self, ec_id):
- # """
#
- # The state update action that is invoked after onExecute() action
- # no corresponding operation exists in OpenRTm-aist-0.2.0
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The action that is invoked when execution context's rate is changed
+ # # no corresponding operation exists in OpenRTm-aist-0.2.0
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onRateChanged(self, ec_id):
- # """
#
- # The action that is invoked when execution context's rate is changed
- # no corresponding operation exists in OpenRTm-aist-0.2.0
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
-
-
-
def fooInit(manager):
profile = OpenRTM_aist.Properties(defaults_str=foo_spec)
manager.registerFactory(profile,
foo,
OpenRTM_aist.Delete)
-
def MyModuleInit(manager):
fooInit(manager)
-
# Create a component
comp = manager.createComponent("foo")
-
-
-
def main():
mgr = OpenRTM_aist.Manager.init(sys.argv)
mgr.setModuleInitProc(MyModuleInit)
mgr.activateManager()
mgr.runManager()
-
if __name__ == "__main__":
main()
-
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/outport2/foo.py
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/outport2/foo.py 2012-10-17 08:45:35 UTC (rev 360)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/outport2/foo.py 2012-10-25 13:55:55 UTC (rev 361)
@@ -1,32 +1,23 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- Python -*-
-
"""
- \file foo.py
- \brief MDesc
- \date $Date$
-
-
+ @file foo.py
+ @brief MDesc
+ @date $Date$
"""
import sys
import time
sys.path.append(".")
-
# Import RTM module
import RTC
import OpenRTM_aist
-
# Import Service implementation class
# <rtc-template block="service_impl">
-
# </rtc-template>
-
# Import Service stub modules
# <rtc-template block="consumer_import">
# </rtc-template>
-
-
# This module's spesification
# <rtc-template block="module_spec">
foo_spec = ["implementation_id", "foo",
@@ -41,21 +32,19 @@
"lang_type", "SCRIPT",
""]
# </rtc-template>
-
+##
+# @class foo
+# @brief MDesc
+#
+#
class foo(OpenRTM_aist.DataFlowComponentBase):
- """
- \class foo
- \brief MDesc
-
- """
+ ##
+ # @brief constructor
+ # @param manager Maneger Object
+ #
def __init__(self, manager):
- """
- \brief constructor
- \param manager Maneger Object
- """
OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
-
self._d_InP1 = RTC.TimedShort(RTC.Time(0,0),0)
"""
"""
@@ -73,23 +62,20 @@
"""
self._OutP2Out = OpenRTM_aist.OutPort("OutP2", self._d_OutP2)
-
# initialize of configuration-data.
# <rtc-template block="init_conf_param">
# </rtc-template>
-
-
+ ##
+ #
+ # The initialize action (on CREATED->ALIVE transition)
+ # formaer rtc_init_entry()
+ #
+ # @return RTC::ReturnCode_t
+ #
+ #
def onInitialize(self):
- """
-
- The initialize action (on CREATED->ALIVE transition)
- formaer rtc_init_entry()
-
- \return RTC::ReturnCode_t
-
- """
# Bind variables and configuration variable
# Set InPort buffers
@@ -107,183 +93,172 @@
# Set CORBA Service Ports
return RTC.RTC_OK
-
+ # ##
+ # #
+ # # The finalize action (on ALIVE->END transition)
+ # # formaer rtc_exiting_entry()
+ # #
+ # # @return RTC::ReturnCode_t
+ #
+ # #
#def onFinalize(self, ec_id):
- # """
#
- # The finalize action (on ALIVE->END transition)
- # formaer rtc_exiting_entry()
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The startup action when ExecutionContext startup
+ # # former rtc_starting_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onStartup(self, ec_id):
- # """
#
- # The startup action when ExecutionContext startup
- # former rtc_starting_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The shutdown action when ExecutionContext stop
+ # # former rtc_stopping_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onShutdown(self, ec_id):
- # """
#
- # The shutdown action when ExecutionContext stop
- # former rtc_stopping_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The activated action (Active state entry action)
+ # # former rtc_active_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onActivated(self, ec_id):
- # """
#
- # The activated action (Active state entry action)
- # former rtc_active_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The deactivated action (Active state exit action)
+ # # former rtc_active_exit()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onDeactivated(self, ec_id):
- # """
#
- # The deactivated action (Active state exit action)
- # former rtc_active_exit()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The execution action that is invoked periodically
+ # # former rtc_active_do()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onExecute(self, ec_id):
- # """
#
- # The execution action that is invoked periodically
- # former rtc_active_do()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The aborting action when main logic error occurred.
+ # # former rtc_aborting_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onAborting(self, ec_id):
- # """
#
- # The aborting action when main logic error occurred.
- # former rtc_aborting_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The error action in ERROR state
+ # # former rtc_error_do()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onError(self, ec_id):
- # """
#
- # The error action in ERROR state
- # former rtc_error_do()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The reset action that is invoked resetting
+ # # This is same but different the former rtc_init_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onReset(self, ec_id):
- # """
#
- # The reset action that is invoked resetting
- # This is same but different the former rtc_init_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The state update action that is invoked after onExecute() action
+ # # no corresponding operation exists in OpenRTm-aist-0.2.0
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onStateUpdate(self, ec_id):
- # """
#
- # The state update action that is invoked after onExecute() action
- # no corresponding operation exists in OpenRTm-aist-0.2.0
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The action that is invoked when execution context's rate is changed
+ # # no corresponding operation exists in OpenRTm-aist-0.2.0
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onRateChanged(self, ec_id):
- # """
#
- # The action that is invoked when execution context's rate is changed
- # no corresponding operation exists in OpenRTm-aist-0.2.0
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
-
-
-
def fooInit(manager):
profile = OpenRTM_aist.Properties(defaults_str=foo_spec)
manager.registerFactory(profile,
foo,
OpenRTM_aist.Delete)
-
def MyModuleInit(manager):
fooInit(manager)
-
# Create a component
comp = manager.createComponent("foo")
-
-
-
def main():
mgr = OpenRTM_aist.Manager.init(sys.argv)
mgr.setModuleInitProc(MyModuleInit)
mgr.activateManager()
mgr.runManager()
-
if __name__ == "__main__":
main()
-
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/service1/MyService_idl_example.py
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/service1/MyService_idl_example.py 2012-10-17 08:45:35 UTC (rev 360)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/service1/MyService_idl_example.py 2012-10-25 13:55:55 UTC (rev 361)
@@ -1,47 +1,35 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- Python -*-
-
"""
- \file MyService_idl_examplefile.py
- \brief Python example implementations generated from MyService.idl
- \date $Date$
-
-
+ @file MyService_idl_examplefile.py
+ @brief Python example implementations generated from MyService.idl
+ @date $Date$
"""
-
import omniORB
from omniORB import CORBA, PortableServer
-
import _GlobalIDL, _GlobalIDL__POA
-
-
class MyService_i (_GlobalIDL__POA.MyService):
"""
- \class MyService_i
+ @class MyService_i
Example class implementing IDL interface MyService
"""
-
def __init__(self):
"""
- \brief standard constructor
+ @brief standard constructor
Initialise member variables here
"""
pass
-
# void setGain(in float gain)
def setGain(self, gain):
raise CORBA.NO_IMPLEMENT(0, CORBA.COMPLETED_NO)
# *** Implement me
# Must return: None
-
# float getGain()
def getGain(self):
raise CORBA.NO_IMPLEMENT(0, CORBA.COMPLETED_NO)
# *** Implement me
# Must return: result
-
-
if __name__ == "__main__":
import sys
@@ -50,22 +38,16 @@
# As an example, we activate an object in the Root POA
poa = orb.resolve_initial_references("RootPOA")
-
# Create an instance of a servant class
servant = MyService_i()
-
# Activate it in the Root POA
poa.activate_object(servant)
-
# Get the object reference to the object
objref = servant._this()
# Print a stringified IOR for it
print orb.object_to_string(objref)
-
# Activate the Root POA's manager
poa._get_the_POAManager().activate()
-
# Run the ORB, blocking this thread
orb.run()
-
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/service1/foo.py
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/service1/foo.py 2012-10-17 08:45:35 UTC (rev 360)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/service1/foo.py 2012-10-25 13:55:55 UTC (rev 361)
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
"""
- \file foo.py
- \brief MDesc
- \date $Date$
+ @file foo.py
+ @brief MDesc
+ @date $Date$
"""
import sys
import time
@@ -34,18 +34,18 @@
"lang_type", "SCRIPT",
""]
# </rtc-template>
+##
+# @class foo
+# @brief MDesc
+#
+#
class foo(OpenRTM_aist.DataFlowComponentBase):
- """
- \class foo
- \brief MDesc
-
- """
+ ##
+ # @brief constructor
+ # @param manager Maneger Object
+ #
def __init__(self, manager):
- """
- \brief constructor
- \param manager Maneger Object
- """
OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
self._d_InP1 = RTC.TimedShort(RTC.Time(0,0),0)
"""
@@ -75,15 +75,15 @@
# </rtc-template>
+ ##
+ #
+ # The initialize action (on CREATED->ALIVE transition)
+ # formaer rtc_init_entry()
+ #
+ # @return RTC::ReturnCode_t
+ #
+ #
def onInitialize(self):
- """
-
- The initialize action (on CREATED->ALIVE transition)
- formaer rtc_init_entry()
-
- \return RTC::ReturnCode_t
-
- """
# Bind variables and configuration variable
# Set InPort buffers
@@ -104,156 +104,156 @@
return RTC.RTC_OK
+ # ##
+ # #
+ # # The finalize action (on ALIVE->END transition)
+ # # formaer rtc_exiting_entry()
+ # #
+ # # @return RTC::ReturnCode_t
+ #
+ # #
#def onFinalize(self, ec_id):
- # """
#
- # The finalize action (on ALIVE->END transition)
- # formaer rtc_exiting_entry()
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The startup action when ExecutionContext startup
+ # # former rtc_starting_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onStartup(self, ec_id):
- # """
#
- # The startup action when ExecutionContext startup
- # former rtc_starting_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The shutdown action when ExecutionContext stop
+ # # former rtc_stopping_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onShutdown(self, ec_id):
- # """
#
- # The shutdown action when ExecutionContext stop
- # former rtc_stopping_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The activated action (Active state entry action)
+ # # former rtc_active_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onActivated(self, ec_id):
- # """
#
- # The activated action (Active state entry action)
- # former rtc_active_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The deactivated action (Active state exit action)
+ # # former rtc_active_exit()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onDeactivated(self, ec_id):
- # """
#
- # The deactivated action (Active state exit action)
- # former rtc_active_exit()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The execution action that is invoked periodically
+ # # former rtc_active_do()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onExecute(self, ec_id):
- # """
#
- # The execution action that is invoked periodically
- # former rtc_active_do()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The aborting action when main logic error occurred.
+ # # former rtc_aborting_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onAborting(self, ec_id):
- # """
#
- # The aborting action when main logic error occurred.
- # former rtc_aborting_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The error action in ERROR state
+ # # former rtc_error_do()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onError(self, ec_id):
- # """
#
- # The error action in ERROR state
- # former rtc_error_do()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The reset action that is invoked resetting
+ # # This is same but different the former rtc_init_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onReset(self, ec_id):
- # """
#
- # The reset action that is invoked resetting
- # This is same but different the former rtc_init_entry()
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The state update action that is invoked after onExecute() action
+ # # no corresponding operation exists in OpenRTm-aist-0.2.0
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onStateUpdate(self, ec_id):
- # """
#
- # The state update action that is invoked after onExecute() action
- # no corresponding operation exists in OpenRTm-aist-0.2.0
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The action that is invoked when execution context's rate is changed
+ # # no corresponding operation exists in OpenRTm-aist-0.2.0
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onRateChanged(self, ec_id):
- # """
#
- # The action that is invoked when execution context's rate is changed
- # no corresponding operation exists in OpenRTm-aist-0.2.0
- #
- # \param ec_id target ExecutionContext Id
- #
- # \return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
def fooInit(manager):
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/service2/MyService_idl_example.py
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/service2/MyService_idl_example.py 2012-10-17 08:45:35 UTC (rev 360)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/service2/MyService_idl_example.py 2012-10-25 13:55:55 UTC (rev 361)
@@ -1,47 +1,35 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- Python -*-
-
"""
- \file MyService_idl_examplefile.py
- \brief Python example implementations generated from MyService.idl
- \date $Date$
-
-
+ @file MyService_idl_examplefile.py
+ @brief Python example implementations generated from MyService.idl
+ @date $Date$
"""
-
import omniORB
from omniORB import CORBA, PortableServer
-
import _GlobalIDL, _GlobalIDL__POA
-
-
class MyService_i (_GlobalIDL__POA.MyService):
"""
- \class MyService_i
+ @class MyService_i
Example class implementing IDL interface MyService
"""
-
def __init__(self):
"""
- \brief standard constructor
+ @brief standard constructor
Initialise member variables here
"""
pass
-
# void setGain(in float gain)
def setGain(self, gain):
raise CORBA.NO_IMPLEMENT(0, CORBA.COMPLETED_NO)
# *** Implement me
# Must return: None
-
# float getGain()
def getGain(self):
raise CORBA.NO_IMPLEMENT(0, CORBA.COMPLETED_NO)
# *** Implement me
# Must return: result
-
-
if __name__ == "__main__":
import sys
@@ -50,22 +38,16 @@
# As an example, we activate an object in the Root POA
poa = orb.resolve_initial_references("RootPOA")
-
# Create an instance of a servant class
servant = MyService_i()
-
# Activate it in the Root POA
poa.activate_object(servant)
-
# Get the object reference to the object
objref = servant._this()
# Print a stringified IOR for it
print orb.object_to_string(objref)
-
# Activate the Root POA's manager
poa._get_the_POAManager().activate()
-
# Run the ORB, blocking this thread
orb.run()
-
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/service2/foo.py
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/service2/foo.py 2012-10-17 08:45:35 UTC (rev 360)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/resource/100/base/service2/foo.py 2012-10-25 13:55:55 UTC (rev 361)
@@ -36,18 +36,18 @@
"lang_type", "SCRIPT",
""]
# </rtc-template>
+##
+# @class foo
+# @brief MDesc
+#
+#
class foo(OpenRTM_aist.DataFlowComponentBase):
- """
- @class foo
- @brief MDesc
-
- """
+ ##
+ # @brief constructor
+ # @param manager Maneger Object
+ #
def __init__(self, manager):
- """
- @brief constructor
- @param manager Maneger Object
- """
OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
self._d_InP1 = RTC.TimedShort(RTC.Time(0,0),0)
"""
@@ -83,15 +83,15 @@
# </rtc-template>
+ ##
+ #
+ # The initialize action (on CREATED->ALIVE transition)
+ # formaer rtc_init_entry()
+ #
+ # @return RTC::ReturnCode_t
+ #
+ #
def onInitialize(self):
- """
-
- The initialize action (on CREATED->ALIVE transition)
- formaer rtc_init_entry()
-
- @return RTC::ReturnCode_t
-
- """
# Bind variables and configuration variable
# Set InPort buffers
@@ -114,156 +114,156 @@
return RTC.RTC_OK
+ # ##
+ # #
+ # # The finalize action (on ALIVE->END transition)
+ # # formaer rtc_exiting_entry()
+ # #
+ # # @return RTC::ReturnCode_t
+ #
+ # #
#def onFinalize(self, ec_id):
- # """
#
- # The finalize action (on ALIVE->END transition)
- # formaer rtc_exiting_entry()
- #
- # @return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The startup action when ExecutionContext startup
+ # # former rtc_starting_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onStartup(self, ec_id):
- # """
#
- # The startup action when ExecutionContext startup
- # former rtc_starting_entry()
- #
- # @param ec_id target ExecutionContext Id
- #
- # @return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The shutdown action when ExecutionContext stop
+ # # former rtc_stopping_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onShutdown(self, ec_id):
- # """
#
- # The shutdown action when ExecutionContext stop
- # former rtc_stopping_entry()
- #
- # @param ec_id target ExecutionContext Id
- #
- # @return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The activated action (Active state entry action)
+ # # former rtc_active_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onActivated(self, ec_id):
- # """
#
- # The activated action (Active state entry action)
- # former rtc_active_entry()
- #
- # @param ec_id target ExecutionContext Id
- #
- # @return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The deactivated action (Active state exit action)
+ # # former rtc_active_exit()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onDeactivated(self, ec_id):
- # """
#
- # The deactivated action (Active state exit action)
- # former rtc_active_exit()
- #
- # @param ec_id target ExecutionContext Id
- #
- # @return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The execution action that is invoked periodically
+ # # former rtc_active_do()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onExecute(self, ec_id):
- # """
#
- # The execution action that is invoked periodically
- # former rtc_active_do()
- #
- # @param ec_id target ExecutionContext Id
- #
- # @return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The aborting action when main logic error occurred.
+ # # former rtc_aborting_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onAborting(self, ec_id):
- # """
#
- # The aborting action when main logic error occurred.
- # former rtc_aborting_entry()
- #
- # @param ec_id target ExecutionContext Id
- #
- # @return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The error action in ERROR state
+ # # former rtc_error_do()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onError(self, ec_id):
- # """
#
- # The error action in ERROR state
- # former rtc_error_do()
- #
- # @param ec_id target ExecutionContext Id
- #
- # @return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The reset action that is invoked resetting
+ # # This is same but different the former rtc_init_entry()
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onReset(self, ec_id):
- # """
#
- # The reset action that is invoked resetting
- # This is same but different the former rtc_init_entry()
- #
- # @param ec_id target ExecutionContext Id
- #
- # @return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The state update action that is invoked after onExecute() action
+ # # no corresponding operation exists in OpenRTm-aist-0.2.0
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onStateUpdate(self, ec_id):
- # """
#
- # The state update action that is invoked after onExecute() action
- # no corresponding operation exists in OpenRTm-aist-0.2.0
- #
- # @param ec_id target ExecutionContext Id
- #
- # @return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
+ # ##
+ # #
+ # # The action that is invoked when execution context's rate is changed
+ # # no corresponding operation exists in OpenRTm-aist-0.2.0
+ # #
+ # # @param ec_id target ExecutionContext Id
+ # #
+ # # @return RTC::ReturnCode_t
+ # #
+ # #
#def onRateChanged(self, ec_id):
- # """
#
- # The action that is invoked when execution context's rate is changed
- # no corresponding operation exists in OpenRTm-aist-0.2.0
- #
- # @param ec_id target ExecutionContext Id
- #
- # @return RTC::ReturnCode_t
- #
- # """
- #
# return RTC.RTC_OK
def fooInit(manager):
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/src/jp/go/aist/rtm/rtcbuilder/python/manager/TemplateHelperPy.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/src/jp/go/aist/rtm/rtcbuilder/python/manager/TemplateHelperPy.java 2012-10-17 08:45:35 UTC (rev 360)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/src/jp/go/aist/rtm/rtcbuilder/python/manager/TemplateHelperPy.java 2012-10-25 13:55:55 UTC (rev 361)
@@ -1,6 +1,10 @@
package jp.go.aist.rtm.rtcbuilder.python.manager;
+import java.util.ArrayList;
+import java.util.List;
+
import jp.go.aist.rtm.rtcbuilder.IRtcBuilderConstants;
+import jp.go.aist.rtm.rtcbuilder.generator.param.idl.IdlFileParam;
import jp.go.aist.rtm.rtcbuilder.python.IRtcBuilderConstantsPython;
import jp.go.aist.rtm.rtcbuilder.util.StringUtil;
@@ -86,4 +90,30 @@
IRtcBuilderConstantsPython.DOC_POSTSH_PREFIX_PY, IRtcBuilderConstantsPython.DOC_POST_OFFSET_PY);
}
//
+ public boolean hasDataPortType(List<IdlFileParam> targetFiles) {
+ for(IdlFileParam target : targetFiles) {
+ if(target.isDataPort()) return true;
+ }
+ return false;
+ }
+
+ public List<String> getDataPortTypes(List<IdlFileParam> targetFiles) {
+ List<String> result = new ArrayList<String>();
+
+ for(IdlFileParam target : targetFiles) {
+ if(target.isDataPort()==false) continue;
+ String targetType = "";
+ if( target.getTargetType().contains("::") ) {
+ String[] types = target.getTargetType().split("::");
+ //TODO どこまでが必要なのか?
+ targetType = types[0];
+ } else {
+ targetType = "_GlobalIDL";
+ }
+ if(result.contains(targetType)==false) {
+ result.add(targetType);
+ }
+ }
+ return result;
+ }
}
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/src/jp/go/aist/rtm/rtcbuilder/python/template/python/Py_RTC.py.vsl
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/src/jp/go/aist/rtm/rtcbuilder/python/template/python/Py_RTC.py.vsl 2012-10-17 08:45:35 UTC (rev 360)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/src/jp/go/aist/rtm/rtcbuilder/python/template/python/Py_RTC.py.vsl 2012-10-25 13:55:55 UTC (rev 361)
@@ -27,6 +27,10 @@
#foreach($IdlFile in ${allIdlFileParam})import ${tmpltHelper.getFilenameNoExt(${IdlFile.IdlFile})}_idl
#end
+#if( ${tmpltHelperPy.hasDataPortType(${allIdlFileParam})})
+#foreach($idlTarget in ${tmpltHelperPy.getDataPortTypes(${allIdlFileParam})})import ${idlTarget}
+#end
+#end
# Import Service implementation class
# <rtc-template block="service_impl">
More information about the openrtm-commit
mailing list