[openrtm-commit:02601] r824 - in trunk/OpenRTM-aist-Python: . OpenRTM_aist OpenRTM_aist/ext/sdo/observer OpenRTM_aist/ext/sdo/observer/test OpenRTM_aist/python3_examples OpenRTM_aist/python3_examples/AutoControl OpenRTM_aist/python3_examples/AutoTest OpenRTM_aist/python3_examples/Composite OpenRTM_aist/python3_examples/ConfigSample OpenRTM_aist/python3_examples/ExtTrigger OpenRTM_aist/python3_examples/MobileRobotCanvas OpenRTM_aist/python3_examples/NXTRTC OpenRTM_aist/python3_examples/SeqIO OpenRTM_aist/python3_examples/SimpleIO OpenRTM_aist/python3_examples/SimpleService OpenRTM_aist/python3_examples/Slider_and_Motor OpenRTM_aist/python3_examples/Templates OpenRTM_aist/python3_examples/TkJoyStick OpenRTM_aist/python3_examples/TkLRFViewer OpenRTM_aist/utils/rtc-template OpenRTM_aist/utils/rtcprof OpenRTM_aist/utils/rtm-naming

openrtm @ openrtm.org openrtm @ openrtm.org
2017年 5月 2日 (火) 09:49:39 JST


Author: miyamoto
Date: 2017-05-02 09:49:38 +0900 (Tue, 02 May 2017)
New Revision: 824

Added:
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoControl/
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoControl/AutoControl.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoControl/__init__.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoControl/gen.bat
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoControl/rtc.conf
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/AutoTestComposite.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/AutoTestIn.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/AutoTestOut.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/AutoTestService.idl
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/ConnectTest.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/CorbaNaming.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/__init__.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/autotestin.conf
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/autotestout.conf
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/gen_data.bat
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/gen_data.sh
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/rtc.conf
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/rtc_handle.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/rtc_handle10_11.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/Composite.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/Controller.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/Motor.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/README.Controller
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/README.Motor
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/README.Sensor
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/Sensor.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/__init__.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/composite.conf
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/gen.bat
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/gen.sh
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/rtc.conf
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/ConfigSample.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/__init__.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/configsample.conf
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/gen.bat
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/gen.sh
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/rtc.conf
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/Connector.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/ConsoleIn.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/ConsoleOut.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/__init__.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/gen.sh
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/rtc.conf
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/run.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/MobileRobotCanvas/
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/MobileRobotCanvas/TkMobileRobotSimulator.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/MobileRobotCanvas/__init__.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/MobileRobotCanvas/gen.sh
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/MobileRobotCanvas/rtc.conf
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTBrick.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTBrick20.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTRTC.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTRTC20.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTRTC20_callback.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTRTC_callback.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/__init__.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/gen.bat
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/rtc.conf
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/SeqIn.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/SeqOut.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/__init__.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/gen.bat
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/gen.sh
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/rtc.conf
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/Connector.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/ConsoleIn.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/ConsoleOut.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/__init__.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/gen.bat
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/gen.sh
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/rtc.conf
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/run.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/Connector.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/MyService.idl
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/MyServiceConsumer.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/MyServiceProvider.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/__init__.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/gen.bat
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/gen.sh
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/rtc.conf
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/run.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/Connector.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/SliderComp.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/TkMotorComp.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/TkMotorPosComp.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/__init__.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/rtc.conf
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/run.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/slider.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/tkmotor.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/AIO.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/ActArray.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Bumper.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Camera.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/CarlikeControl.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/DIO.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/FeatureMap.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Fiducial.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/GPS.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Gripper.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/HeadingControl2D.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/HeadingControl3D.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/IMU.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/INS.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Joystick.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Limb.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Localise2D.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Localise3D.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Multicamera.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/OccupancyGridMap.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Odometry2D.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Odometry3D.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PanTilt.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PathFollower2D.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PathFollower3D.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PathPlanner2D.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PathPlanner3D.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PointCloud.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PoseControl2D.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PoseControl3D.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Power.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/RFID.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Ranger.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/VelocityControl2D.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/VelocityControl3D.xml
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/__init__.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/TkJoyStickComp.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/__init__.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/gen.sh
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/rtc.conf
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/tkjoystick.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkLRFViewer/
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkLRFViewer/TkLRFViewer.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkLRFViewer/__init__.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkLRFViewer/rtc.conf
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/__init__.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/component.conf
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/rtc.conf.sample
   trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/rtcd.conf
Modified:
   trunk/OpenRTM-aist-Python/OpenRTM_aist/CORBA_IORUtil.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/CORBA_RTCUtil.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/ConfigAdmin.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/ConnectorListener.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaNaming.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaPort.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextProfile.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextWorker.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/Factory.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/GlobalFactory.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/ListenerHolder.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/LogstreamFile.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerConfig.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/ModuleManager.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/NVUtil.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingManager.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/NumberingPolicy.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicECSharedComposite.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/Process.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/Properties.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/SdoServiceAdmin.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/SharedMemory.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/Singleton.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/StateMachine.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/StringUtil.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/SystemLogger.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeMeasure.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeValue.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/ext/sdo/observer/COCTestRTC.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/ext/sdo/observer/test/ComponentObserverProvider.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/ext/sdo/observer/test/test_ComponentObserverConsumer.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/gen_base.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/python_gen.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/rtc-template.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/uuid.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/yat.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtcprof/rtcprof.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtm-naming/rtm-naming.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/uuid.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/version.py
   trunk/OpenRTM-aist-Python/setup.py
Log:
[compat] Python 3 support.

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/CORBA_IORUtil.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/CORBA_IORUtil.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/CORBA_IORUtil.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -227,14 +227,22 @@
   if iorstr[0:4] != 'IOR:': return
 
   pos = len("IOR:")
-  iorvalue = [chr(int(i + j, 16))
+  if sys.version_info[0] == 2:
+    iorvalue = [chr(int(i + j, 16))
               for (i, j) in zip(iorstr[pos::2], iorstr[(pos + 1)::2])]
+  else:
+    iorvalue = [int(i + j, 16)
+              for (i, j) in zip(iorstr[pos::2], iorstr[(pos + 1)::2])]
   # Endian flag
   pos = 0
   endian = (iorvalue[pos] != 0)
   pos += 4
-  ior = cdrUnmarshal(_0__GlobalIDL._tc_IOR,
+  if sys.version_info[0] == 2:
+    ior = cdrUnmarshal(_0__GlobalIDL._tc_IOR,
                      "".join(iorvalue[pos:]), endian)
+  else:
+    ior = cdrUnmarshal(_0__GlobalIDL._tc_IOR,
+                     bytes(iorvalue[pos:]), endian)
   return ior
 
 def getEndpoints(ior):
@@ -243,36 +251,56 @@
   for p in ior.profiles:
     # TAG_INTERNET_IOP
     if p.tag == IOP.TAG_INTERNET_IOP:
-      pbody = cdrUnmarshal(_0__GlobalIDL._tc_ProfileBody,
-                           "".join(p.profile_data), endian)
+      if sys.version_info[0] == 2:
+        pbody = cdrUnmarshal(_0__GlobalIDL._tc_ProfileBody,
+                             "".join(p.profile_data), endian)
+      else:
+        pbody = cdrUnmarshal(_0__GlobalIDL._tc_ProfileBody,
+                             p.profile_data, endian)
       addr.append(pbody.address_)
       addr += extractAddrs(pbody.components)
 
     # TAG_MULTIPLE_COMPONENTS
     elif p.tag == IOP.TAG_MULTIPLE_COMPONENTS:
-      profiles = cdrUnmarshal(_0__GlobalIDL._tc_MultipleComponentProfile,
+      if sys.version_info[0] == 2:
+        profiles = cdrUnmarshal(_0__GlobalIDL._tc_MultipleComponentProfile,
                               "".join(p.profile_data), endian)
+      else:
+        profiles = cdrUnmarshal(_0__GlobalIDL._tc_MultipleComponentProfile,
+                              p.profile_data, endian)
       addr += extractAddrs(profiles)
     else:
-      print "Other Profile"
+      print("Other Profile")
   return addr
 
 def extractAddrs(comps):
   global endian
   addr = []
   for c in comps:
-    # print "TAG component type: ", IOP.ComponentID[c.tag]
+    # print("TAG component type: ", IOP.ComponentID[c.tag])
     if c.tag == IOP.TAG_ALTERNATE_IIOP_ADDRESS:
-      size = cdrUnmarshal(CORBA.TC_ulong,
-                          "".join(c.component_data[0:4]), endian)
-      address = cdrUnmarshal(_0__GlobalIDL._tc_Address,
-                             "".join(c.component_data[4:]), endian)
+      if sys.version_info[0] == 2:
+        size = cdrUnmarshal(CORBA.TC_ulong,
+                            "".join(c.component_data[0:4]), endian)
+        address = cdrUnmarshal(_0__GlobalIDL._tc_Address,
+                               "".join(c.component_data[4:]), endian)
+      else:
+        size = cdrUnmarshal(CORBA.TC_ulong,
+                            c.component_data[0:4], endian)
+        address = cdrUnmarshal(_0__GlobalIDL._tc_Address,
+                               c.component_data[4:], endian)
       addr.append(address)
     elif c.tag == IOP.TAG_ORB_TYPE:
-      size = cdrUnmarshal(CORBA.TC_ulong,
-                          "".join(c.component_data[0:4]), endian)
-      orb_type = cdrUnmarshal(CORBA.TC_ulong,
-                              "".join(c.component_data[4:8]), endian)
+      if sys.version_info[0] == 2:
+        size = cdrUnmarshal(CORBA.TC_ulong,
+                            "".join(c.component_data[0:4]), endian)
+        orb_type = cdrUnmarshal(CORBA.TC_ulong,
+                                "".join(c.component_data[4:8]), endian)
+      else:
+        size = cdrUnmarshal(CORBA.TC_ulong,
+                            c.component_data[0:4], endian)
+        orb_type = cdrUnmarshal(CORBA.TC_ulong,
+                                c.component_data[4:8], endian)
   return addr
 
 iorstr = "IOR:000000000000003549444c3a6f70656e72746d2e616973742e676f2e6a702f4f70656e52544d2f44617461466c6f77436f6d706f6e656e743a312e3000000000000000010000000000000064000102000000000d31302e3231312e35352e31350000ffa90000000efed593815800002090000000000100000000000200000000000000080000000041545400000000010000001c00000000000100010000000105010001000101090000000100010109"
@@ -283,4 +311,4 @@
 
 # orb = CORBA.ORB_init()
 # ior = toIOR(iorstr)
-# print getEndpoints(ior)
+# print(getEndpoints(ior))

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/CORBA_RTCUtil.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/CORBA_RTCUtil.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/CORBA_RTCUtil.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -9,6 +9,7 @@
 # 
 
 import OpenRTM_aist
+import OpenRTM_aist.RTObject
 from omniORB import CORBA
 import RTC
 

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ConfigAdmin.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ConfigAdmin.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ConfigAdmin.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -1183,8 +1183,8 @@
   #
   # void setOnUpdate(OnUpdateCallback* cb);
   def setOnUpdate(self, cb):
-    print "setOnUpdate function is obsolete."
-    print "Use addConfigurationSetNameListener instead."
+    print("setOnUpdate function is obsolete.")
+    print("Use addConfigurationSetNameListener instead.")
     self._listeners.configsetname_[OpenRTM_aist.ConfigurationSetNameListenerType.ON_UPDATE_CONFIG_SET].addListener(cb, False)
     return
 
@@ -1210,8 +1210,8 @@
   #
   # void setOnUpdateParam(OnUpdateParamCallback* cb);
   def setOnUpdateParam(self, cb):
-    print "setOnUpdateParam function is obsolete."
-    print "Use addConfigurationParamListener instead."
+    print("setOnUpdateParam function is obsolete.")
+    print("Use addConfigurationParamListener instead.")
     self._listeners.configparam_[OpenRTM_aist.ConfigurationParamListenerType.ON_UPDATE_CONFIG_PARAM].addListener(cb, False)
     return
 
@@ -1237,8 +1237,8 @@
   #
   # void setOnSetConfigurationSet(OnSetConfigurationSetCallback* cb);
   def setOnSetConfigurationSet(self, cb):
-    print "setOnSetConfigurationSet function is obsolete."
-    print "Use addConfigurationSetListener instead."
+    print("setOnSetConfigurationSet function is obsolete.")
+    print("Use addConfigurationSetListener instead.")
     self._listeners.configset_[OpenRTM_aist.ConfigurationSetListenerType.ON_SET_CONFIG_SET].addListener(cb, False)
     return
 
@@ -1264,8 +1264,8 @@
   #
   # void setOnAddConfigurationSet(OnAddConfigurationAddCallback* cb);
   def setOnAddConfigurationSet(self, cb):
-    print "setOnAddConfigurationSet function is obsolete."
-    print "Use addConfigurationSetListener instead."
+    print("setOnAddConfigurationSet function is obsolete.")
+    print("Use addConfigurationSetListener instead.")
     self._listeners.configset_[OpenRTM_aist.ConfigurationSetListenerType.ON_ADD_CONFIG_SET].addListener(cb, False)
     return
 
@@ -1291,8 +1291,8 @@
   #
   # void setOnRemoveConfigurationSet(OnRemoveConfigurationSetCallback* cb);
   def setOnRemoveConfigurationSet(self, cb):
-    print "setOnRemoveConfigurationSet function is obsolete."
-    print "Use addConfigurationSetNameListener instead."
+    print("setOnRemoveConfigurationSet function is obsolete.")
+    print("Use addConfigurationSetNameListener instead.")
     self._listeners.configsetname_[OpenRTM_aist.ConfigurationSetNameListenerType.ON_REMOVE_CONFIG_SET].addListener(cb, False)
     return
 
@@ -1318,8 +1318,8 @@
   #
   # void setOnActivateSet(OnActivateSetCallback* cb);
   def setOnActivateSet(self, cb):
-    print "setOnActivateSet function is obsolete."
-    print "Use addConfigurationSetNameListener instead."
+    print("setOnActivateSet function is obsolete.")
+    print("Use addConfigurationSetNameListener instead.")
     self._listeners.configsetname_[OpenRTM_aist.ConfigurationSetNameListenerType.ON_ACTIVATE_CONFIG_SET].addListener(cb, False)
     return
 

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ConnectorListener.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ConnectorListener.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ConnectorListener.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -539,7 +539,7 @@
   #
   def __del__(self):
     for listener in self._listeners:
-      for (k,v) in listener.iteritems():
+      for (k,v) in listener.items():
         if v:
           del k
     return
@@ -626,7 +626,7 @@
   #             const cdrMemoryStream& cdrdata);
   def notify(self, info, cdrdata):
     for listener in self._listeners:
-      for (k,v) in listener.iteritems():
+      for (k,v) in listener.items():
         k(info, cdrdata)
     return
 
@@ -669,7 +669,7 @@
   #
   def __del__(self):
     for listener in self._listeners:
-      for (k,v) in listener.iteritems():
+      for (k,v) in listener.items():
         if v:
           del k
     return
@@ -753,7 +753,7 @@
   # void notify(const ConnectorInfo& info);
   def notify(self, info):
     for listener in self._listeners:
-      for (k,v) in listener.iteritems():
+      for (k,v) in listener.items():
         k(info)
     return
 

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaNaming.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaNaming.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaNaming.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -90,11 +90,11 @@
         obj = orb.string_to_object(self._nameServer)
         self._rootContext = obj._narrow(CosNaming.NamingContext)
         if CORBA.is_nil(self._rootContext):
-          print "CorbaNaming: Failed to narrow the root naming context."
+          print("CorbaNaming: Failed to narrow the root naming context.")
 
       except CORBA.ORB.InvalidName:
         self.__print_exception()
-        print "Service required is invalid [does not exist]."
+        print("Service required is invalid [does not exist].")
 
     return
   
@@ -221,7 +221,7 @@
         self.bindRecursive(self._rootContext, name_list, obj)
       else:
         raise
-    except CosNaming.NamingContext.CannotProceed, err:
+    except CosNaming.NamingContext.CannotProceed as err:
       if force:
         self.bindRecursive(err.cxt, err.rest_of_name, obj)
       else:
@@ -349,7 +349,7 @@
         self.__print_exception()
         raise
 
-    except CosNaming.NamingContext.CannotProceed, err:
+    except CosNaming.NamingContext.CannotProceed as err:
       if force:
         self.rebindRecursive(err.cxt, err.rest_of_name, obj)
       else:
@@ -454,7 +454,7 @@
   #
   # @endif
   def bindContext(self, name, name_cxt, force=True):
-    if isinstance(name, basestring):
+    if isinstance(name, str):
       self.bind(self.toName(name), name_cxt, force)
     else:
       self.bind(name, name_cxt, force)
@@ -508,7 +508,7 @@
   #
   # @endif
   def rebindContext(self, name, name_cxt, force=True):
-    if isinstance(name, basestring):
+    if isinstance(name, str):
       self.rebind(self.toName(name), name_cxt, force)
     else:
       self.rebind(name, name_cxt, force)
@@ -565,7 +565,7 @@
   #
   # @endif
   def resolve(self, name):
-    if isinstance(name, basestring):
+    if isinstance(name, str):
       name_ = self.toName(name)
     else:
       name_ = name
@@ -606,7 +606,7 @@
   # void unbind(const CosNaming::Name& name)
   #   throw(NotFound, CannotProceed, InvalidName);
   def unbind(self, name):
-    if isinstance(name, basestring):
+    if isinstance(name, str):
       name_ = self.toName(name)
     else:
       name_ = name
@@ -668,7 +668,7 @@
     #if force is None:
     #  force = True
       
-    if isinstance(name, basestring):
+    if isinstance(name, str):
       name_ = self.toName(name)
     else:
       name_ = name
@@ -681,7 +681,7 @@
       else:
         self.__print_exception()
         raise
-    except CosNaming.NamingContext.CannotProceed, err:
+    except CosNaming.NamingContext.CannotProceed as err:
       if force:
         self.bindRecursive(err.cxt, err.rest_of_name, self.newContext())
       else:
@@ -873,7 +873,7 @@
     name_list = [CosNaming.NameComponent("","") for i in range(nc_length)]
 
     for i in range(nc_length):
-      pos = string.rfind(name_comps[i][0:],".")
+      pos = str.rfind(name_comps[i][0:],".")
       if pos == -1:
         name_list[i].id   = name_comps[i]
         name_list[i].kind = ""
@@ -1205,7 +1205,7 @@
       pre_pos = delim_size
 
     while 1:
-      found_pos = string.find(input[begin_pos:],delimiter)
+      found_pos = str.find(input[begin_pos:],delimiter)
       if found_pos == -1:
         results.append(input[pre_pos:])
         break
@@ -1235,11 +1235,11 @@
   # @endif
   def __print_exception(self):
     if sys.version_info[0:3] >= (2, 4, 0):
-      print traceback.format_exc()
+      print(traceback.format_exc())
     else:
       _exc_list = traceback.format_exception(*sys.exc_info())
       _exc_str = "".join(_exc_list)
-      print _exc_str
+      print(_exc_str)
 
     return
 

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaPort.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaPort.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaPort.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -1430,7 +1430,7 @@
       try:
         OpenRTM_aist.Manager.instance().getPOA().activate_object_with_id(self._oid, self._servant)
       except:
-        print OpenRTM_aist.Logger.print_exception()
+        print(OpenRTM_aist.Logger.print_exception())
       return
 
     # void deactivate()
@@ -1439,7 +1439,7 @@
         OpenRTM_aist.Manager.instance().getPOA().deactivate_object(self._oid)
       except:
         pass
-        #print OpenRTM_aist.Logger.print_exception()
+        #print(OpenRTM_aist.Logger.print_exception())
       return
     
 
@@ -1529,7 +1529,7 @@
             obj = any.from_any(nv.value, keep_structs=True)
             self._cons[i].setObject(obj)
           except:
-            print OpenRTM_aist.Logger.print_exception()
+            print(OpenRTM_aist.Logger.print_exception())
 
 
 

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextProfile.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextProfile.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextProfile.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -282,7 +282,7 @@
     else:
       kind_ = kind
 
-    if kind_ < RTC.PERIODIC or kind_ > RTC.OTHER:
+    if kind_._v < RTC.PERIODIC._v or kind_._v > RTC.OTHER._v:
       return ""
 
     return kinds_[kind_._v]
@@ -307,7 +307,7 @@
   # @endif
   # RTC::ReturnCode_t setKind(RTC::ExecutionKind kind);
   def setKind(self, kind):
-    if kind < RTC.PERIODIC or kind > RTC.OTHER:
+    if kind._v < RTC.PERIODIC._v or kind._v > RTC.OTHER._v:
       self._rtcout.RTC_ERROR("Invalid kind is given. %d", kind._v)
       return RTC.BAD_PARAMETER
 

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextWorker.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextWorker.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextWorker.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -484,7 +484,7 @@
           "ACTIVE_STATE",
           "ERROR_STATE"]
 
-    f = lambda x: st[x._v] if x >= RTC.CREATED_STATE and x <= RTC.ERROR_STATE else ""
+    f = lambda x: st[x._v] if x._v >= RTC.CREATED_STATE._v and x._v <= RTC.ERROR_STATE._v else ""
     return f(state)
 
   ##

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/Factory.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/Factory.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/Factory.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -285,7 +285,7 @@
 
       return rtobj
     except:
-      print OpenRTM_aist.Logger.print_exception()
+      print(OpenRTM_aist.Logger.print_exception())
       return None
 
 

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/GlobalFactory.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/GlobalFactory.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/GlobalFactory.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -82,7 +82,7 @@
 
   ## bool hasFactory(const Identifier& id)
   def hasFactory(self, id):
-    if not self._creators.has_key(id):
+    if not id in self._creators:
       return False
     return True
 
@@ -104,7 +104,7 @@
     if not creator or not destructor:
       return self.INVALID_ARG
 
-    if self._creators.has_key(id):
+    if id in self._creators:
       return self.ALREADY_EXISTS
     
     self._creators[id] = Factory.FactoryEntry(id, creator, destructor)
@@ -113,7 +113,7 @@
 
   ## ReturnCode removeFactory(const Identifier& id)
   def removeFactory(self, id):
-    if not self._creators.has_key(id):
+    if not id in self._creators:
       return self.NOT_FOUND
 
     del self._creators[id]
@@ -122,11 +122,11 @@
 
   ## AbstractClass* createObject(const Identifier& id)
   def createObject(self, id):
-    if not self._creators.has_key(id):
-      print "Factory.createObject return None id: ", id
+    if not id in self._creators:
+      print("Factory.createObject return None id: ", id)
       return None
     obj_ = self._creators[id].creator_()
-    #assert(not self._objects.has_key(obj_))
+    #assert(not obj_ in self._objects)
     self._objects[obj_] = self._creators[id]
     return obj_
 
@@ -134,12 +134,12 @@
   ## ReturnCode deleteObject(const Identifier& id, AbstractClass*& obj)
   def deleteObject(self, obj, id=None):
     if id:
-      if self._creators.has_key(id):
+      if id in self._creators:
         self._creators[id].destructor_(obj)
         del self._objects[obj]
         return self.FACTORY_OK
 
-    if not self._objects.has_key(obj):
+    if not obj in self._objects:
       return self.NOT_FOUND
 
     tmp = obj
@@ -197,7 +197,7 @@
   # @endif
   # bool isProducerOf(AbstractClass* obj)
   def isProducerOf(self, obj):
-    return self._objects.has_key(obj)
+    return obj in self._objects
 
 
   ##
@@ -224,7 +224,7 @@
   # @endif
   # ReturnCode objectToIdentifier(AbstractClass* obj, Identifier& id)
   def objectToIdentifier(self, obj, id):
-    if not self._objects.has_key(obj):
+    if not obj in self._objects:
       return self.NOT_FOUND
 
     id[0] = self._objects[obj].id_

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ListenerHolder.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ListenerHolder.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ListenerHolder.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -158,7 +158,7 @@
     guard = OpenRTM_aist.ScopedLock(self.listener_mutex)
     
     for listener_ in self.listeners:
-      for (l,f) in listener_.iteritems():
+      for (l,f) in listener_.items():
         if f:
           del l
     #del guard
@@ -196,7 +196,7 @@
   def LISTENERHOLDER_CALLBACK(self, func, *args):
     guard = OpenRTM_aist.ScopedLock(self.listener_mutex)
     for listener in self.listeners:
-      for (l,f) in listener.iteritems():
+      for (l,f) in listener.items():
         func_ = getattr(l,func,None)
         func_(*args)
     return

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/LogstreamFile.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/LogstreamFile.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/LogstreamFile.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -17,6 +17,7 @@
 
 
 import OpenRTM_aist
+import OpenRTM_aist.StringUtil
 import logging
 import logging.handlers
 

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -21,10 +21,11 @@
 import sys
 import time
 from omniORB import CORBA, PortableServer
-from types import IntType, ListType
+#from types import IntType, ListType
 
 
 import OpenRTM_aist
+import OpenRTM_aist.CORBA_RTCUtil
 import RTC
 
 import CosNaming
@@ -166,7 +167,9 @@
     self._finalized = self.Finalized()
     self._listeners = OpenRTM_aist.ManagerActionListeners()
     signal.signal(signal.SIGINT, handler)
+    self._rtcout = None
     
+    
     return
 
 
@@ -215,13 +218,13 @@
     if len(arg) == 1:
       argv = arg[0]
     elif len(arg) == 2 and \
-             isinstance(arg[0], IntType) and \
-             isinstance(arg[1], ListType):
+             isinstance(arg[0], int) and \
+             isinstance(arg[1], list):
       # for 0.4.x
       argv = arg[1]
     else:
-      print "Invalid arguments for init()"
-      print "init(argc,argv) or init(argv)"
+      print("Invalid arguments for init()")
+      print("init(argc,argv) or init(argv)")
       return None
         
     if manager is None:
@@ -1018,6 +1021,7 @@
                            comp_id.getProperty("implementation_id"))
     self._listeners.rtclifecycle_.postInitialize()
     self.registerComponent(comp)
+    
     return comp
 
 
@@ -1548,6 +1552,7 @@
       return
     
     self._rtcout.addLogger(logstream)
+    
 
   ##
   # @if jp
@@ -1639,7 +1644,8 @@
   # @brief System logger initialization
   # @endif
   def initLogger(self):
-    self._rtcout = OpenRTM_aist.LogStream()
+    #self._rtcout = OpenRTM_aist.LogStream()
+    self._rtcout = self.getLogbuf()
     if not OpenRTM_aist.toBool(self._config.getProperty("logger.enable"), "YES", "NO", True):
       return True
     
@@ -1649,7 +1655,7 @@
     self.initLogstreamPlugins()
     self.initLogstreamOthers()
     
-
+    
     self._rtcout.setLogLevel(self._config.getProperty("logger.log_level"))
     self._rtcout.setLogLock(OpenRTM_aist.toBool(self._config.getProperty("logger.stream_lock"),
                                                 "enable", "disable", False))
@@ -2215,8 +2221,13 @@
     re_ipv6 = r"(([0-9a-f]{1,4})(:([0-9a-f]{1,4})){7}((\.|#|p| port )\d{1,4})?)|\[([0-9a-f]{1,4})(:([0-9a-f]{1,4})){7}\]"
 
     iorstr = self._orb.object_to_string(objref)
+
     ior = CORBA_IORUtil.toIOR(iorstr)
+
+      
+    
     endpoints = CORBA_IORUtil.getEndpoints(ior)
+    
 
     epstr = ""; epstr_ipv4 = ""; epstr_ipv6 = "";
     ipv4_count = 0; ipv6_count = 0
@@ -2272,12 +2283,12 @@
     otherref = None
 
     try:
-      otherref = file(self._config.getProperty("manager.refstring_path"),'r')
+      otherref = open(self._config.getProperty("manager.refstring_path"),'r')
       #refstring = otherref.readline()
       otherref.close()
     except:
       try:
-        reffile = file(self._config.getProperty("manager.refstring_path"),'w')
+        reffile = open(self._config.getProperty("manager.refstring_path"),'w')
       except:
         self._rtcout.RTC_WARN(OpenRTM_aist.Logger.print_exception())
         return False
@@ -2523,7 +2534,7 @@
         self._rtcout.RTC_DEBUG(name_prop)
         config_fname.append(self._config.getProperty(name_conf))
       except:
-        print "Not found. : %s" % self._config.getProperty(name_conf)
+        print("Not found. : %s" % self._config.getProperty(name_conf))
         self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
       else:
         name_prop.load(conff)
@@ -2547,7 +2558,7 @@
         self._rtcout.RTC_DEBUG(type_prop)
         config_fname.append(self._config.getProperty(type_conf))
       except:
-        print "Not found. : %s" % self._config.getProperty(type_conf)
+        print("Not found. : %s" % self._config.getProperty(type_conf))
         self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
       else:
         type_prop.load(conff)
@@ -2606,7 +2617,7 @@
       try:
         conff = open(file_name)
       except:
-        print "Not found. : %s" % file_name
+        print("Not found. : %s" % file_name)
         self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
       else:
         prop.load(conff)
@@ -2652,22 +2663,31 @@
 
     try:
       while 1:
-        n = it.next()
+        if sys.version_info[0] == 2:
+          n = it.next()
+        else:
+          n = it.__next__()
         if n == '%':
           count+=1
           if not (count % 2):
             str_ += n
         elif n == '$':
           count = 0
-          n = it.next()
+          if sys.version_info[0] == 2:
+            n = it.next()
+          else:
+            n = it.__next__()
           if n == '{' or n == '(':
             n = it.next()
             env = ""
-            for i in xrange(len_):
+            for i in range(len_):
               if n == '}' or n == ')':
                 break
               env += n
-              n = it.next()
+              if sys.version_info[0] == 2:
+                n = it.next()
+              else:
+                n = it.__next__()
             envval = os.getenv(env)
             if envval:
               str_ += envval
@@ -2713,9 +2733,12 @@
     if not OpenRTM_aist.toBool(self._config.getProperty("logger.enable"), "YES", "NO", True):
       return OpenRTM_aist.LogStream()
 
-    logbuf = OpenRTM_aist.LogStream(name)
-    logbuf.setLogLevel(self._config.getProperty("logger.log_level"))
-    return logbuf
+    if self._rtcout is None:
+        self._rtcout = OpenRTM_aist.LogStream(name)
+        self._rtcout.setLogLevel(self._config.getProperty("logger.log_level"))
+        return self._rtcout
+    else:
+        return self._rtcout
 
 
   ##
@@ -3025,7 +3048,7 @@
       comp_ports = conn_prop[0].split("^")
       if len(comp_ports) != 2:
         self._rtcout.RTC_ERROR("Invalid format for pre-connection.")
-        self._rtcout.RTC_ERROR("Format must be Comp0.port0:Comp1.port1")
+        self._rtcout.RTC_ERROR("Format must be Comp0.port0^Comp1.port1()")
         continue
       
       comp0_name = comp_ports[0].split(".")[0]
@@ -3438,7 +3461,7 @@
         self._orb.run()
         #Manager.instance().shutdown()
       except:
-        print OpenRTM_aist.Logger.print_exception()
+        print(OpenRTM_aist.Logger.print_exception())
       return
 
 

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerConfig.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerConfig.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerConfig.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -188,11 +188,11 @@
     prop.setDefaults(OpenRTM_aist.default_config)
     if self.findConfigFile():
       #try:
-      with file(self._configFile,"r") as fd:
+      with open(self._configFile,"r") as fd:
         prop.load(fd)
         fd.close()
       #except:
-      #  print OpenRTM_aist.Logger.print_exception()
+      #  print(OpenRTM_aist.Logger.print_exception())
 
 
     self.setSystemInformation(prop)
@@ -256,7 +256,7 @@
     try:
       opts, args = getopt.getopt(argv[1:], "adlf:o:p:")
     except getopt.GetoptError:
-      print OpenRTM_aist.Logger.print_exception()
+      print(OpenRTM_aist.Logger.print_exception())
       return
 
     for opt, arg in opts:
@@ -327,7 +327,7 @@
   def findConfigFile(self):
     if self._configFile != "":
       if not self.fileExist(self._configFile):
-        print OpenRTM_aist.Logger.print_exception()
+        print(OpenRTM_aist.Logger.print_exception())
         return False
       return True
 

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ModuleManager.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ModuleManager.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ModuleManager.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -247,13 +247,13 @@
 
     self._rtcout.RTC_TRACE("load(fname = %s)", file_name)
     if file_name == "":
-      raise ModuleManager.InvalidArguments, "Invalid file name."
+      raise ModuleManager.InvalidArguments("Invalid file name.")
 
     if OpenRTM_aist.isURL(file_name):
       if not self._downloadAllowed:
-        raise ModuleManager.NotAllowedOperation, "Downloading module is not allowed."
+        raise ModuleManager.NotAllowedOperation("Downloading module is not allowed.")
       else:
-        raise ModuleManager.NotFound, "Not implemented."
+        raise ModuleManager.NotFound("Not implemented.")
     
     import_name = os.path.split(file_name)[-1]
     pathChanged=False
@@ -261,7 +261,7 @@
     
     if OpenRTM_aist.isAbsolutePath(file_name):
       if not self._absoluteAllowed:
-        raise ModuleManager.NotAllowedOperation, "Absolute path is not allowed"
+        raise ModuleManager.NotAllowedOperation("Absolute path is not allowed")
       else:
         splitted_name = os.path.split(file_name)
         save_path = sys.path[:]
@@ -274,10 +274,10 @@
     else:
       file_path = self.findFile(file_name, self._loadPath)
       if not file_path:
-        raise ModuleManager.FileNotFound, file_name
+        raise ModuleManager.FileNotFound(file_name)
   
     if not self.fileExist(file_path):
-      raise ModuleManager.FileNotFound, file_name
+      raise ModuleManager.FileNotFound(file_name)
 
     if not pathChanged:
       splitted_name = os.path.split(file_path)
@@ -324,7 +324,7 @@
   def unload(self, file_name):
     dll = self._modules.find(file_name)
     if not dll:
-      raise ModuleManager.NotFound, file_name
+      raise ModuleManager.NotFound(file_name)
     dll_name = dll.dll.__name__
     if dll_name in sys.modules.keys():
       sys.modules.pop(dll_name)
@@ -368,12 +368,12 @@
   def symbol(self, file_name, func_name):
     dll = self._modules.find(file_name)
     if not dll:
-      raise ModuleManager.ModuleNotFound, file_name
+      raise ModuleManager.ModuleNotFound(file_name)
 
     func = getattr(dll.dll,func_name,None)
 
     if not func:
-      raise ModuleManager.SymbolNotFound, func_name
+      raise ModuleManager.SymbolNotFound(func_name)
     
     return func
 

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/NVUtil.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/NVUtil.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/NVUtil.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -50,7 +50,7 @@
   try:
     any_val = any.to_any(value)
   except:
-    print "ERROR  NVUtil.newNV : Can't convert to any. ", type(value)
+    print("ERROR  NVUtil.newNV : Can't convert to any. ", type(value))
     raise
 
     
@@ -120,7 +120,7 @@
       val = str(any.from_any(nv.value, keep_structs=True))
       prop.setProperty(str(nv.name),val)
     except:
-      print OpenRTM_aist.Logger.print_exception()
+      print(OpenRTM_aist.Logger.print_exception())
       pass
 
 
@@ -319,7 +319,7 @@
     if type(val) == str:
       str_value = val
   except:
-    print OpenRTM_aist.Logger.print_exception()
+    print(OpenRTM_aist.Logger.print_exception())
     pass
   
   return str_value
@@ -421,4 +421,4 @@
 # @endif
 def dump(nv):
   out = [""]
-  print dump_to_stream(out, nv)
+  print(dump_to_stream(out, nv))

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingManager.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingManager.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingManager.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -407,7 +407,7 @@
   # @endif
   def bindObject(self, name, rtobj):
     self._rtcout.RTC_TRACE("bindObject(name = %s, rtobj or mgr)", name)
-    """print isinstance(rtobj, OpenRTM.ManagerServant)
+    """print(isinstance(rtobj, OpenRTM.ManagerServant))
     if isinstance(rtobj, OpenRTM.ManagerServant):
       
       self.manager = rtobj"""

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/NumberingPolicy.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/NumberingPolicy.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/NumberingPolicy.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -49,7 +49,7 @@
   # @else
   #
   # @endif
-  class ObjectNotFound:
+  class ObjectNotFound(Exception):
     pass
 
 

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -17,6 +17,7 @@
 import copy
 import threading
 import OpenRTM_aist
+import OpenRTM_aist.StringUtil
 import RTC
 
 ##

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicECSharedComposite.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicECSharedComposite.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicECSharedComposite.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -715,7 +715,7 @@
       rtc = mgr.getComponent(member)
 
       if rtc is None:
-        print "no RTC found: ", member
+        print("no RTC found: ", member)
         continue
 
       sdo = rtc.getObjRef()

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -82,7 +82,7 @@
   def __del__(self, Task=OpenRTM_aist.Task):
     import OpenRTM_aist.Guard
     self._rtcout.RTC_TRACE("PeriodicExecutionContext.__del__()")
-    guard = OpenRTM_aist.ScopedLock(self._svcmutex)
+    guard = OpenRTM_aist.Guard.ScopedLock(self._svcmutex)
     self._svc = False
     del guard
 

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/Process.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/Process.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/Process.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -51,10 +51,10 @@
   except OSError:
     # fork failed
     if sys.version_info[0:3] >= (2, 4, 0):
-      print traceback.format_exc()
+      print(traceback.format_exc())
     else:
       _exc_list = traceback.format_exception(*sys.exc_info())
-      print "".join(_exc_list)
+      print("".join(_exc_list))
 
     return -1
   return 0

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/Properties.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/Properties.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/Properties.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -18,6 +18,10 @@
 
 import sys
 
+if sys.version_info[0] == 2:
+    maxint = sys.maxint
+else:
+    maxint = sys.maxsize
 
 import OpenRTM_aist
 
@@ -204,7 +208,7 @@
 
     if defaults_str:
       if num is None:
-        _num = sys.maxint
+        _num = maxint
       else:
         _num = num
       self.setDefaults(defaults_str, _num)
@@ -384,7 +388,7 @@
   def getProperty(self, key, default=None):
     if default is None:
       keys = []
-      #keys = string.split(key, ".")
+      #keys = str.split(key, ".")
       self.split(key, ".", keys)
 
       node = None
@@ -421,7 +425,7 @@
   # @endif
   def getDefault(self, key):
     keys = []
-    #keys = string.split(key, ".")
+    #keys = str.split(key, ".")
     self.split(key, ".", keys)
     node = None
     node = self._getNode(keys, 0, self)
@@ -462,7 +466,7 @@
   def setProperty(self, key, value=None):
     if value is not None:
       keys = []
-      #keys = string.split(key, ".")
+      #keys = str.split(key, ".")
       self.split(key, ".", keys)
       curr = self
       for _key in keys:
@@ -500,7 +504,7 @@
   def setDefault(self, key, value):
     keys = []
     self.split(key, ".", keys)
-    #keys = string.split(key, ".")
+    #keys = str.split(key, ".")
 
     curr = self
     for _key in keys:
@@ -534,7 +538,7 @@
   # @endif
   def setDefaults(self, defaults, num = None):
     if num is None:
-      num = sys.maxint
+      num = maxint
 
     i = 0
     len_ = len(defaults)

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -865,13 +865,13 @@
 
     num = OpenRTM_aist.CORBA_SeqUtil.find(self._ecMine, self.ec_find(cxt))
     if num != -1:
-      return long(num)
+      return int(num)
 
     num = OpenRTM_aist.CORBA_SeqUtil.find(self._ecOther, self.ec_find(cxt))
     if num != -1:
-      return long(num) + 1000
+      return int(num) + 1000
 
-    return long(-1)
+    return int(-1)
 
 
   #============================================================
@@ -1013,7 +1013,7 @@
 
     # no space in the list, push back ec to the last.
     OpenRTM_aist.CORBA_SeqUtil.push_back(self._ecOther,ecs)
-    ec_id = long(len(self._ecOther) - 1 + ECOTHER_OFFSET)
+    ec_id = int(len(self._ecOther) - 1 + ECOTHER_OFFSET)
     self.onAttachExecutionContext(ec_id)
     return ec_id
 
@@ -1042,8 +1042,8 @@
     # no space in the list, push back ec to the last.
     OpenRTM_aist.CORBA_SeqUtil.push_back(self._ecMine,ecs)
     
-    return long(len(self._ecMine) - 1)
-    #return long(len(self._ecMine) - 1 + ECOTHER_OFFSET)
+    return int(len(self._ecMine) - 1)
+    #return int(len(self._ecMine) - 1 + ECOTHER_OFFSET)
 
 
   ##
@@ -1097,11 +1097,11 @@
     # ID: offset -       : participating ec
     # owned       ec index = ID
     # participate ec index = ID - offset
-    if (long(ec_id) < long(ECOTHER_OFFSET)) or \
-          (long(ec_id - ECOTHER_OFFSET) > len_):
+    if (int(ec_id) < int(ECOTHER_OFFSET)) or \
+          (int(ec_id - ECOTHER_OFFSET) > len_):
       return RTC.BAD_PARAMETER
     
-    index = long(ec_id - ECOTHER_OFFSET)
+    index = int(ec_id - ECOTHER_OFFSET)
 
     if index < 0 or CORBA.is_nil(self._ecOther[index]):
       return RTC.BAD_PARAMETER
@@ -4978,7 +4978,7 @@
           ec = ecs._narrow(RTC.ExecutionContext)
           return self._ec._is_equivalent(ec)
       except:
-        print OpenRTM_aist.Logger.print_exception()
+        print(OpenRTM_aist.Logger.print_exception())
         return False
 
       return False
@@ -5017,7 +5017,7 @@
           ec.deactivate_component(self._comp)
           ec.stop()
       except:
-        print OpenRTM_aist.Logger.print_exception()
+        print(OpenRTM_aist.Logger.print_exception())
 
 
 # RtcBase = RTObject_impl

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/SdoServiceAdmin.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/SdoServiceAdmin.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/SdoServiceAdmin.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -109,7 +109,7 @@
     self._rtobj = rtobj
     self._consumerTypes = []
     self._providers = []
-    self._allConsumerEnabled = True
+    self._allConsumerEnabled = False
 
 
     ##

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/SharedMemory.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/SharedMemory.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/SharedMemory.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -273,9 +273,11 @@
            self.rt.shm_unlink(self._shm_address)
       self._shmem = None
 
-      if not CORBA.is_nil(self._smInterface):
-        self._smInterface.close_memory(False)
-
+      try:
+        if not CORBA.is_nil(self._smInterface) and self._smInterface._non_existent():
+          self._smInterface.close_memory(False)
+      except:
+        pass
   
     
 

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/Singleton.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/Singleton.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/Singleton.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -16,8 +16,15 @@
 #     All rights reserved.
 #
 
-import thread
 
+import sys
+if sys.version_info[0] == 2:
+    import thread
+    allocate_lock = thread.allocate_lock
+else:
+    import threading
+    allocate_lock = threading.Lock
+
 ##
 # @if jp
 # @class Singleton クラステンプレート
@@ -29,7 +36,7 @@
 #   def __init__(self):
 #     pass
 class Singleton(object):
-  __lockObj = thread.allocate_lock()
+  __lockObj = allocate_lock()
   __instance = None
 
   def __new__(self, *args, **kargs):

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/StateMachine.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/StateMachine.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/StateMachine.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -226,7 +226,7 @@
   # @brief Set Entry action function
   # @endif
   def setEntryAction(self, state, call_back):
-    if self._entry.has_key(state):
+    if state in self._entry:
       self._entry[state] = call_back
     else:
       return False
@@ -249,7 +249,7 @@
   # @brief Set PreDo action function
   # @endif
   def setPreDoAction(self, state, call_back):
-    if self._predo.has_key(state):
+    if state in self._predo:
       self._predo[state] = call_back
     else:
       return False
@@ -272,7 +272,7 @@
   # @brief Set Do action function
   # @endif
   def setDoAction(self, state, call_back):
-    if self._do.has_key(state):
+    if state in self._do:
       self._do[state] = call_back
     else:
       return False
@@ -295,7 +295,7 @@
   # @brief Set PostDo action function
   # @endif
   def setPostDoAction(self, state, call_back):
-    if self._postdo.has_key(state):
+    if state in self._postdo:
       self._postdo[state] = call_back
     else:
       return False
@@ -318,7 +318,7 @@
   # @brief Set Exit action function
   # @endif
   def setExitAction(self, state, call_back):
-    if self._exit.has_key(state):
+    if state in self._exit:
       self._exit[state] = call_back
     else:
       return False
@@ -558,7 +558,7 @@
   # @endif
   def setNullFunc(self, s, nullfunc):
     for i in range(self._num):
-      if s.has_key(StateMachine.state_array[i]):
+      if StateMachine.state_array[i] in s:
         s[StateMachine.state_array[i]] = nullfunc
       else:
         s.setdefault(StateMachine.state_array[i], nullfunc)

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/StringUtil.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/StringUtil.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/StringUtil.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -14,10 +14,11 @@
 #         Advanced Industrial Science and Technology (AIST), Japan
 #     All rights reserved.
 
+import sys
+if sys.version_info[0] == 3:
+    long = int
 
 
-
-
 ##
 # @if jp
 # @brief 文字列がエスケープされているか判断する
@@ -407,7 +408,7 @@
   tmp_list = _list
   if ignore_case:
     value = value.lower()
-    tmp_list = map((lambda x: x.lower()),_list)
+    tmp_list = list(map((lambda x: x.lower()),_list))
     
   if tmp_list.count(value) > 0:
     return True
@@ -532,6 +533,8 @@
       _type[0][i] = float(list_[i])
     elif type(_type[0][i]) == str:
       _type[0][i] = str(list_[i])
+    
+      
     else:
       return False
 
@@ -571,6 +574,7 @@
     elif type(_type[0]) == str:
       _type[0] = str(_str)
       return True
+
   #except ValueError:
   #  return False
   except:

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/SystemLogger.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/SystemLogger.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/SystemLogger.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -178,7 +178,7 @@
   def __init__(self, *args):
     self._LogLock = False
     self._log_enable = False
-    self._loggerObj = None
+    
 
 
 
@@ -335,7 +335,7 @@
         try:
           messages = msg%(opt)
         except:
-          print "RTC_LOG : argument error"
+          print("RTC_LOG : argument error")
           return
       for log in self._loggerObj:
         log.log(messages, LV)
@@ -372,7 +372,7 @@
         try:
           messages = msg%(opt)
         except:
-          print "RTC_FATAL : argument error"
+          print("RTC_FATAL : argument error")
           return
 
       for log in self._loggerObj:
@@ -409,7 +409,7 @@
         try:
           messages = msg%(opt)
         except:
-          print "RTC_ERROR : argument error"
+          print("RTC_ERROR : argument error")
           return
 
       
@@ -451,7 +451,7 @@
         try:
           messages = msg%(opt)
         except:
-          print "RTC_WARN : argument error"
+          print("RTC_WARN : argument error")
           return
 
       
@@ -493,7 +493,7 @@
         try:
           messages = msg%(opt)
         except:
-          print "RTC_INFO : argument error"
+          print("RTC_INFO : argument error")
           return
 
       
@@ -535,7 +535,7 @@
         try:
           messages = msg%(opt)
         except:
-          print "RTC_DEBUG : argument error"
+          print("RTC_DEBUG : argument error")
           return
         
       
@@ -578,7 +578,7 @@
         try:
           messages = msg%(opt)
         except:
-          print "RTC_TRACE : argument error"
+          print("RTC_TRACE : argument error")
           return
 
       
@@ -621,7 +621,7 @@
         try:
           messages = msg%(opt)
         except:
-          print "RTC_VERBOSE : argument error"
+          print("RTC_VERBOSE : argument error")
           return
 
       
@@ -665,7 +665,7 @@
         try:
           messages = msg%(opt)
         except:
-          print "RTC_PARANOID : argument error"
+          print("RTC_PARANOID : argument error")
           return
 
       

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeMeasure.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeMeasure.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeMeasure.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -27,6 +27,9 @@
 
 ULLONG_MAX = 0xffffffffffffffff
 
+if sys.version_info[0] == 3:
+  long = int
+
 ##
 # @if jp
 # @brief 時間単位変換用定数
@@ -114,6 +117,8 @@
     
   def gettimeofday(self):
     global usec_per_sec
+
+      
     tm = time.time()
     tm_f       = float(tm - long(tm))     # 小数部の取り出し
     self.sec   = long(float(tm) - float(tm_f))   # 整数部の取り出し
@@ -144,10 +149,11 @@
         _fields_ = [('low', c_ulong), 
                     ('high', c_long)]
 
+      global usec_per_sec
 
       tm = long(tv.tv_sec*1e6) + long(tv.tv_usec)
       st = SYSTEMTIME(0,0,0,0,0,0,0,0)
-      ft = LARGE_INTEGER(tm&0xFFFFFFFFL,tm>>32)
+      ft = LARGE_INTEGER(tm&0xFFFFFFFF,tm>>32)
       # 100 nanosecond units (since 16010101)
       ret = windll.kernel32.FileTimeToSystemTime(byref(ft),
                                                  byref(st))
@@ -155,10 +161,10 @@
         return -1
 
       #windll.kernel32.SetSystemTime(byref(st))
-      print "settime Yer:", st.wYear, " Month:", st.wMonth, \
+      print("settime Yer:", st.wYear, " Month:", st.wMonth, \
           " DayOfWeek:", st.wDayOfWeek, " wDay:", st.wDay,  \
           " Hour:", st.wHour, "Minute:", st.wMinute, \
-          " Second:", st.wSecond, "Milliseconds:", st.wMilliseconds
+          " Second:", st.wSecond, "Milliseconds:", st.wMilliseconds)
       
 
     else:

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeValue.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeValue.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeValue.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -16,10 +16,13 @@
 #     All rights reserved.
 
 
+import sys
 
-
 TIMEVALUE_ONE_SECOND_IN_USECS = 1000000 # 1 [sec] = 1000000 [usec]
 
+if sys.version_info[0] == 3:
+  long = int
+
 ##
 # @if jp
 # @class TimeValue
@@ -57,6 +60,7 @@
   def __init__(self, sec=None, usec=None):
     global TIMEVALUE_ONE_SECOND_IN_USECS
 
+
     if type(sec) == str:
       sec = float(sec)
     if type(usec) == str:

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ext/sdo/observer/COCTestRTC.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ext/sdo/observer/COCTestRTC.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ext/sdo/observer/COCTestRTC.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -25,30 +25,30 @@
     self._name = name
     
   def __del__(self):
-    print "dtor of ", self._name
+    print("dtor of ", self._name)
 
   def __call__(self, info, cdrdata):
     data = OpenRTM_aist.ConnectorDataListenerT.__call__(self, info, cdrdata, RTC.TimedLong(RTC.Time(0,0),0))
-    print "------------------------------"
-    print "Listener:       ", self._name
-    print "Profile::name:  ", info.name
-    print "Profile::id:    ", info.id
-    print "Data:           ", data.data
-    print "------------------------------"
+    print("------------------------------")
+    print("Listener:       ", self._name)
+    print("Profile::name:  ", info.name)
+    print("Profile::id:    ", info.id)
+    print("Data:           ", data.data)
+    print("------------------------------")
     
 class ConnListener(OpenRTM_aist.ConnectorListener):
   def __init__(self, name):
     self._name = name
 
   def __del__(self):
-    print "dtor of ", self._name
+    print("dtor of ", self._name)
 
   def __call__(self, info):
-    print "------------------------------"
-    print "Listener:       ", self._name
-    print "Profile::name:  ", info.name
-    print "Profile::id:    ", info.id
-    print "------------------------------"
+    print("------------------------------")
+    print("Listener:       ", self._name)
+    print("Profile::name:  ", info.name)
+    print("Profile::id:    ", info.id)
+    print("------------------------------")
 
 
 class COCTestRTC(OpenRTM_aist.DataFlowComponentBase):
@@ -91,10 +91,10 @@
 
         
   def onExecute(self, ec_id):
-    print "Please input number: ",
+    print("Please input number: ")
     self._data.data = long(sys.stdin.readline())
     OpenRTM_aist.setTimestamp(self._data)
-    print "Sending to subscriber: ", self._data.data
+    print("Sending to subscriber: ", self._data.data)
     self._outport.write()
     return RTC.RTC_OK
 

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ext/sdo/observer/test/ComponentObserverProvider.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ext/sdo/observer/test/ComponentObserverProvider.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ext/sdo/observer/test/ComponentObserverProvider.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -28,7 +28,7 @@
     pass
 
   def update_status(self, status_kind, hint):
-    print "update_status: ", status_kind, ", ", hint
+    print("update_status: ", status_kind, ", ", hint)
     return
 
 def main():
@@ -52,10 +52,10 @@
 
   ret = config.add_service_profile(sprof)
   flag = True
-  print "If you exit program, please input 'q'."
+  print("If you exit program, please input 'q'.")
   sys.stdin.readline()
   ret = config.remove_service_profile("test_id")
-  print "test program end. ret : ", ret
+  print("test program end. ret : ", ret)
   return
     
 ############### test #################

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ext/sdo/observer/test/test_ComponentObserverConsumer.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ext/sdo/observer/test/test_ComponentObserverConsumer.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ext/sdo/observer/test/test_ComponentObserverConsumer.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -34,7 +34,7 @@
     pass
 
   def update_status(self, status_kind, hint):
-    print "update_status: ", status_kind, ", ", hint
+    print("update_status: ", status_kind, ", ", hint)
     return
 
 
@@ -121,11 +121,11 @@
 
 
   def setfunc(self):
-    print "setfunc"
+    print("setfunc")
     return
 
   def unsetfunc(self):
-    print "unsetfunc"
+    print("unsetfunc")
     return
 
   def test_switchListeners(self):

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoControl/AutoControl.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoControl/AutoControl.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoControl/AutoControl.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,130 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+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">
+AutoControl_spec = ["implementation_id", "AutoControl", 
+                    "type_name",         "AutoControl", 
+                    "description",       "Auto controller component for MobileRobot", 
+                    "version",           "1.0.0", 
+                    "vendor",            "AIST", 
+                    "category",          "example", 
+                    "activity_type",     "DataFlowComponent", 
+                    "max_instance",      "1", 
+                    "language",          "Python", 
+                    "lang_type",         "SCRIPT",
+                    "conf.default.velocity", "80.0",
+                    "conf.default.turn_velocity", "80.0",
+                    "conf.default.distance_to_env", "40.0",
+                    ""]
+# </rtc-template>
+
+class AutoControl(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+    # initialize of configuration-data.
+    # <rtc-template block="init_conf_param">
+    self._velocity = [80.0]
+    self._turn_velocity = [80.0]
+    self._distance_to_env = [40.0]
+
+    return
+
+     
+  def onInitialize(self):
+    # Bind variables and configuration variable
+    self.bindParameter("velocity", self._velocity, "80.0")
+    self.bindParameter("turn_velocity", self._turn_velocity, "80.0")
+    self.bindParameter("distance_to_env", self._distance_to_env, "40.0")
+    
+    self._d_sens = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._sensIn = OpenRTM_aist.InPort("sens", self._d_sens)
+    self._d_vel = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._velOut = OpenRTM_aist.OutPort("vel", self._d_vel)
+    
+    # Set InPort buffers
+    self.addInPort("sens",self._sensIn)
+    
+    # Set OutPort buffers
+    self.addOutPort("vel",self._velOut)
+
+    return RTC.RTC_OK
+
+
+  
+  def onActivated(self, ec_id):
+    self._d_vel.data  = [0.0, 0.0]
+    self._velOut.write()
+    return RTC.RTC_OK
+  
+  def onDeactivated(self, ec_id):
+    self._d_vel.data  = [0.0, 0.0]
+    self._velOut.write()
+    return RTC.RTC_OK
+  
+  def onExecute(self, ec_id):
+    if self._sensIn.isNew():
+      self._d_sens = self._sensIn.read()
+      self._d_vel.data  = self.calcVel()
+      self._velOut.write()
+      time.sleep(0.1)
+      return RTC.RTC_OK
+
+    time.sleep(0.1)
+    return RTC.RTC_OK
+    
+  
+
+  def calcVel(self):
+    if self._d_sens.data[3] <= self._distance_to_env[0]:
+      return [self._turn_velocity[0], -(self._turn_velocity[0])]
+
+    elif self._d_sens.data[3] > self._distance_to_env[0]:
+      return [self._velocity[0] for i in range(2)]
+    else:
+      return [0.0 for i in range(2)]
+    
+    
+
+def AutoControlInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=AutoControl_spec)
+  manager.registerFactory(profile,
+                          AutoControl,
+                          OpenRTM_aist.Delete)
+
+def MyModuleInit(manager):
+  AutoControlInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("AutoControl")
+
+
+
+def main():
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+  mgr.setModuleInitProc(MyModuleInit)
+  mgr.activateManager()
+  mgr.runManager()
+
+if __name__ == "__main__":
+  main()
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoControl/__init__.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoControl/__init__.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoControl/__init__.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1 @@
+# Empty file

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoControl/gen.bat
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoControl/gen.bat	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoControl/gen.bat	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,7 @@
+python %PYTHONPATH%\OpenRTM_aist\utils\rtc-template\rtc-template.py -bpython^
+ --module-name=AutoControl --module-desc="Auto controller component for MobileRobot"^
+ --module-version=1.0.0 --module-vendor=AIST --module-category=example^
+ --module-comp-type=DataFlowComponent --module-act-type=PERIODIC^
+ --module-max-inst=1^
+ --inport=sens:TimedFloatSeq^
+ --outport=vel:TimedFloatSeq

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoControl/rtc.conf
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoControl/rtc.conf	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoControl/rtc.conf	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,3 @@
+corba.nameservers: localhost
+naming.formats: %n.rtc
+logger.enable: NO

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/AutoTestComposite.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/AutoTestComposite.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/AutoTestComposite.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+import time
+import socket
+
+from rtc_handle10_11 import *
+from CorbaNaming import *
+import RTM
+
+
+
+env = RtmEnv(sys.argv, ["localhost:2809"])
+
+## Get Manager object reference
+mgr_name = socket.gethostname()+".host_cxt/manager.mgr"
+naming = CorbaNaming(env.orb, "localhost:2809")
+manager = naming.resolve(mgr_name)._narrow(RTM.Manager)
+
+listo = env.name_space["localhost:2809"].list_obj()
+env.name_space['localhost:2809'].rtc_handles.keys()
+
+ns = env.name_space['localhost:2809']
+
+comp = ns.rtc_handles["PeriodicECSharedComposite0.rtc"]
+config = comp.rtc_ref.get_configuration()
+configset = config.get_configuration_sets()
+config_data = configset[0].configuration_data
+
+
+time.sleep(1)
+
+
+motor = ns.rtc_handles["Motor0.rtc"]
+sensor = ns.rtc_handles["Sensor0.rtc"]
+controller = ns.rtc_handles["Controller0.rtc"]
+loop_count = 1000
+for i in range(loop_count):
+  manager.create_component("PeriodicECSharedComposite?instance_name=aaa")
+  env.name_space["localhost:2809"].list_obj()
+  aaa=ns.rtc_handles[socket.gethostname()+".host_cxt/aaa.rtc"]
+  org=aaa.rtc_ref.get_owned_organizations()[0]
+  org.set_members ([motor.rtc_ref,sensor.rtc_ref,controller.rtc_ref])
+  time.sleep(1)
+  ret = org.remove_member("Motor0")
+  ret = org.remove_member("Sensor0")
+  ret = org.remove_member("Controller0")
+  aaa.rtc_ref.exit()
+  time.sleep(1)

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/AutoTestIn.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/AutoTestIn.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/AutoTestIn.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,185 @@
+#!/usr/bin/env python
+# -*- coding:utf-8 -*-
+
+##
+# @file AutoTestIn.py
+# @brief ModuleDescription
+# @date $Date$
+#
+
+import sys
+import string
+import time
+sys.path.append(".")
+
+# Import RTM module
+import RTC
+import OpenRTM_aist
+import math
+import AutoTest, AutoTest__POA
+import os.path
+
+# </rtc-template>
+
+# Import Service stub modules
+# <rtc-template block="consumer_import">
+# </rtc-template>
+
+
+# This module's spesification
+# <rtc-template block="module_spec">
+AutoTestIn_spec = ["implementation_id", "AutoTestIn", 
+                   "type_name",         "AutoTestIn", 
+                   "description",       "ModuleDescription", 
+                   "version",           "1.0.0", 
+                   "vendor",            "HarumiMiyamoto", 
+                   "category",          "example", 
+                   "activity_type",     "STATIC", 
+                   "max_instance",      "1", 
+                   "language",          "Python", 
+                   "lang_type",         "SCRIPT",
+                   "exec_cxt.periodic.rate", "1.0",
+                   ""]
+# </rtc-template>
+
+
+# Class implementing IDL interface MyService(MyService.idl)
+class MyServiceSVC_impl(AutoTest__POA.MyService):
+  def __init__(self):
+    self._echoList = []
+    self._valueList = []
+    self._value = 0
+    self.__echo_msg= ""
+    self._isNew = False
+
+  def __del__(self):
+    pass
+
+  def echo(self, msg):
+    OpenRTM_aist.CORBA_SeqUtil.push_back(self._echoList, msg)
+    self.__echo_msg = msg
+    if self._isNew:
+      #print("echo's message was overwritten !!!")
+      pass
+    self._isNew = True
+    return msg
+
+  def get_echo(self):
+    if self._isNew:
+      self._isNew = False
+      echomsg = self.__echo_msg
+      return echomsg
+
+    return ""
+
+  def reset_message(self):
+    self._isNew = False
+    self.__echo_msg = ""
+
+class AutoTestIn(OpenRTM_aist.DataFlowComponentBase):
+  
+  """
+  \class AutoTestIn
+  \brief ModuleDescription
+  
+  """
+  def __init__(self, manager):
+    """
+    \brief constructor
+    \param manager Maneger Object
+    """
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+    self._cnt=0
+    self._flag=0
+
+  def onInitialize(self):
+    self._d_dp_vIn = RTC.TimedFloat(RTC.Time(0,0),0)
+    self._d_dp_vSeqIn = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+
+    self._InIn = OpenRTM_aist.InPort("in", self._d_dp_vIn, OpenRTM_aist.RingBuffer(8))
+    self._SeqInIn = OpenRTM_aist.InPort("seqin", self._d_dp_vSeqIn, OpenRTM_aist.RingBuffer(8))
+    
+
+    # Set InPort buffers
+    self.addInPort("in",self._InIn)
+    self.addInPort("seqin",self._SeqInIn)
+    
+    # Set OutPort buffers
+    self._MyServicePort = OpenRTM_aist.CorbaPort("MyService")
+    #self._myservice0_var = MyService_i()
+    
+    # initialization of Provider
+    self._myservice0_var = MyServiceSVC_impl()
+
+    # Set service provider to Ports
+    self._MyServicePort.registerProvider("myservice0", "MyService", self._myservice0_var)
+    
+    # Set CORBA Service Ports
+    self.addPort(self._MyServicePort)
+
+    return RTC.RTC_OK
+
+  
+  def onActivated(self, ec_id):
+    self._file=open('received-data','w')
+    self._msg = ""
+    return RTC.RTC_OK
+  
+  def onDeactivated(self, ec_id): 
+    self._file.close()
+    self._myservice0_var.reset_message()
+    return RTC.RTC_OK
+  
+  def onExecute(self, ec_id):
+    if not self._msg:
+      self._msg = self._myservice0_var.get_echo()
+      if self._msg:
+        self._msg += "\n"
+
+    if self._InIn.isNew() and self._SeqInIn.isNew() and self._msg:
+      floatdata = self._InIn.read()
+      fdata = "%.6f\n" % floatdata.data
+      print("fdata:", fdata)
+      self._file.write(fdata)
+      
+      seqfloatdata = self._SeqInIn.read()
+      
+      t_sdata = tuple(d for d in seqfloatdata.data)
+      sdata = "%.6f %.6f %.6f %.6f %.6f\n" % t_sdata
+
+      print("sdata: ", sdata)
+      self._file.write(sdata)
+      
+      self._file.write(self._msg)
+      self._msg = ""
+
+      return RTC.RTC_OK
+    else:
+      return RTC.RTC_OK
+  
+
+
+
+def AutoTestInInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=AutoTestIn_spec)
+  manager.registerFactory(profile,
+                          AutoTestIn,
+                          OpenRTM_aist.Delete)
+
+def MyModuleInit(manager):
+  AutoTestInInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("AutoTestIn")
+
+
+
+def main():
+  mgr = OpenRTM_aist.Manager.init(len(sys.argv), sys.argv)
+  mgr.setModuleInitProc(MyModuleInit)
+  mgr.activateManager()
+  mgr.runManager()
+
+if __name__ == "__main__":
+  main()
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/AutoTestOut.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/AutoTestOut.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/AutoTestOut.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,151 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+"""
+ \file AutoTestOut.py
+ \brief ModuleDescription
+ \date $Date$
+
+
+"""
+import sys
+import string
+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">
+import AutoTest, AutoTest__POA
+from omniORB import CORBA
+
+#import csv
+
+# </rtc-template>
+
+
+# This module's spesification
+# <rtc-template block="module_spec">
+AutoTestOut_spec = ["implementation_id", "AutoTestOut", 
+                    "type_name",         "AutoTestOut", 
+                    "description",       "ModuleDescription", 
+                    "version",           "1.0.0", 
+                    "vendor",            "HarumiMiyamoto", 
+                    "category",          "example", 
+                    "activity_type",     "STATIC", 
+                    "max_instance",      "1", 
+                    "language",          "Python", 
+                    "lang_type",         "SCRIPT",
+                    "exec_cxt.periodic.rate", "1.0",
+                    ""]
+
+
+class AutoTestOut(OpenRTM_aist.DataFlowComponentBase):
+  
+  """
+  \class AutoTestOut
+  \brief ModuleDescription
+  """
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+    return
+        
+  def onInitialize(self):
+    self._d_dp_vOut = RTC.TimedFloat(RTC.Time(0,0),0)
+    self._d_dp_vSeqOut = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    
+    self._OutOut = OpenRTM_aist.OutPort("out", self._d_dp_vOut, OpenRTM_aist.RingBuffer(8))
+    self._SeqOutOut = OpenRTM_aist.OutPort("seqout", self._d_dp_vSeqOut, OpenRTM_aist.RingBuffer(8))
+  
+    # Set OutPort buffers
+    self.addOutPort("out", self._OutOut)
+    self.addOutPort("seqout", self._SeqOutOut)
+        
+    self._MyServicePort = OpenRTM_aist.CorbaPort("MyService")
+    self._myservice0_var = OpenRTM_aist.CorbaConsumer(interfaceType=AutoTest.MyService)
+    
+    # Set service consumers to Ports
+    self._MyServicePort.registerConsumer("myservice0", "MyService", self._myservice0_var)
+    
+    # Set CORBA Service Ports
+    self.addPort(self._MyServicePort)
+  
+    return RTC.RTC_OK
+  
+  def onActivated(self, ec_id):
+    try:
+      self._file=open('original-data')
+    except:
+      print("Can not open 'original-data' file.")
+      return RTC.RTC_ERROR
+
+    return RTC.RTC_OK
+  
+  def onDeactivated(self, ec_id): 
+    self._file.close()
+    return RTC.RTC_OK
+  
+
+  def onExecute(self, ec_id):
+    floatSeq=[]
+    str1 = self._file.readline()
+    str2 = self._file.readline()
+    str3 = self._file.readline()
+    
+    if str1:  
+      self._d_dp_vOut.data = float(str1)
+
+      if str2:
+        str2 = str2.split(' ')
+        floatSeq.append(float(str2[0]))
+        floatSeq.append(float(str2[1]))
+        floatSeq.append(float(str2[2]))
+        floatSeq.append(float(str2[3]))
+        floatSeq.append(float(str2[4]))
+        self._d_dp_vSeqOut.data = floatSeq
+
+        if str3:
+          if self._myservice0_var._ptr():
+            # Write out data
+            self._OutOut.write()
+            self._SeqOutOut.write()
+
+            # invoking echo operation
+            retmsg = self._myservice0_var._ptr().echo(str3.rstrip('\r\n'))
+          
+    return RTC.RTC_OK
+        
+
+def AutoTestOutInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=AutoTestOut_spec)
+  manager.registerFactory(profile,
+                          AutoTestOut,
+                          OpenRTM_aist.Delete)
+
+def MyModuleInit(manager):
+  AutoTestOutInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("AutoTestOut")
+
+
+
+def main():
+  mgr = OpenRTM_aist.Manager.init(len(sys.argv), sys.argv)
+  mgr.setModuleInitProc(MyModuleInit)
+  mgr.activateManager()
+  mgr.runManager()
+
+if __name__ == "__main__":
+  
+  main()
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/AutoTestService.idl
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/AutoTestService.idl	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/AutoTestService.idl	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,12 @@
+module AutoTest {
+typedef sequence<string> EchoList;
+typedef sequence<float> ValueList;
+interface MyService
+{
+  string echo(in string msg);
+  EchoList get_echo_history();
+  void set_value(in float value);
+  float get_value();
+  ValueList get_value_history();
+};
+};

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/ConnectTest.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/ConnectTest.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/ConnectTest.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,4770 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+#
+## ConnectTest.py
+##
+## å⎳å㎳åãÚ妾åãºå¦µåã°è¼§î¸Ôå¥æå⎹åãˆ
+##
+
+from rtc_handle10_11 import *
+from BasicDataType_idl import *
+import time
+import commands
+import SDOPackage
+import os
+import sys
+
+##--------------------------------------------------------------------
+g_test_name = "<< component connection test >>"
+
+## åãºå¦¾å㎠å⎵å㎼åãÀ妾ê°Ô鎾Ž©
+#env = RtmEnv(sys.argv, ["localhost:2809"])
+#list0 = env.name_space["localhost:2809"].list_obj()
+#env.name_space['localhost:2809'].rtc_handles.keys()
+#ns = env.name_space['localhost:2809']
+env = RtmEnv(sys.argv, ["localhost:2809"])
+list0 = env.name_space["localhost:2809"].list_obj()
+env.name_space['localhost:2809'].rtc_handles.keys()
+ns = env.name_space['localhost:2809']
+
+g_compo_send = ns.rtc_handles["AutoTestOut0.rtc"]
+g_compo_recv = ns.rtc_handles["AutoTestIn0.rtc"]
+
+ec_send = g_compo_send.rtc_ref.get_owned_contexts()
+ec_recv = g_compo_recv.rtc_ref.get_owned_contexts()
+
+g_out_ports = g_compo_send.rtc_ref.get_ports()
+g_in_ports = g_compo_recv.rtc_ref.get_ports()
+#print("<<< g_out_ports.length=",len(g_out_ports))
+#SeqOutåᎮꢎ´éðˆ
+#length=8 [0]:Short [1]:Long [2]:Float [3]:Double [4]:ShortSeq [5]:LongSeq [6]:FloatSeq [7]:DoubleSeq
+#print("<<<  g_in_ports.length=",len(g_in_ports))
+
+time.sleep(2)
+
+##--------------------------------------------------------------------
+## å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫åã®å¥õå⎩å㎫åã°çŽ®Ô鎾Ž©
+g_interface_type1 = "corba_cdr"
+g_dataflow_type = "push"
+g_subscription_type = "flush"
+g_push_policy = "NEW"
+g_push_rate = "2000"
+g_skip_count = "4"
+#g_skip_count = "0"
+
+## åãÚ妾åã°éʬéëì®çŽ®š ( get_ports()åâ°å£ê )
+g_port1 = 0
+g_port2 = 1
+g_port3 = 2
+
+## ConnectorProfile(name, connector_id, ports, properties)
+##   String name
+##   String connector_id
+##   RTC.PortService ports[]
+##   SDOPackage.NameValue properties[]
+
+## åã®å¦¾å⎿åãÚ妾å㈠TimedFloat
+g_name1 = "out"
+g_connector_id1 = "001"
+g_data_type1 = "TimedFloat"
+
+g_conprof1 = RTC.ConnectorProfile(g_name1, g_connector_id1, [g_out_ports[g_port1], g_in_ports[g_port1]], [SDOPackage.NameValue("dataport.data_type",any.to_any(g_data_type1)),SDOPackage.NameValue("dataport.interface_type",any.to_any(g_interface_type1)),SDOPackage.NameValue("dataport.dataflow_type",any.to_any(g_dataflow_type)),SDOPackage.NameValue("dataport.subscription_type",any.to_any(g_subscription_type)),SDOPackage.NameValue("dataport.publisher.push_policy",any.to_any(g_push_policy)),SDOPackage.NameValue("dataport.publisher.push_rate",any.to_any(g_push_rate)),SDOPackage.NameValue("dataport.publisher.skip_count",any.to_any(g_skip_count))])
+
+## åã®å¦¾å⎿åãÚ妾å㈠TimedFloatSeq
+g_name2 = "seqout"
+g_connector_id2 = "002"
+g_data_type2 = "TimedFloatSeq"
+
+g_conprof2 = RTC.ConnectorProfile(g_name2, g_connector_id2, [g_out_ports[g_port2], g_in_ports[g_port2]], [SDOPackage.NameValue("dataport.data_type",any.to_any(g_data_type2)),SDOPackage.NameValue("dataport.interface_type",any.to_any(g_interface_type1)),SDOPackage.NameValue("dataport.dataflow_type",any.to_any(g_dataflow_type)),SDOPackage.NameValue("dataport.subscription_type",any.to_any(g_subscription_type)),SDOPackage.NameValue("dataport.publisher.push_policy",any.to_any(g_push_policy)),SDOPackage.NameValue("dataport.publisher.push_rate",any.to_any(g_push_rate)),SDOPackage.NameValue("dataport.publisher.skip_count",any.to_any(g_skip_count))])
+
+## å⎵å㎼åãÆ夻åãÚ妾å㈠
+g_name3 = "MyService"
+g_connector_id3 = "003"
+g_interface_type3 = "MyService"
+
+g_conprof3 = RTC.ConnectorProfile(g_name3, g_connector_id3, [g_out_ports[g_port3], g_in_ports[g_port3]], [SDOPackage.NameValue("dataport.interface_type",any.to_any(g_interface_type3))])
+
+##--------------------------------------------------------------------
+## ‚⎢êŽÁ¼£ü¹ŽÀðݘëïô²ŽÔöÎŽ¤‚â¼¥
+g_diff_send_file = "./original-data"
+g_diff_recv_file = "./received-data"
+g_check_message = g_diff_recv_file + " file not found."
+g_test_result_file = "./ResultTest.log"
+g_test_case = "case"
+g_test_cnt = "count"
+g_test_ok = "OK."
+g_test_ng = "NG detected."
+g_test_ng_message = "  < received-data >"
+g_mess_header = "< "
+g_mess_footer = " > "
+# åã¬å¤»åã°éŽµÀèÛüéæªçŽ®Ž¹
+# èÀ‹)å⎱å㎼å⎹1åà1éûÜéÖ° -> "<<< case1 count1 >>> OK."
+# èÀ‹)å⎱å㎼å⎹1åà2éûÜéÖ° -> "<<< case1 count2 >>> NG detected."
+
+##--------------------------------------------------------------------
+## éæªë¦ªñöŽ¢ëõŽ°þ¾Ô夵åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚(åã®å¦¾å⎿åãÚ妾åãˆ)
+##
+## (ôÀŽÊðÌŽ²)
+## subscription_type : "flush", "new", "periodic"
+## push_policy       : "ALL", "FIFO", "SKIP", "NEW", ""
+## connect_direction : 0:outport -> inport, 1:inport -> outport
+##--------------------------------------------------------------------
+def make_connecter_profile(subscription_type, push_policy, connect_direction):
+    global g_conprof1, g_conprof2, g_conprof3
+
+    if connect_direction == 0:
+        ## outport -> inport Set
+        g_conprof1 = RTC.ConnectorProfile(g_name1, g_connector_id1, [g_out_ports[g_port1], g_in_ports[g_port1]], [SDOPackage.NameValue("dataport.data_type",any.to_any(g_data_type1)),SDOPackage.NameValue("dataport.interface_type",any.to_any(g_interface_type1)),SDOPackage.NameValue("dataport.dataflow_type",any.to_any(g_dataflow_type)),SDOPackage.NameValue("dataport.subscription_type",any.to_any(subscription_type)),SDOPackage.NameValue("dataport.publisher.push_policy",any.to_any(push_policy)),SDOPackage.NameValue("dataport.publisher.push_rate",any.to_any(g_push_rate)),SDOPackage.NameValue("dataport.publisher.skip_count",any.to_any(g_skip_count))])
+
+        g_conprof2 = RTC.ConnectorProfile(g_name2, g_connector_id2, [g_out_ports[g_port2], g_in_ports[g_port2]], [SDOPackage.NameValue("dataport.data_type",any.to_any(g_data_type2)),SDOPackage.NameValue("dataport.interface_type",any.to_any(g_interface_type1)),SDOPackage.NameValue("dataport.dataflow_type",any.to_any(g_dataflow_type)),SDOPackage.NameValue("dataport.subscription_type",any.to_any(subscription_type)),SDOPackage.NameValue("dataport.publisher.push_policy",any.to_any(push_policy)),SDOPackage.NameValue("dataport.publisher.push_rate",any.to_any(g_push_rate)),SDOPackage.NameValue("dataport.publisher.skip_count",any.to_any(g_skip_count))])
+
+        #print("outport -> inport set >>>")
+        #print("g_conprof1=",g_conprof1)
+        #print("g_conprof2=",g_conprof2)
+    else:
+        ## inport -> outport Set
+        g_conprof1 = RTC.ConnectorProfile(g_name1, g_connector_id1, [g_in_ports[g_port1], g_out_ports[g_port1]], [SDOPackage.NameValue("dataport.data_type",any.to_any(g_data_type1)),SDOPackage.NameValue("dataport.interface_type",any.to_any(g_interface_type1)),SDOPackage.NameValue("dataport.dataflow_type",any.to_any(g_dataflow_type)),SDOPackage.NameValue("dataport.subscription_type",any.to_any(subscription_type)),SDOPackage.NameValue("dataport.publisher.push_policy",any.to_any(push_policy)),SDOPackage.NameValue("dataport.publisher.push_rate",any.to_any(g_push_rate)),SDOPackage.NameValue("dataport.publisher.skip_count",any.to_any(g_skip_count))])
+
+        g_conprof2 = RTC.ConnectorProfile(g_name2, g_connector_id2, [g_in_ports[g_port2], g_out_ports[g_port2]], [SDOPackage.NameValue("dataport.data_type",any.to_any(g_data_type2)),SDOPackage.NameValue("dataport.interface_type",any.to_any(g_interface_type1)),SDOPackage.NameValue("dataport.dataflow_type",any.to_any(g_dataflow_type)),SDOPackage.NameValue("dataport.subscription_type",any.to_any(subscription_type)),SDOPackage.NameValue("dataport.publisher.push_policy",any.to_any(push_policy)),SDOPackage.NameValue("dataport.publisher.push_rate",any.to_any(g_push_rate)),SDOPackage.NameValue("dataport.publisher.skip_count",any.to_any(g_skip_count))])
+
+        #print("inport -> outport set >>>")
+        #print("g_conprof1=",g_conprof1)
+        #print("g_conprof2=",g_conprof2)
+    return
+
+
+##--------------------------------------------------------------------
+## éæªë¦ªñöŽ¢ëõŽ°þ¾Ôç½÷èÁŽ¡åãÊ夣å⎤å㎫éé´ëÒ¦
+##
+## (ôÀŽÊðÌŽ²)
+## åᎪåá—
+##--------------------------------------------------------------------
+def delete_recv_file():
+    ## åãÊ夣å⎤å㎫åá¸çŽ­ÐçتåáÒå£ëꢎ´éðˆ
+    if os.path.isfile(g_diff_recv_file) == True:
+        os.remove(g_diff_recv_file)
+    return
+
+
+##--------------------------------------------------------------------
+## éæªë¦ªñöŽ¢ëõŽ°þ¾Ô뀢ç½÷èÁŽ¡åãÊ夣å⎤å㎫åᎮåã®å¦¾å⎿ì±Èꎼƒ
+##
+## (ôÀŽÊðÌŽ²)
+## åᎪåá—
+## (ë莻åâ´ç€Ž¤)  True : 躀ï玴åà  False : 躺掸€ï玴
+##--------------------------------------------------------------------
+def diff_file():
+    bret = True
+
+    ## if connect_direction == 0:
+    ## else:
+    ## ñà¢æŽ¿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_send_file) == False:
+        print("send_file (%s) not found." % send_file)
+        return False
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        print("recv_file (%s) not found." % recv_file)
+        return False
+
+    ## ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿깎®éè¬ç°¦ê°š
+    f_send = open(g_diff_send_file, 'r')
+    f_recv = open(g_diff_recv_file, 'r')
+
+    while(1):
+        str_send = f_send.readline()
+        str_recv = f_recv.readline()
+        if len(str_send) == 0:
+            break
+
+        #print("original send date=(%s)" % str_send)
+        #print(''.join(['%x ' % ord(s) for s in str_send]))
+        #print("original recv date=(%s)" % str_recv)
+        #print(''.join(['%x ' % ord(s) for s in str_recv]))
+
+        ## ëüŽ«ê²Ž¾åᎮëôŽ¹ð£¸å€¢çŽ¾Ž©êºŽ°å⎳å㎼åã²ç±êñùŽ¤
+        str_send2 = str_send.rstrip('\n')
+        str_send2 = str_send2.rstrip('\r')
+        str_recv2 = str_recv.rstrip('\n')
+        str_recv2 = str_recv2.rstrip('\r')
+
+        #print("rstrip after send date=(%s)" % str_send2)
+        #print("rstrip after recv date=(%s)" % str_recv2)
+
+        ## åã®å¦¾å⎿ì±Èꎼƒ
+        if str_send2 != str_recv2:
+            #print("data difference")
+            #print("send date=(%s)" % str_send2)
+            #print("recv date=(%s)" % str_recv2)
+            bret = False
+            break;
+
+    f_recv.close()
+    f_send.close()
+    return bret
+
+##--------------------------------------------------------------------
+## åã¬å¤»åã°å¤³å㎼å⎹íõŽªéåᎮéèÚèØ¡éàŽ¤ðªŽ­ê°š
+##  躴å¡ëåâ²ë€Ž£íõŽªåâÄ踱åᎣåᎦåá¨å£ë
+case_no = 0
+
+## å⎱å㎼å⎹챼墰åã¬å¤»åã°çÕþëõŽ°
+loop_count = 3
+
+## éïÎ掿Ž¡éᎴactivate_componentåá¶å£éñà¢æŽ¿Ž¡éᎴactivate_componentåᎾåᎧåᎮå⎹å㎪å㎼åãÎèÑâñö“(î©Äèʲ)
+sleep_recv_act_time = 1
+
+## activate_componentåá¶å£édeactivate_componentåᎾåᎧåᎮå⎹å㎪å㎼åãÎèÑâñö“(î©Äèʲ)
+sleep_act_time = 10
+
+## forå㎫å㎼åãÎ墰å⎹å㎪å㎼åãÎèÑâñö“(î©Äèʲ)
+sleep_for_time = 2
+
+## connectåá¶å£édisconnectåᎾåᎧåᎮå⎹å㎪å㎼åãÎèÑâñö“(î©Äèʲ)
+sleep_connect_time = 2
+
+# åã¬å¤»åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎮè¿Øè¯ð
+fout = open(g_test_result_file, 'w')
+fout.write(g_test_name + '\n')
+fout.close()
+#print(g_test_name)
+
+time.sleep(1)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÇlush  ëöŽ¹éðÂñŽ¼ÓÐut->in  ëî¸Ô妽éè®è̯åã¬å¤»åãˆ2
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(out->in, flush) -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("flush", "", 0)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_connect_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## åã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    message = message + g_test_ok
+    print(message)
+    fout.write(message + '\n')
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÇlush  ëöŽ¹éðÂñŽ¼ÓÊn->out  ëî¸Ô妽éè®è̯åã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(in->out, flush) -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("flush", "", 1)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_connect_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## åã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    message = message + g_test_ok
+    print(message)
+    fout.write(message + '\n')
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÇlush  ëöŽ¹éðÂñŽ¼ÓÐut->in  Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connecting(out->in, flush), Activate -> send/recv -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+make_connecter_profile("flush", "", 0)
+
+## 3 åãÚ妾åã°è¼§î¸š
+# åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+# åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+# å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+## 6 åãÚ妾åã°ç¯çëöŽ­
+g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÇlush  ëöŽ¹éðÂñŽ¼ÓÊn->out  Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connecting(in->out, flush), Activate -> send/recv -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+make_connecter_profile("flush", "", 1)
+
+## 3 åãÚ妾åã°è¼§î¸š
+# åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+# åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+# å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+## 6 åãÚ妾åã°ç¯çëöŽ­
+g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÇlush  ëöŽ¹éðÂñŽ¼ÓÐut->in  Activateå㎻Deactivateåã¬å¤»åãˆ10
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Not Connect(out->in, flush), Activate -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("flush", "", 0)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## åã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    message = message + g_test_ok
+    print(message)
+    fout.write(message + '\n')
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÇlush  ëöŽ¹éðÂñŽ¼ÓÐut->in  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(out->in, flush) -> Activate -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("flush", "", 0)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÇlush  ëöŽ¹éðÂñŽ¼ÓÊn->out  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(in->out, flush) -> Activate -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("flush", "", 1)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÇlush  ëöŽ¹éðÂñŽ¼ÓÐut->in  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ2
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(out->in, flush) -> Activate -> send/recv -> Disconnect -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("flush", "", 0)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÇlush  ëöŽ¹éðÂñŽ¼ÓÊn->out  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ2
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(in->out, flush) -> Activate -> send/recv -> Disconnect -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("flush", "", 1)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÇlush  ëöŽ¹éðÂñŽ¼ÓÐut->in  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ3
+##--------------------------------------------------------------------
+##  ã÷¾èŽ³Ž¨ëä¾ñŽ¼Ó¢ctivateåâÄç©èåᎫð£¸å¢¥åᎦåá¨å£ëí⎺åà¢ç½÷èÁŽ¡åã®å¦¾å⎿åᎯñàÈ掸Ž­åá¶å£éåᎮéæªçŽ®Ž¹åᎫåᎪåâ´å¢ÀåáÒ倂
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Activate -> Connect(out->in, flush) -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("flush", "", 0)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÇlush  ëöŽ¹éðÂñŽ¼ÓÊn->out  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ3
+##--------------------------------------------------------------------
+##  ã÷¾èŽ³Ž¨ëä¾ñŽ¼Ó¢ctivateåâÄç©èåᎫð£¸å¢¥åᎦåá¨å£ëí⎺åà¢ç½÷èÁŽ¡åã®å¦¾å⎿åᎯñàÈ掸Ž­åá¶å£éåᎮéæªçŽ®Ž¹åᎫåᎪåâ´å¢ÀåáÒ倂
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Activate -> Connect(in->out, flush) -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("flush", "", 1)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÇlush  ëöŽ¹éðÂñŽ¼ÓÐut->in  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ4
+##--------------------------------------------------------------------
+##  ã÷¾èŽ³Ž¨ëä¾ñŽ¼Ó¢ctivateåâÄç©èåᎫð£¸å¢¥åᎦåá¨å£ëí⎺åà¢ç½÷èÁŽ¡åã®å¦¾å⎿åᎯñàÈ掸Ž­åá¶å£éåᎮéæªçŽ®Ž¹åᎫåᎪåâ´å¢ÀåáÒ倂
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Activate -> Connect(out->in, flush) -> send/recv -> Disconnect -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("flush", "", 0)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_act_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÇlush  ëöŽ¹éðÂñŽ¼ÓÊn->out  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ4
+##--------------------------------------------------------------------
+##  ã÷¾èŽ³Ž¨ëä¾ñŽ¼Ó¢ctivateåâÄç©èåᎫð£¸å¢¥åᎦåá¨å£ëí⎺åà¢ç½÷èÁŽ¡åã®å¦¾å⎿åᎯñàÈ掸Ž­åá¶å£éåᎮéæªçŽ®Ž¹åᎫåᎪåâ´å¢ÀåáÒ倂
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Activate -> Connect(in->out, flush) -> send/recv -> Disconnect -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("flush", "", 1)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_act_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó¢LL  ëî¸Ô妽éè®è̯åã¬å¤»åãˆ3
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(out->in, new,ALL) -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("new", "ALL", 0)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_connect_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## åã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    message = message + g_test_ok
+    print(message)
+    fout.write(message + '\n')
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó§IFO  ëî¸Ô妽éè®è̯åã¬å¤»åãˆ4
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(out->in, new,FIFO) -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("new", "FIFO", 0)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_connect_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## åã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    message = message + g_test_ok
+    print(message)
+    fout.write(message + '\n')
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó¯EW  ëî¸Ô妽éè®è̯åã¬å¤»åãˆ6
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(out->in, new,NEW) -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("new", "NEW", 0)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_connect_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## åã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    message = message + g_test_ok
+    print(message)
+    fout.write(message + '\n')
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó´KIP  ëî¸Ô妽éè®è̯åã¬å¤»åãˆ5
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(out->in, new,SKIP) -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("new", "SKIP", 0)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_connect_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## åã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    message = message + g_test_ok
+    print(message)
+    fout.write(message + '\n')
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó¢LL  ëî¸Ô妽éè®è̯åã¬å¤»åãˆ3
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(in->out, new,ALL) -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("new", "ALL", 1)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_connect_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## åã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    message = message + g_test_ok
+    print(message)
+    fout.write(message + '\n')
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó§IFO  ëî¸Ô妽éè®è̯åã¬å¤»åãˆ4
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(in->out, new,FIFO) -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("new", "FIFO", 1)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_connect_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## åã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    message = message + g_test_ok
+    print(message)
+    fout.write(message + '\n')
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó¯EW  ëî¸Ô妽éè®è̯åã¬å¤»åãˆ6
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(in->out, new,NEW) -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("new", "NEW", 1)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_connect_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## åã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    message = message + g_test_ok
+    print(message)
+    fout.write(message + '\n')
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó´KIP  ëî¸Ô妽éè®è̯åã¬å¤»åãˆ5
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(in->out, new,SKIP) -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("new", "SKIP", 1)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_connect_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## åã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    message = message + g_test_ok
+    print(message)
+    fout.write(message + '\n')
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó¢LL  Activateå㎻Deactivateåã¬å¤»åãˆ2
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connecting(out->in, new,ALL), Activate -> send/recv -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+make_connecter_profile("new", "ALL", 0)
+
+## 3 åãÚ妾åã°è¼§î¸š
+# åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+# åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+# å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+## 6 åãÚ妾åã°ç¯çëöŽ­
+g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó§IFO  Activateå㎻Deactivateåã¬å¤»åãˆ3
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connecting(out->in, new,FIFO), Activate -> send/recv -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+make_connecter_profile("new", "FIFO", 0)
+
+## 3 åãÚ妾åã°è¼§î¸š
+# åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+# åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+# å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+## 6 åãÚ妾åã°ç¯çëöŽ­
+g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó¯EW  Activateå㎻Deactivateåã¬å¤»åãˆ5
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connecting(out->in, new,NEW), Activate -> send/recv -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+make_connecter_profile("new", "NEW", 0)
+
+## 3 åãÚ妾åã°è¼§î¸š
+# åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+# åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+# å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+## 6 åãÚ妾åã°ç¯çëöŽ­
+g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó´KIP  Activateå㎻Deactivateåã¬å¤»åãˆ4
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connecting(out->in, new,SKIP), Activate -> send/recv -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+make_connecter_profile("new", "SKIP", 0)
+
+## 3 åãÚ妾åã°è¼§î¸š
+# åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+# åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+# å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+## 6 åãÚ妾åã°ç¯çëöŽ­
+g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó¢LL  Activateå㎻Deactivateåã¬å¤»åãˆ2
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connecting(in->out, new,ALL), Activate -> send/recv -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+make_connecter_profile("new", "ALL", 1)
+
+## 3 åãÚ妾åã°è¼§î¸š
+# åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+# åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+# å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+## 6 åãÚ妾åã°ç¯çëöŽ­
+g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó§IFO  Activateå㎻Deactivateåã¬å¤»åãˆ3
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connecting(in->out, new,FIFO), Activate -> send/recv -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+make_connecter_profile("new", "FIFO", 1)
+
+## 3 åãÚ妾åã°è¼§î¸š
+# åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+# åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+# å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+## 6 åãÚ妾åã°ç¯çëöŽ­
+g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó¯EW  Activateå㎻Deactivateåã¬å¤»åãˆ5
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connecting(in->out, new,NEW), Activate -> send/recv -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+make_connecter_profile("new", "NEW", 1)
+
+## 3 åãÚ妾åã°è¼§î¸š
+# åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+# åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+# å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+## 6 åãÚ妾åã°ç¯çëöŽ­
+g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó´KIP  Activateå㎻Deactivateåã¬å¤»åãˆ4
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connecting(in->out, new,SKIP), Activate -> send/recv -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+make_connecter_profile("new", "SKIP", 1)
+
+## 3 åãÚ妾åã°è¼§î¸š
+# åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+# åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+# å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+## 6 åãÚ妾åã°ç¯çëöŽ­
+g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó¢LL  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(out->in, new,ALL) -> Activate -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("new", "ALL", 0)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó§IFO  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(out->in, new,FIFO) -> Activate -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("new", "FIFO", 0)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó¯EW  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(out->in, new,NEW) -> Activate -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("new", "NEW", 0)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó´KIP  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(out->in, new,SKIP) -> Activate -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("new", "SKIP", 0)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó¢LL  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(in->out, new,ALL) -> Activate -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("new", "ALL", 1)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó§IFO  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(in->out, new,FIFO) -> Activate -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("new", "FIFO", 1)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó¯EW  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(in->out, new,NEW) -> Activate -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("new", "NEW", 1)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÏew  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó´KIP  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(in->out, new,SKIP) -> Activate -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("new", "SKIP", 1)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó¢LL  ëî¸Ô妽éè®è̯åã¬å¤»åãˆ7
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(out->in, periodic,ALL) -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("periodic", "ALL", 0)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_connect_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## åã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    message = message + g_test_ok
+    print(message)
+    fout.write(message + '\n')
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó§IFO  ëî¸Ô妽éè®è̯åã¬å¤»åãˆ8
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(out->in, periodic,FIFO) -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("periodic", "FIFO", 0)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_connect_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## åã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    message = message + g_test_ok
+    print(message)
+    fout.write(message + '\n')
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó¯EW  ëî¸Ô妽éè®è̯åã¬å¤»åãˆ10
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(out->in, periodic,NEW) -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("periodic", "NEW", 0)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_connect_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## åã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    message = message + g_test_ok
+    print(message)
+    fout.write(message + '\n')
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó´KIP  ëî¸Ô妽éè®è̯åã¬å¤»åãˆ9
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(out->in, periodic,SKIP) -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("periodic", "SKIP", 0)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_connect_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## åã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    message = message + g_test_ok
+    print(message)
+    fout.write(message + '\n')
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó¢LL  ëî¸Ô妽éè®è̯åã¬å¤»åãˆ7
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(in->out, periodic,ALL) -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("periodic", "ALL", 1)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_connect_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## åã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    message = message + g_test_ok
+    print(message)
+    fout.write(message + '\n')
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó§IFO  ëî¸Ô妽éè®è̯åã¬å¤»åãˆ8
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(in->out, periodic,FIFO) -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("periodic", "FIFO", 1)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_connect_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## åã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    message = message + g_test_ok
+    print(message)
+    fout.write(message + '\n')
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó¯EW  ëî¸Ô妽éè®è̯åã¬å¤»åãˆ10
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(in->out, periodic,NEW) -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("periodic", "NEW", 1)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_connect_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## åã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    message = message + g_test_ok
+    print(message)
+    fout.write(message + '\n')
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó´KIP  ëî¸Ô妽éè®è̯åã¬å¤»åãˆ9
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(in->out, periodic,SKIP) -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("periodic", "SKIP", 1)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    time.sleep(sleep_connect_time)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## åã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    message = message + g_test_ok
+    print(message)
+    fout.write(message + '\n')
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó¢LL    Activateå㎻Deactivateåã¬å¤»åãˆ6
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connecting(out->in, periodic,ALL), Activate -> send/recv -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+make_connecter_profile("periodic", "ALL", 0)
+
+## 3 åãÚ妾åã°è¼§î¸š
+# åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+# åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+# å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+## 6 åãÚ妾åã°ç¯çëöŽ­
+g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó§IFO    Activateå㎻Deactivateåã¬å¤»åãˆ7
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connecting(out->in, periodic,FIFO), Activate -> send/recv -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+make_connecter_profile("periodic", "FIFO", 0)
+
+## 3 åãÚ妾åã°è¼§î¸š
+# åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+# åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+# å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+## 6 åãÚ妾åã°ç¯çëöŽ­
+g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó¯EW    Activateå㎻Deactivateåã¬å¤»åãˆ9
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connecting(out->in, periodic,NEW), Activate -> send/recv -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+make_connecter_profile("periodic", "NEW", 0)
+
+## 3 åãÚ妾åã°è¼§î¸š
+# åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+# åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+# å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+## 6 åãÚ妾åã°ç¯çëöŽ­
+g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó´KIP    Activateå㎻Deactivateåã¬å¤»åãˆ8
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connecting(out->in, periodic,SKIP), Activate -> send/recv -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+make_connecter_profile("periodic", "SKIP", 0)
+
+## 3 åãÚ妾åã°è¼§î¸š
+# åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+# åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+# å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+## 6 åãÚ妾åã°ç¯çëöŽ­
+g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó¢LL    Activateå㎻Deactivateåã¬å¤»åãˆ6
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connecting(in->out, periodic,ALL), Activate -> send/recv -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+make_connecter_profile("periodic", "ALL", 1)
+
+## 3 åãÚ妾åã°è¼§î¸š
+# åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+# åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+# å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+## 6 åãÚ妾åã°ç¯çëöŽ­
+g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó§IFO    Activateå㎻Deactivateåã¬å¤»åãˆ7
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connecting(in->out, periodic,FIFO), Activate -> send/recv -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+make_connecter_profile("periodic", "FIFO", 1)
+
+## 3 åãÚ妾åã°è¼§î¸š
+# åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+# åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+# å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+## 6 åãÚ妾åã°ç¯çëöŽ­
+g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó¯EW    Activateå㎻Deactivateåã¬å¤»åãˆ9
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connecting(in->out, periodic,NEW), Activate -> send/recv -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+make_connecter_profile("periodic", "NEW", 1)
+
+## 3 åãÚ妾åã°è¼§î¸š
+# åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+# åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+# å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+## 6 åãÚ妾åã°ç¯çëöŽ­
+g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó´KIP    Activateå㎻Deactivateåã¬å¤»åãˆ8
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connecting(in->out, periodic,SKIP), Activate -> send/recv -> Deactivate"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+make_connecter_profile("periodic", "SKIP", 1)
+
+## 3 åãÚ妾åã°è¼§î¸š
+# åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+# åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+# å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+## 6 åãÚ妾åã°ç¯çëöŽ­
+g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó¢LL  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(out->in, periodic,ALL) -> Activate -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("periodic", "ALL", 0)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó§IFO  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(out->in, periodic,FIFO) -> Activate -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("periodic", "FIFO", 0)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó¯EW  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(out->in, periodic,NEW) -> Activate -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("periodic", "NEW", 0)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÐut->in  åãÚ妬å⎷å㎼þ¾Ó´KIP  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(out->in, periodic,SKIP) -> Activate -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("periodic", "SKIP", 0)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó¢LL  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(in->out, periodic,ALL) -> Activate -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("periodic", "ALL", 1)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó§IFO  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(in->out, periodic,FIFO) -> Activate -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("periodic", "FIFO", 1)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó¯EW  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(in->out, periodic,NEW) -> Activate -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("periodic", "NEW", 1)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+##--------------------------------------------------------------------
+## ëî¸Ôå¤Áå⎤åãÎñŽ¼ÓÑeriodic  ëöŽ¹éðÂñŽ¼ÓÊn->out  åãÚ妬å⎷å㎼þ¾Ó´KIP  ëî¸Ô妽éè®è̯å㎻Activateå㎻Deactivateåã¬å¤»åãˆ1
+##--------------------------------------------------------------------
+case_no = case_no + 1
+fout = open(g_test_result_file, 'a')
+message = g_mess_header + g_test_case + str(case_no) + " "
+message = message + "Connect(in->out, periodic,SKIP) -> Activate -> send/recv -> Deactivate -> Disconnect"
+message = message + g_mess_footer
+fout.write(message + '\n')
+fout.close()
+print(message)
+
+for i in range(loop_count):
+
+    ## 2 éïÎ掿Ž¡åã®å¦¾å⎿åãÊ夣å⎤å㎫éé´ëÒ¦
+    delete_recv_file()
+
+    ## 1 å⎳åãºå¤±å⎿å㎼åãÎ妯åãÊ夣å⎤å㎫𪎭갚
+    make_connecter_profile("periodic", "SKIP", 1)
+
+    ## 3 åãÚ妾åã°è¼§î¸š
+    # åã®å¦¾å⎿åãÚ妾åãˆ1 TimedFloat
+    ret0 = g_out_ports[g_port1].connect(g_conprof1)
+
+    # åã®å¦¾å⎿åãÚ妾åãˆ2 TimedFloatSeq
+    ret1 = g_out_ports[g_port2].connect(g_conprof2)
+
+    # å⎵å㎼åãÆ夻åãÚ妾å㈠MyService
+    ret2 = g_out_ports[g_port3].connect(g_conprof3)
+
+    ## 4 å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_recv[0].activate_component(g_compo_recv.rtc_ref)
+    time.sleep(sleep_recv_act_time)
+    ec_send[0].activate_component(g_compo_send.rtc_ref)
+
+    time.sleep(sleep_act_time)
+
+    ## 5 åã®å¤¥å⎢å⎯åã¬å¤¥åãÒ妾åãˆ
+    ec_send[0].deactivate_component(g_compo_send.rtc_ref)
+    ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
+
+    ## 6 åãÚ妾åã°ç¯çëöŽ­
+    g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
+    g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
+    g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
+
+    ## éïÎ掿Ž¡åãÊ夣å⎤å㎫ëü²é¨£é莤갚
+    if os.path.isfile(g_diff_recv_file) == False:
+        fout = open(g_test_result_file, 'a')
+        message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+        message = message + g_check_message
+        fout.write(message + '\n')
+        fout.close()
+        print(message)
+        time.sleep(sleep_for_time)
+        continue
+
+    ## 7 ñà¢ç½÷èÁŽ¡åã®å¦¾å⎿ì±Èꎼƒ
+    time.sleep(sleep_act_time)
+    bret = diff_file()
+
+    ## 깎®éè¬å¥õå⎡å⎤å㎫åá¶å£éåã¬å¤»åã°éŽµÀèÛüé玺éê›
+    fout = open(g_test_result_file, 'a')
+    message = g_mess_header + g_test_case + str(case_no) + " " + g_test_cnt + str(i+1) + g_mess_footer
+    # bret==True åᎪåâ²ë€¢ç½÷èÁŽ¡åã®å¦¾å⎿躀ï玴
+    if bret == True:
+        # åã¬å¤»åã°éŽµÀèÛü OK
+        message = message + g_test_ok
+        print(message)
+        fout.write(message + '\n')
+    else:
+        # åã¬å¤»åã°éŽµÀèÛü NG
+        message = message + g_test_ng
+        print(message)
+        message = message + g_test_ng_message
+        fout.write(message + '\n')
+        # éïÎ掿Ž¡åã®å¦¾å⎿åâÄå¥æå⎹åã°éŽµÀèÛüåãÊ夣å⎤å㎫åᎸå⎳åãÈ妾
+        fin2 = open(g_diff_recv_file, 'r')
+        while(1):
+            s2 = fin2.readline()
+            if len(s2) == 0:
+                break
+            fout.write(s2)
+        fin2.close()
+    fout.close()
+
+    time.sleep(sleep_for_time)
+
+print("Test Complete.")

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/CorbaNaming.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/CorbaNaming.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/CorbaNaming.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,1246 @@
+#!/usr/bin/env python
+# -*- coding: euc-jp -*-
+
+
+##
+# \file CorbaNaming.py
+# \brief CORBA naming service helper class
+# \author Noriaki Ando <n-ando at aist.go.jp> and Shinji Kurihara
+#
+# Copyright (C) 2006-2008
+#     Noriaki Ando
+#     Task-intelligence Research Group,
+#     Intelligent Systems Research Institute,
+#     National Institute of
+#         Advanced Industrial Science and Technology (AIST), Japan
+#     All rights reserved.
+
+import omniORB.CORBA as CORBA
+import CosNaming
+import string
+import sys
+import traceback
+
+##
+# @if jp
+# @class CorbaNaming
+# @brief CORBA Naming Service ヘルパークラス
+#
+# このクラスは、CosNaming::NamingContext に対するラッパークラスである。
+# CosNaming::NamingContext が持つオペレーションとほぼ同じ機能の
+# オペレーションを提供するとともに、ネームコンポーネント CosNaming::Name
+# の代わりに文字列による名前表現を受け付けるオペレーションも提供する。
+#
+# オブジェクトは生成時、あるいは生成直後に CORBA ネームサーバに接続し
+# 以後、このネームサーバのルートコンテキストに対して種々のオペレーション
+# を処理する。
+# 深い階層のネーミングコンテキストの作成やオブジェクトのバインドにおいて、
+# 途中のコンテキストが存在しない場合でも、強制的にコンテキストをバインド
+# し目的のコンテキストやオブジェクトのバインドを行うこともできる。
+#
+# @since 0.4.0
+#
+# @else
+# @class CorbaNaming
+# @brief CORBA Naming Service helper class
+#
+# This class is a wrapper class of CosNaming::NamingContext.
+# Almost the same operations which CosNaming::NamingContext has are
+# provided, and some operation allows string naming representation of
+# context and object instead of CosNaming::Name.
+#
+# The object of the class would connect to a CORBA naming server at
+# the instantiation or immediately after instantiation.
+# After that the object invokes operations to the root context of it.
+# This class realizes forced binding to deep NamingContext, without binding
+# intermediate NamingContexts explicitly.
+#
+# @since 0.4.0
+#
+# @endif
+class CorbaNaming:
+  """
+  """
+
+
+
+  ##
+  # @if jp
+  #
+  # @brief コンストラクタ
+  #
+  # @param self
+  # @param orb ORB
+  # @param name_server ネームサーバの名称(デフォルト値:None)
+  #
+  # @else
+  #
+  # @brief Consructor
+  #
+  # @endif
+  def __init__(self, orb, name_server=None):
+    self._orb = orb
+    self._nameServer = ""
+    self._rootContext = CosNaming.NamingContext._nil
+    self._blLength = 100
+
+    if name_server:
+      self._nameServer = "corbaloc::" + name_server + "/NameService"
+      try:
+        obj = orb.string_to_object(self._nameServer)
+        self._rootContext = obj._narrow(CosNaming.NamingContext)
+        if CORBA.is_nil(self._rootContext):
+          print("CorbaNaming: Failed to narrow the root naming context.")
+
+      except CORBA.ORB.InvalidName:
+        self.__print_exception()
+        print("Service required is invalid [does not exist].")
+
+    return
+  
+
+  ##
+  # @if jp
+  #
+  # @brief デストラクタ
+  # 
+  # @param self
+  # 
+  # @else
+  # 
+  # @brief destructor
+  # 
+  # @endif
+  def __del__(self):
+    return
+
+
+  ##
+  # @if jp
+  #
+  # @brief ネーミングサービスの初期化
+  # 
+  # 指定されたネームサーバ上のネーミングサービスを初期化します。
+  # 
+  # @param self
+  # @param name_server ネームサーバの名称
+  # 
+  # @else
+  # 
+  # @endif
+  def init(self, name_server):
+    self._nameServer = "corbaloc::" + name_server + "/NameService"
+    obj = self._orb.string_to_object(self._nameServer)
+    self._rootContext = obj._narrow(CosNaming.NamingContext)
+    if CORBA.is_nil(self._rootContext):
+      raise MemoryError
+
+    return
+
+
+  ##
+  # @if jp
+  #
+  # @brief ルートコンテキストが生存しているかを返す。
+  # 
+  # ルートコンテキストが生存しているかのチェックを行う。
+  # 
+  # @param self
+  # @else
+  # @brief Check on whether the root context is alive.
+  # Check on whether the root context is alive.
+  # @param self
+  # @endif
+  # bool CorbaNaming::isAlive()
+  def isAlive(self):
+    try:
+      if self._rootContext._non_existent():
+        return False
+      return True
+    except:
+      self.__print_exception()
+      return False
+
+    return False
+
+
+  ##
+  # @if jp
+  #
+  # @brief Object を bind する
+  #
+  # CosNaming::bind() とほぼ同等の働きをするが、常に与えられたネームサーバの
+  # ルートコンテキストに対してbind()が呼び出される点が異なる。
+  #
+  # Name <name> と Object <obj> を当該 NamingContext 上にバインドする。
+  # c_n が n 番目の NameComponent をあらわすとすると、
+  # name が n 個の NameComponent から成るとき、以下のように扱われる。
+  #
+  # cxt->bind(<c_1, c_2, ... c_n>, obj) は以下の操作と同等である。
+  # cxt->resolve(<c_1, ... c_(n-1)>)->bind(<c_n>, obj)
+  #
+  # すなわち、1番目からn-1番目のコンテキストを解決し、n-1番目のコンテキスト
+  # 上に name <n> として obj を bind する。
+  # 名前解決に参加する <c_1, ... c_(n-1)> の NemingContext は、
+  # bindContext() や rebindContext() で既にバインド済みでなければならない。
+  # もし <c_1, ... c_(n-1)> の NamingContext が存在しない場合には、
+  # NotFound 例外が発生する。
+  #
+  # ただし、強制バインドフラグ force が true の時は、<c_1, ... c_(n-1)>
+  # が存在しない場合にも、再帰的にコンテキストをバインドしながら、
+  # 最終的に obj を名前 name <c_n> にバインドする。
+  #
+  # いずれの場合でも、n-1番目のコンテキスト上に name<n> のオブジェクト
+  # (Object あるいは コンテキスト) がバインドされていれば
+  # AlreadyBound 例外が発生する。
+  #
+  # @param self
+  # @param name_list オブジェクトに付ける名前の NameComponent
+  # @param obj 関連付けられる Object
+  # @param force trueの場合、途中のコンテキストを強制的にバインドする
+  #              (デフォルト値:None)
+  #
+  # @exception NotFound 途中の <c_1, c_2, ..., c_(n-1)> が存在しない。
+  # @exception CannotProceed 何らかの理由で処理を継続できない。
+  # @exception InvalidName 引数 name_list の名前が不正。
+  # @exception AlreadyBound name <c_n> の Object がすでにバインドされている。
+  #
+  # @else
+  #
+  # @brief
+  #
+  # @endif
+  def bind(self, name_list, obj, force=None):
+    if force is None :
+      force = True
+
+    try:
+      self._rootContext.bind(name_list, obj)
+    except CosNaming.NamingContext.NotFound:
+      if force:
+        self.bindRecursive(self._rootContext, name_list, obj)
+      else:
+        raise
+    except CosNaming.NamingContext.CannotProceed, err:
+      if force:
+        self.bindRecursive(err.cxt, err.rest_of_name, obj)
+      else:
+        raise
+    except CosNaming.NamingContext.AlreadyBound:
+      self._rootContext.rebind(name_list, obj)
+
+
+  ##
+  # @if jp
+  #
+  # @brief Object を bind する
+  #
+  # Object を bind する際に与える名前が文字列表現であること以外は、bind()
+  # と同じである。bind(toName(string_name), obj) と等価。
+  #
+  # @param self
+  # @param string_name オブジェクトに付ける名前の文字列表現
+  # @param obj 関連付けられるオブジェクト
+  # @param force trueの場合、途中のコンテキストを強制的にバインドする
+  #              (デフォルト値:true)
+  #
+  # @exception NotFound 途中の <c_1, c_2, ..., c_(n-1)> が存在しない。
+  # @exception CannotProceed 何らかの理由で処理を継続できない。
+  # @exception InvalidName 引数 string_name の名前が不正。
+  # @exception AlreadyBound name <n> の Object がすでにバインドされている。
+  #
+  # @else
+  #
+  # @brief
+  #
+  # @endif
+  def bindByString(self, string_name, obj, force=True):
+    self.bind(self.toName(string_name), obj, force)
+
+
+  ##
+  # @if jp
+  #
+  # @brief 途中のコンテキストを bind しながら Object を bind する
+  #
+  # context で与えられた NamingContext に対して、name で指定された
+  # ネームコンポーネント <c_1, ... c_(n-1)> を NamingContext として
+  # 解決しながら、名前 <c_n> に対して obj を bind する。
+  # もし、<c_1, ... c_(n-1)> に対応する NamingContext がない場合には
+  # 新たな NamingContext をバインドする。
+  #
+  # 最終的に <c_1, c_2, ..., c_(n-1)> に対応する NamingContext が生成
+  # または解決された上で、CosNaming::bind(<c_n>, object) が呼び出される。
+  # このとき、すでにバインディングが存在すれば AlreadyBound例外が発生する。
+  #
+  # 途中のコンテキストを解決する過程で、解決しようとするコンテキストと
+  # 同じ名前の NamingContext ではない Binding が存在する場合、
+  # CannotProceed 例外が発生し処理を中止する。
+  #
+  # @param self
+  # @param context bind を開始する NamingContext
+  # @param name_list オブジェクトに付ける名前のネームコンポーネント
+  # @param obj 関連付けられるオブジェクト
+  #
+  # @exception CannotProceed <c_1, ..., c_(n-1)> に対応する NamingContext 
+  #            のうちひとつが、すでに NamingContext 以外の object にバインド
+  #            されており、処理を継続できない。
+  # @exception InvalidName 名前 name_list が不正
+  # @exception AlreadyBound name <c_n> にすでに何らかの object がバインド
+  #            されている。
+  # @else
+  #
+  # @brief
+  #
+  # @endif
+  def bindRecursive(self, context, name_list, obj):
+    length = len(name_list)
+    cxt = context
+    for i in range(length):
+      if i == length -1:
+        try:
+          cxt.bind(self.subName(name_list, i, i), obj)
+        except CosNaming.NamingContext.AlreadyBound:
+          cxt.rebind(self.subName(name_list, i, i), obj)
+        return
+      else:
+        if self.objIsNamingContext(cxt):
+          cxt = self.bindOrResolveContext(cxt,self.subName(name_list, i, i))
+        else:
+          raise CosNaming.NamingContext.CannotProceed(cxt, self.subName(name_list, i))
+    return
+
+
+  ##
+  # @if jp
+  #
+  # @brief Object を rebind する
+  #
+  # name_list で指定された Binding がすでに存在する場合を除いて bind() と同じ
+  # である。バインディングがすでに存在する場合には、新しいバインディングに
+  # 置き換えられる。
+  #
+  # @param self
+  # @param name_list オブジェクトに付ける名前の NameComponent
+  # @param obj 関連付けられるオブジェクト
+  # @param force trueの場合、途中のコンテキストを強制的にバインドする
+  #              (デフォルト値:true)
+  #
+  # @exception NotFound 途中の <c_1, c_2, ..., c_(n-1)> が存在しない。
+  # @exception CannotProceed 何らかの理由で処理を継続できない。
+  # @exception InvalidName 名前 name_list が不正
+  #
+  # @else
+  #
+  # @brief
+  #
+  # @endif
+  def rebind(self, name_list, obj, force=True):
+    if force is None:
+      force = True
+      
+    try:
+      self._rootContext.rebind(name_list, obj)
+
+    except CosNaming.NamingContext.NotFound:
+      if force:
+        self.rebindRecursive(self._rootContext, name_list, obj)
+      else:
+        self.__print_exception()
+        raise
+
+    except CosNaming.NamingContext.CannotProceed, err:
+      if force:
+        self.rebindRecursive(err.cxt, err,rest_of_name, obj)
+      else:
+        self.__print_exception()
+        raise
+      
+    return
+
+
+  ##
+  # @if jp
+  #
+  # @brief Object を rebind する
+  #
+  # Object を rebind する際に与える名前が文字列表現であること以外は rebind()
+  # と同じである。rebind(toName(string_name), obj) と等価。
+  #
+  # @param self
+  # @param string_name オブジェクトに付ける名前の文字列表現
+  # @param obj 関連付けられるオブジェクト
+  # @param force trueの場合、途中のコンテキストを強制的にバインドする
+  #              (デフォルト値:true)
+  #
+  # @exception NotFound 途中の <c_1, c_2, ..., c_(n-1)> が存在しない。
+  # @exception CannotProceed 何らかの理由で処理を継続できない。
+  # @exception InvalidName 引数 string_name の名前が不正。
+  #
+  # @else
+  #
+  # @brief
+  #
+  # @endif
+  def rebindByString(self, string_name, obj, force=True):
+    self.rebind(self.toName(string_name), obj, force)
+
+    return
+
+
+  ##
+  # @if jp
+  #
+  # @brief 途中のコンテキストを bind しながら Object を rebind する
+  #
+  # name_list <c_n> で指定された NamingContext もしくは Object がすでに存在する
+  # 場合を除いて bindRecursive() と同じである。
+  #
+  # name_list <c_n> で指定されたバインディングがすでに存在する場合には、
+  # 新しいバインディングに置き換えられる。
+  #
+  # @param self
+  # @param context bind を開始する NamingContext
+  # @param name_list オブジェクトに付ける名前の NameComponent
+  # @param obj 関連付けられるオブジェクト
+  #
+  # @exception CannotProceed 途中のコンテキストが解決できない。
+  # @exception InvalidName 与えられた name_list が不正。
+  #
+  # @else
+  #
+  # @brief
+  #
+  # @endif
+  def rebindRecursive(self, context, name_list, obj):
+    length = len(name_list)
+    for i in range(length):
+      if i == length - 1:
+        context.rebind(self.subName(name_list, i, i), obj)
+        return
+      else:
+        if self.objIsNamingContext(context):
+          try:
+            context = context.bind_new_context(self.subName(name_list, i, i))
+          except CosNaming.NamingContext.AlreadyBound:
+            obj_ = context.resolve(self.subName(name_list, i, i))
+            context = obj_._narrow(CosNaming.NamingContext)
+        else:
+          raise CosNaming.NamingContext.CannotProceed(context, self.subName(name_list, i))
+    return
+
+
+  ##
+  # @if jp
+  #
+  # @brief NamingContext を bind する
+  #
+  # bind 対象として指定された引数 name が文字列の場合は bindByString() と、
+  # それ以外の場合は bind() と同じである。
+  #
+  # @param self
+  # @param name オブジェクトに付ける名前
+  # @param name_cxt 関連付けられる NamingContext
+  # @param force trueの場合、途中のコンテキストを強制的にバインドする
+  #              (デフォルト値:True)
+  #
+  # @exception NotFound 途中の <c_1, c_2, ..., c_(n-1)> が存在しない。
+  # @exception CannotProceed 何らかの理由で処理を継続できない。
+  # @exception InvalidName 引数 name の名前が不正。
+  # @exception AlreadyBound name <c_n> の Object がすでにバインドされている。
+  #
+  # @else
+  #
+  # @brief
+  #
+  # @endif
+  def bindContext(self, name, name_cxt, force=True):
+    if isinstance(name, basestring):
+      self.bind(self.toName(name), name_cxt, force)
+    else:
+      self.bind(name, name_cxt, force)
+    return
+
+
+  ##
+  # @if jp
+  #
+  # @brief NamingContext を bind する
+  #
+  # bind されるオブジェクトが NamingContext であることを除いて
+  # bindRecursive() と同じである。
+  #
+  # @param self
+  # @param context bind を開始する NamingContext
+  # @param name_list オブジェクトに付ける名前のネームコンポーネント
+  # @param name_cxt 関連付けられる NamingContext
+  #
+  # @else
+  #
+  # @brief
+  #
+  # @endif
+  def bindContextRecursive(self, context, name_list, name_cxt):
+    self.bindRecursive(context, name_list, name_cxt)
+    return
+
+
+  ##
+  # @if jp
+  #
+  # @brief NamingContext を rebind する
+  #
+  # bind 対象として指定された引数 name が文字列の場合は rebindByString() と、
+  # それ以外の場合は rebind() と同じである。
+  # どちらの場合もバインディングがすでに存在する場合には、
+  # 新しいバインディングに置き換えられる。
+  #
+  # @param self
+  # @param name オブジェクトに付ける名前のネームコンポーネント
+  # @param name_cxt 関連付けられる NamingContext
+  # @param force trueの場合、途中のコンテキストを強制的にバインドする
+  #              (デフォルト値:true)
+  #
+  # @exception NotFound 途中の <c_1, c_2, ..., c_(n-1)> が存在しない。
+  # @exception CannotProceed 何らかの理由で処理を継続できない。
+  # @exception InvalidName 引数 name の名前が不正。
+  #
+  # @else
+  #
+  # @endif
+  def rebindContext(self, name, name_cxt, force=True):
+    if isinstance(name, basestring):
+      self.rebind(self.toName(name), name_cxt, force)
+    else:
+      self.rebind(name, name_cxt, force)
+    return
+
+
+  ##
+  # @if jp
+  #
+  # @brief 途中のコンテキストを再帰的に rebind し NamingContext を rebind する    #
+  # bind されるオブジェクトが NamingContext であることを除いて
+  # rebindRecursive() と同じである。
+  #
+  # @param self
+  # @param context bind を開始する NamingContext
+  # @param name_list オブジェクトに付ける名前の NameComponent
+  # @param name_cxt 関連付けられる NamingContext
+  #
+  # @else
+  #
+  # @brief
+  #
+  # @endif
+  def rebindContextRecursive(self, context, name_list, name_cxt):
+    self.rebindRecursive(context, name_list, name_cxt)
+    return
+
+
+  ##
+  # @if jp
+  #
+  # @brief Object を name から解決する
+  #
+  # name に bind されているオブジェクト参照を返す。
+  # ネームコンポーネント <c_1, c_2, ... c_n> は再帰的に解決される。
+  # 
+  # 引数 name に与えられた値が文字列の場合にはまず最初に toName() によって
+  # NameComponent に変換される。
+  # 
+  # CosNaming::resolve() とほぼ同等の働きをするが、常に与えられた
+  # ネームサーバのルートコンテキストに対して resolve() が呼び出される点が
+  # 異なる。
+  #
+  # @param self
+  # @param name 解決すべきオブジェクトの名前のネームコンポーネント
+  #
+  # @return 解決されたオブジェクト参照
+  #
+  # @exception NotFound 途中の <c_1, c_2, ..., c_(n-1)> が存在しない。
+  # @exception CannotProceed 何らかの理由で処理を継続できない。
+  # @exception InvalidName 引数 name の名前が不正。
+  #
+  # @else
+  #
+  # @endif
+  def resolve(self, name):
+    if isinstance(name, basestring):
+      name_ = self.toName(name)
+    else:
+      name_ = name
+      
+    try:
+      obj = self._rootContext.resolve(name_)
+      return obj
+    except CosNaming.NamingContext.NotFound, ex:
+      self.__print_exception()
+      return None
+
+
+  ##
+  # @if jp
+  #
+  # @brief 指定された名前のオブジェクトの bind を解除する
+  #
+  # name に bind されているオブジェクト参照を解除する。
+  # ネームコンポーネント <c_1, c_2, ... c_n> は再帰的に解決される。
+  # 
+  # 引数 name に与えられた値が文字列の場合にはまず最初に toName() によって
+  # NameComponent に変換される。
+  # 
+  # CosNaming::unbind() とほぼ同等の働きをするが、常に与えられた
+  # ネームサーバのルートコンテキストに対して unbind() が呼び出される点が
+  # 異なる。
+  #
+  # @param self
+  # @param name 削除するオブジェクトのネームコンポーネント
+  #
+  # @exception NotFound 途中の <c_1, c_2, ..., c_(n-1)> が存在しない。
+  # @exception CannotProceed 何らかの理由で処理を継続できない。
+  # @exception InvalidName 引数 name の名前が不正。
+  #
+  # @else
+  #
+  # @endif
+  # void unbind(const CosNaming::Name& name)
+  #   throw(NotFound, CannotProceed, InvalidName);
+  def unbind(self, name):
+    if isinstance(name, basestring):
+      name_ = self.toName(name)
+    else:
+      name_ = name
+
+    try:
+      self._rootContext.unbind(name_)
+    except:
+      self.__print_exception()
+
+    return
+
+
+  ##
+  # @if jp
+  #
+  # @brief 新しいコンテキストを生成する
+  #
+  # 与えられたネームサーバ上で生成された NamingContext を返す。
+  # 返された NamingContext は bind されていない。
+  # 
+  # @param self
+  # 
+  # @return 生成された新しい NamingContext
+  #
+  # @else
+  #
+  # @endif
+  def newContext(self):
+    return self._rootContext.new_context()
+
+
+  ##
+  # @if jp
+  #
+  # @brief 新しいコンテキストを bind する
+  #
+  # 与えられた name に対して新しいコンテキストをバインドする。
+  # 生成された NamingContext はネームサーバ上で生成されたものである。
+  # 
+  # 引数 name に与えられた値が文字列の場合にはまず最初に toName() によって
+  # NameComponent に変換される。
+  # 
+  # @param self
+  # @param name NamingContextに付ける名前のネームコンポーネント
+  # @param force trueの場合、途中のコンテキストを強制的にバインドする
+  #              (デフォルト値:true)
+  #
+  # @return 生成された新しい NamingContext
+  #
+  # @exception NotFound 途中の <c_1, c_2, ..., c_(n-1)> が存在しない。
+  # @exception CannotProceed 何らかの理由で処理を継続できない。
+  # @exception InvalidName 引数 name の名前が不正。
+  # @exception AlreadyBound name <n> の Object がすでにバインドされている。
+  #
+  # @else
+  #
+  # @endif
+  def bindNewContext(self, name, force=True):
+    if force is None:
+      force = True
+      
+    if isinstance(name, basestring):
+      name_ = self.toName(name)
+    else:
+      name_ = name
+
+    try:
+      return self._rootContext.bind_new_context(name_)
+    except CosNaming.NamingContext.NotFound:
+      if force:
+        self.bindRecursive(self._rootContext, name_, self.newContext())
+      else:
+        self.__print_exception()
+        raise
+    except CosNaming.NamingContext.CannotProceed, err:
+      if force:
+        self.bindRecursive(err.cxt, err.rest_of_name, self.newContext())
+      else:
+        self.__print_exception()
+        raise
+    return None
+
+
+  ##
+  # @if jp
+  #
+  # @brief NamingContext を非アクティブ化する
+  #
+  # context で指定された NamingContext を非アクティブ化する。
+  # context に他のコンテキストがバインドされている場合は NotEmpty 例外が
+  # 発生する。
+  # 
+  # @param self
+  # @param context 非アクティブ化する NamingContext
+  #
+  # @exception NotEmpty 対象context に他のコンテキストがバインドされている。
+  #
+  # @else
+  #
+  # @else
+  #
+  # @brief Destroy the naming context
+  #
+  # Delete the specified naming context.
+  # any bindings should be <unbind> in which the given context is bound to
+  # some names before invoking <destroy> operation on it. 
+  #
+  # @param context NamingContext which is destroied.
+  #     
+  # @exception NotEmpty 
+  #
+  # @else
+  #
+  # @endif
+  def destroy(self, context):
+    context.destroy()
+
+
+  ##
+  # @if jp
+  # @brief NamingContext を再帰的に下って非アクティブ化する
+  #
+  # context で与えられた NamingContext に対して、name で指定された
+  # ネームコンポーネント <c_1, ... c_(n-1)> を NamingContext として
+  # 解決しながら、名前 <c_n> に対して 非アクティブ化を行う。
+  #
+  # @param self
+  # @param context 非アクティブ化する NamingContext
+  #
+  # @exception NotEmpty 対象context に他のコンテキストがバインドされている。
+  # @exception NotFound 途中の <c_1, c_2, ..., c_(n-1)> が存在しない。
+  # @exception CannotProceed 何らかの理由で処理を継続できない。
+  # @exception InvalidName 引数 name の名前が不正。
+  #
+  # @else
+  # @brief Destroy the naming context recursively
+  # @endif
+  def destroyRecursive(self, context):
+    cont = True
+    bl = []
+    bi = 0
+    bl, bi = context.list(self._blLength)
+    while cont:
+      for i in range(len(bl)):
+        if bl[i].binding_type == CosNaming.ncontext:
+          obj = context.resolve(bl[i].binding_name)
+          next_context = obj._narrow(CosNaming.NamingContext)
+
+          self.destroyRecursive(next_context)
+          context.unbind(bl[i].binding_name)
+          next_context.destroy()
+        elif bl[i].binding_type == CosNaming.nobject:
+          context.unbind(bl[i].binding_name)
+        else:
+          assert(0)
+      if CORBA.is_nil(bi):
+        cont = False
+      else:
+        bi.next_n(self._blLength, bl)
+
+    if not (CORBA.is_nil(bi)):
+      bi.destroy()
+    return
+
+
+  ##
+  # @if jp
+  # @brief すべての Binding を削除する
+  #
+  # 登録されている全てのBinding を削除する。
+  #
+  # @param self
+  #
+  # @else
+  # @brief Destroy all binding
+  # @endif
+  def clearAll(self):
+    self.destroyRecursive(self._rootContext)
+    return
+
+
+  ##
+  # @if jp
+  # @brief 与えられた NamingContext の Binding を取得する
+  #
+  # 指定された NamingContext の Binding を取得する。
+  #
+  # @param self
+  # @param name_cxt Binding 取得対象 NamingContext
+  # @param how_many Binding を取得する階層の深さ
+  # @param rbl 取得した Binding を保持するホルダ
+  # @param rbi 取得した Binding をたどるためのイテレータ
+  #
+  # @else
+  # @endif
+  def list(self, name_cxt, how_many, rbl, rbi):
+    bl, bi = name_cxt.list(how_many)
+
+    for i in bl:
+      rbl.append(bl)
+
+    rbi.append(bi)
+  
+
+  #============================================================
+  # interface of NamingContext
+  #============================================================
+
+  ##
+  # @if jp
+  # @brief 与えられた NameComponent の文字列表現を返す
+  #
+  # 指定された NameComponent を文字に変換する。
+  #
+  # @param self
+  # @param name_list 変換対象 NameComponent
+  #
+  # @return 文字列変換結果
+  #
+  # @exception InvalidName 引数 name_list の名前が不正。
+  #
+  # @else
+  # @brief Get string representation of given NameComponent
+  # @endif
+  def toString(self, name_list):
+    if len(name_list) == 0:
+      raise CosNaming.NamingContext.InvalidName
+
+    slen = self.getNameLength(name_list)
+    string_name = [""]
+    self.nameToString(name_list, string_name, slen)
+
+    return string_name[0]
+
+
+  ##
+  # @if jp
+  # @brief 与えられた文字列表現を NameComponent に分解する
+  #
+  # 指定された文字列を NameComponent に変換する。
+  #
+  # @param self
+  # @param sname 変換対象文字列
+  #
+  # @return NameComponent 変換結果
+  #
+  # @exception InvalidName 引数 sname が不正。
+  #
+  # @else
+  # @brief Get NameComponent from gien string name representation
+  # @endif
+  def toName(self, sname):
+    if not sname:
+      raise CosNaming.NamingContext.InvalidName
+
+    string_name = sname
+    name_comps = []
+
+    nc_length = 0
+    nc_length = self.split(string_name, "/", name_comps)
+
+    if not (nc_length > 0):
+      raise CosNaming.NamingContext.InvalidName
+
+    name_list = [CosNaming.NameComponent("","") for i in range(nc_length)]
+
+    for i in range(nc_length):
+      pos = str.rfind(name_comps[i][0:],".")
+      if pos == -1:
+        name_list[i].id   = name_comps[i]
+        name_list[i].kind = ""
+      else:
+        name_list[i].id   = name_comps[i][0:pos]
+        name_list[i].kind = name_comps[i][(pos+1):]
+
+    return name_list
+
+
+  ##
+  # @if jp
+  # @brief 与えられた addr と string_name から URL表現を取得する
+  #
+  # 指定されたアドレスと名称をURLに変換する。
+  #
+  # @param self
+  # @param addr 変換対象アドレス
+  # @param string_name 変換対象名称
+  #
+  # @return URL 変換結果
+  #
+  # @exception InvalidAddress 引数 addr が不正。
+  # @exception InvalidName 引数 string_name が不正。
+  #
+  # @else
+  # @brief Get URL representation from given addr and string_name
+  # @endif
+  def toUrl(self, addr, string_name):
+    return self._rootContext.to_url(addr, string_name)
+
+
+  ##
+  # @if jp
+  # @brief 与えられた文字列表現を resolve しオブジェクトを返す
+  #
+  # 指定された文字列表現をresolveし,オブジェクトを取得する。
+  #
+  # @param self
+  # @param string_name 取得対象オブジェクト文字列表現
+  #
+  # @return 解決されたオブジェクト
+  #
+  # @exception NotFound 途中の <c_1, c_2, ..., c_(n-1)> が存在しない。
+  # @exception CannotProceed 何らかの理由で処理を継続できない。
+  # @exception InvalidName 引数 name の名前が不正。
+  # @exception AlreadyBound name <n> の Object がすでにバインドされている。
+  #
+  # @else
+  # @brief Resolve from name of string representation and get object 
+  # @endif
+  def resolveStr(self, string_name):
+    return self.resolve(self.toName(string_name))
+
+
+  #============================================================
+  # Find functions
+  #============================================================
+
+  ##
+  # @if jp
+  #
+  # @brief オブジェクトの名前をバインドまたは解決する
+  #
+  # 指定されたコンテキストに対してオブジェクトを NameComponent で指定された
+  # 位置にバインドする。
+  # 同一箇所に既に他の要素がバインド済みの場合は、既存のバインド済み要素を
+  # 取得する。
+  #
+  # @param self
+  # @param context bind もしくは resole 対象コンテキスト
+  # @param name_list オブジェクトに付ける名前の NameComponent
+  # @param obj 関連付けられる Object
+  #
+  # @return NameComponent で指定された位置にバインドされているオブジェクト
+  #
+  # @else
+  # @brief Bind of resolve the given name component
+  # @endif
+  def bindOrResolve(self, context, name_list, obj):
+    try:
+      context.bind_context(name_list, obj)
+      return obj
+    except CosNaming.NamingContext.AlreadyBound:
+      obj = context.resolve(name_list)
+      return obj
+    return CORBA.Object._nil
+
+
+  ##
+  # @if jp
+  #
+  # @brief コンテキストの名前をバインドまたは解決する
+  #
+  # 指定されたコンテキストに対して Contextを NameComponent で指定された位置に
+  # バインドする。
+  # Context が空の場合は新規コンテキストを生成してバインドする。
+  # 同一箇所に既に他の要素がバインド済みの場合は、既存のバインド済み要素を
+  # 取得する。
+  #
+  # @param self
+  # @param context bind もしくは resole 対象コンテキスト
+  # @param name_list コンテキストに付ける名前の NameComponent
+  # @param new_context 関連付けられる Context(デフォルト値:None)
+  #
+  # @return NameComponent で指定された位置にバインドされているContext
+  #
+  # @else
+  # @brief Bind of resolve the given name component
+  # @endif
+  def bindOrResolveContext(self, context, name_list, new_context=None):
+    if new_context is None:
+      new_cxt = self.newContext()
+    else:
+      new_cxt = new_context
+
+    obj = self.bindOrResolve(context, name_list, new_cxt)
+    return obj._narrow(CosNaming.NamingContext)
+
+
+  ##
+  # @if jp
+  # @brief ネームサーバの名前を取得する
+  #
+  # 設定したネームサーバの名前を取得する。
+  #
+  # @param self
+  #
+  # @return ネームサーバの名前
+  #
+  # @else
+  # @brief Get the name of naming server
+  # @endif
+  def getNameServer(self):
+    return self._nameServer
+
+
+  ##
+  # @if jp
+  # @brief ルートコンテキストを取得する
+  #
+  # 設定したネームサーバのルートコンテキストを取得する。
+  #
+  # @param self
+  #
+  # @return ネームサーバのルートコンテキスト
+  #
+  # @else
+  # @brief Get the root context
+  # @endif
+  def getRootContext(self):
+    return self._rootContext
+
+
+  ##
+  # @if jp
+  # @brief オブジェクトがネーミングコンテキストか判別する
+  #
+  # 指定した要素がネーミングコンテキストか判別する
+  #
+  # @param self
+  # @param obj 判別対象要素
+  #
+  # @return 判別結果(ネーミングコンテキスト:true、それ以外:false)
+  #
+  # @else
+  # @brief Whether the object is NamingContext
+  # @endif
+  def objIsNamingContext(self, obj):
+    nc = obj._narrow(CosNaming.NamingContext)
+    if CORBA.is_nil(nc):
+      return False
+    else:
+      return True
+
+
+  ##
+  # @if jp
+  # @brief 与えられた名前がネーミングコンテキストかどうか判別する
+  #
+  # NameComponent もしくは文字列で指定した要素がネーミングコンテキストか
+  # 判別する
+  #
+  # @param self
+  # @param name_list 判別対象
+  #
+  # @return 判別結果(ネーミングコンテキスト:true、それ以外:false)
+  #
+  # @else
+  # @brief Whether the given name component is NamingContext
+  # @endif
+  def nameIsNamingContext(self, name_list):
+    return self.objIsNamingContext(self.resolve(name_list))
+
+
+  ##
+  # @if jp
+  # @brief ネームコンポーネントの部分を返す
+  #
+  # 指定された範囲のネームコンポーネントを取得する。
+  # 終了位置が指定されていない場合は、最後の要素を除いたネームコンポーネント
+  # を返す。
+  #
+  # @param self
+  # @param name_list 検索対象NameComponent
+  # @param begin 取得範囲開始位置
+  # @param end 取得範囲終了位置(デフォルト値:None)
+  #
+  # @return NameComponent 取得結果
+  #
+  # @else
+  # @brief Get subset of given name component
+  # @endif
+  def subName(self, name_list, begin, end = None):
+    if end is None or end < 0:
+      end = len(name_list) - 1
+
+    sub_len = end - (begin -1)
+    objId = ""
+    kind  = ""
+    
+    sub_name = []
+    for i in range(sub_len):
+      sub_name.append(name_list[begin + i])
+
+    return sub_name
+
+
+  ##
+  # @if jp
+  # @brief ネームコンポーネントの文字列表現を取得する
+  #
+  # 指定した範囲のネームコンポーネントの文字列表現を取得する。
+  # 文字列表現は、NameComponentの構成が{Nc[0],Nc[1],Nc[2]・・・}の場合、
+  #   Nc[0]id.Nc[0].kind/Nc[1]id.Nc[1].kind/Nc[2].id/Nc[2].kind・・・
+  # という形式で取得できる。
+  # 取得した文字列の長さが指定した長さ以上の場合は、
+  # 指定した長さで切り捨てられる。
+  #
+  # @param self
+  # @param name_list 取得対象NameComponent
+  # @param string_name 取得結果文字列
+  # @param slen 取得対象文字列最大値
+  #
+  # @else
+  # @brief Get string representation of name component
+  # @endif
+  def nameToString(self, name_list, string_name, slen):
+    for i in range(len(name_list)):
+      for id_ in name_list[i].id:
+        if id_ == "/" or id_ == "." or id_ == "\\":
+          string_name[0] += "\\"
+        string_name[0] += id_
+
+      if name_list[i].id == "" or name_list[i].kind != "":
+        string_name[0] += "."
+
+      for kind_ in name_list[i].kind:
+        if kind_ == "/" or kind_ == "." or kind_ == "\\":
+          string_name[0] += "\\"
+        string_name[0] += kind_
+
+      string_name[0] += "/"
+
+
+  ##
+  # @if jp
+  # @brief ネームコンポーネントの文字列表現時の文字長を取得する
+  #
+  # 指定したネームコンポーネントを文字列で表現した場合の長さを取得する。
+  # 文字列表現は、NameComponentの構成が{Nc[0],Nc[1],Nc[2]・・・}の場合、
+  #   Nc[0]id.Nc[0].kind/Nc[1]id.Nc[1].kind/Nc[2].id/Nc[2].kind・・・
+  # という形式で取得できる。
+  #
+  # @param self
+  # @param name_list 取得対象NameComponent
+  #
+  # @return 指定したネームコンポーネントの文字列長さ
+  #
+  # @else
+  # @brief Get string length of the name component's string representation
+  # @endif
+  def getNameLength(self, name_list):
+    slen = 0
+
+    for i in range(len(name_list)):
+      for id_ in name_list[i].id:
+        if id_ == "/" or id_ == "." or id_ == "\\":
+          slen += 1
+        slen += 1
+      if name_list[i].id == "" or name_list[i].kind == "":
+        slen += 1
+
+      for kind_ in name_list[i].kind:
+        if kind_ == "/" or kind_ == "." or kind_ == "\\":
+          slen += 1
+        slen += 1
+
+      slen += 1
+
+    return slen
+
+
+  ##
+  # @if jp
+  # @brief 文字列の分割
+  #
+  # 文字列を指定したデリミタで分割する。
+  #
+  # @param self
+  # @param input 分割対象文字列
+  # @param delimiter 分割用デリミタ
+  # @param results 分割結果
+  #
+  # @return 分割した文字列の要素数
+  #
+  # @else
+  # @brief Split of string
+  # @endif
+  def split(self, input, delimiter, results):
+    delim_size = len(delimiter)
+    found_pos = 0
+    begin_pos = 0
+    pre_pos = 0
+    substr_size = 0
+
+    if input[0:delim_size] == delimiter:
+      begin_pos = delim_size
+      pre_pos = delim_size
+
+    while 1:
+      found_pos = str.find(input[begin_pos:],delimiter)
+      if found_pos == -1:
+        results.append(input[pre_pos:])
+        break
+
+      if found_pos > 0 and input[found_pos + begin_pos - 1] == "\\":
+        begin_pos += found_pos + delim_size
+      else:
+        substr_size = found_pos + (begin_pos - pre_pos)
+        if substr_size > 0:
+          results.append(input[pre_pos:(pre_pos+substr_size)])
+        begin_pos += found_pos + delim_size
+        pre_pos   = begin_pos
+
+    return len(results)
+
+
+  ##
+  # @if jp
+  #
+  # @brief 例外情報出力
+  #  例外情報を出力する。
+  #
+  # @else
+  #
+  # @brief Print exception information 
+  #  Print exception information 
+  # @endif
+  def __print_exception(self):
+    if sys.version_info[0:3] >= (2, 4, 0):
+      print(traceback.format_exc())
+    else:
+      _exc_list = traceback.format_exception(*sys.exc_info())
+      _exc_str = "".join(_exc_list)
+      print(_exc_str)
+
+    return

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/__init__.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/__init__.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/__init__.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1 @@
+# Empty file

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/autotestin.conf
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/autotestin.conf	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/autotestin.conf	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,4 @@
+port.inport.in.buffer.length: 1
+port.inport.seqin.buffer.length: 1
+port.inport.in.buffer.write.full_policy: overwrite
+port.inport.seqin.buffer.write.full_policy: overwrite

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/autotestout.conf
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/autotestout.conf	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/autotestout.conf	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1 @@
+exec_cxt.periodic.rate: 10

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/gen_data.bat
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/gen_data.bat	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/gen_data.bat	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,6 @@
+for /L %%i in (0,1,15) do (
+	echo %%i>>original-data
+	echo %RANDOM% %RANDOM% %RANDOM% %RANDOM% %RANDOM%>>original-data
+	echo message%%i>>original-data
+	echo.>>original-data
+)

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/gen_data.sh
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/gen_data.sh	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/gen_data.sh	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,2 @@
+#!/bin/sh
+awk 'BEGIN{for(i=0;i<16;++i){printf("%.6f\n%.6f %.6f %.6f %.6f %.6f\nmessage%d\n",i,rand(),rand(),rand(),rand(),rand(),i);}}' > original-data

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/rtc.conf
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/rtc.conf	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/rtc.conf	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,6 @@
+corba.nameservers:localhost:2809
+naming.formats: %n.rtc
+logger.enable: NO
+logger.log_level:TRACE
+example.AutoTestOut.config_file: autotestout.conf
+example.AutoTestIn.config_file: autotestin.conf

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/rtc_handle.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/rtc_handle.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/rtc_handle.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,365 @@
+#/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+from omniORB import CORBA, URI
+from omniORB import any
+
+import OpenRTM_aist
+import RTC
+
+
+from CorbaNaming import *
+import SDOPackage
+
+# class RtmEnv :
+#       rtm environment manager
+#       orb, naming service, rtc proxy list
+#
+class RtmEnv : 
+
+    def __init__(self, orb_args, nserver_names=["localhost"], 
+                                     orb=None, naming=None):
+        if not orb :
+            orb = CORBA.ORB_init(orb_args)
+        self.orb = orb
+        self.name_space = {}
+        if naming : # naming can specify only one naming service
+            self.name_space['default']=NameSpace(orb, naming=naming)
+        else :
+            for ns in nserver_names :
+              self.name_space[ns]=NameSpace(orb, server_name=ns)
+
+    def __del__(self):
+        self.orb.shutdown(wait_for_completion=CORBA.FALSE)
+        self.orb.destroy()
+#
+# class NameSpace :
+#       rtc_handles and object list in naming service
+#
+class NameSpace :
+    def __init__(self, orb, server_name=None, naming=None):
+        self.orb = orb
+        self.name = server_name
+        if naming :
+          self.naming = naming
+        else :
+          self.naming = CorbaNaming(self.orb, server_name) 
+
+        self.b_len = 10 # iteration cut off no.
+        self.rtc_handles = {}
+        self.obj_list = {}
+
+    def get_object_by_name(self, name, cl=RTC.RTObject):
+        ref = self.naming.resolveStr(name)
+        if ref is None: return None     # return CORBA.nil ?
+        if cl :
+            return ref._narrow(cl)
+        else :
+            return ref
+
+    def list_obj(self) :
+        self.rtc_handes = {}
+        self.obj_list = {}
+        return self.list_obj1(self.naming._rootContext, "")
+
+    def list_obj1(self, name_context, parent) :
+        if not name_context :
+            name_context = self.naming._rootContext 
+        rslt = []
+        b_list = name_context.list(self.b_len)
+        for bd in b_list[0] :
+            rslt = rslt + self.proc_bd(bd, name_context, parent)
+        if b_list[1] :  # iterator : there exists remaining.
+            t_list = b_list[1].next_n(self.b_len)
+            while t_list[0] :
+                for bd in t_list[1] :
+                    rslt = rslt + self.proc_bd(bd, name_context, parent)
+                t_list = b_list[1].next_n(self.b_len)
+        return rslt
+
+    def proc_bd(self, bd, name_context, parent) :
+#        print('-------------------------------------------------------------------')
+#        print('bd= ', bd)
+#        print('name_context= ', name_context)
+#        print('parent= ', parent)
+        rslt = []
+        pre = ""
+        if parent :
+            pre = parent + "/"
+        nam = pre + URI.nameToString(bd.binding_name)
+        if bd.binding_type == CosNaming.nobject :
+            tmp = name_context.resolve(bd.binding_name)
+            self.obj_list[nam]=tmp
+            print('objcet '+nam+' was listed.')
+            try :
+                tmp = tmp._narrow(RTC.RTObject)
+            except :
+                print(nam+' is not RTC.')
+                tmp = None
+            try :
+                if tmp :
+                   rslt = [[nam, tmp]]
+                   self.rtc_handles[nam]=RtcHandle(nam,self,tmp)
+                   print('handle for '+nam+' was created.')
+                else :
+                   pass
+            except :
+                print(nam+' is not alive.')
+                pass
+        else :
+            tmp = name_context.resolve(bd.binding_name)
+            tmp = tmp._narrow(CosNaming.NamingContext)
+            rslt = self.list_obj1(tmp, nam)
+        return rslt
+
+#
+# data conversion
+#
+def nvlist2dict(nvlist) :
+    rslt = {}
+    for tmp in nvlist :
+        rslt[tmp.name]=tmp.value.value()   # nv.value and any.value()
+    return rslt
+def dict2nvlist(dict) :
+    rslt = []
+    for tmp in dict.keys() :
+        rslt.append(SDOPackage.NameValue(tmp, any.to_any(dict[tmp])))
+    return rslt
+#
+#  connector, port, inport, outport, service
+#                
+
+class Connector :
+    def __init__(self, plist, name = None, id="", prop_dict={}) :
+       self.plist = plist
+       self.port_reflist = [tmp.port_profile.port_ref for tmp in plist]
+       if name :
+           self.name = name
+       else :
+           self.name = string.join([tmp.name for tmp in plist],'_')
+       self.prop_dict = prop_dict
+       self.prop_nvlist = dict2nvlist(self.prop_dict)
+       self.profile = RTC.ConnectorProfile(self.name, id, self.port_reflist, self.prop_nvlist)
+       self.nego_prop()
+
+    def nego_prop(self) :
+       self.possible = True
+       for kk in self.def_prop :
+           if kk in self.prop_dict :
+               if not self.prop_dict[kk] :
+                   self.prop_dict[kk]=self.def_prop[kk]
+           else :
+                self.prop_dict[kk]=self.def_prop[kk]
+           for pp in self.plist :  
+               if not ((self.prop_dict[kk] in pp.prop[kk]) or 
+                                 ('Any' in    pp.prop[kk])) :
+                   self.prop_dict[kk] = ""
+                   self.possible = False
+       self.prop_nvlist = dict2nvlist(self.prop_dict)
+       self.profile.properties = self.prop_nvlist
+       return self.possible
+
+    def connect(self) :
+#
+#   out and inout parameters are retuned as a tuple   
+#
+       ret, self.profile = self.port_reflist[0].connect(self.profile)
+       self.prop_nvlist = self.profile.properties
+       self.prop_dict = nvlist2dict(self.prop_nvlist)
+       return ret
+
+    def disconnect(self) :
+       ret = self.port_reflist[0].disconnect(self.profile.connector_id)
+       return ret
+
+class IOConnector(Connector) :
+    def __init__(self, plist, name = None, id="", prop_dict={}) :
+#      self.def_prop = {'dataport.dataflow_type':'Push' ,
+#                       'dataport.interface_type':'CORBA_Any' ,
+#                       'dataport.subscription_type':'Flush'}
+       self.def_prop = {'dataport.dataflow_type':'push' ,
+                        'dataport.interface_type':'corba_cdr' ,
+                        'dataport.subscription_type':'flush'}
+       Connector.__init__(self, plist, name, id, prop_dict)
+
+class ServiceConnector(Connector) :
+    def __init__(self, plist, name = None, id="", prop_dict={}) :
+       self.def_prop = {'port.port_type':'CorbaPort' }
+       Connector.__init__(self, plist, name, id, prop_dict)
+
+
+class Port :
+    def __init__(self, profile,nv_dict=None) :
+        self.name=profile.name    
+        self.port_profile = profile
+        if not nv_dict :
+            nv_dict = nvlist2dict(profile.properties)
+        self.prop = nv_dict
+        self.con = None           # this must be set in each subclasses
+    def get_info(self) :
+        self.con.connect()
+        tmp1 = self.get_connections()
+        tmp2 = [pp.connector_id for pp in tmp1]
+        if self.con.profile.connector_id in tmp2 :
+            self.con.disconnect()
+
+    def get_connections(self) :
+        return self.port_profile.port_ref.get_connector_profiles()
+
+class CorbaServer :
+    def __init__(self, profile, port) :
+        self.profile = profile
+        self.port = port
+        self.name = profile.instance_name
+        self.type = profile.type_name
+        self.ref = None
+        ref_key = 'port.' + self.type + '.' + self.name
+        self.ref=self.port.con.prop_dict[ref_key]
+#
+# if we import stubs before we create instances,
+# we rarely need to narrow the object references.
+# we need to specify global symbol table to evaluate class symbols.
+#
+    def narrow_ref(self, gls) :
+        if self.type.find('::') == -1 :
+            self.narrow_sym = eval('_GlobalIDL.' + self.type, gls)
+        else :
+            self.narrow_sym = eval(self.type.replace('::','.'), gls)
+        self.ref = self.ref._narrow(self.narrow_sym)
+
+class CorbaClient :
+    def __init__(self, profile) :
+        self.profile = profile
+        self.name = profile.instance_name
+        self.type = profile.type_name
+#
+# to connect to an outside corba client,
+# we need an implementation of the corresponding corba server.
+# but ....
+#
+
+class RtcService(Port) :
+    def __init__(self, profile,nv_dict=None) :
+        Port.__init__(self, profile, nv_dict)
+        self.con = ServiceConnector([self])
+        self.get_info()
+        self.provided={}
+        self.required={}
+        tmp = self.port_profile.interfaces
+        for itf in tmp :
+            if itf.polarity == RTC.PROVIDED :
+                self.provided[itf.instance_name] = CorbaServer(itf,self)
+            elif itf.polarity == RTC.REQUIRED :
+                self.required[itf.instance_name] = CorbaClient(itf)
+
+class RtcInport(Port) :
+    def __init__(self, profile, nv_dict=None) :
+        Port.__init__(self, profile, nv_dict)
+        self.con = IOConnector([self])
+        self.get_info() 
+#       self.ref = self.con.prop_dict['dataport.corba_any.inport_ref']
+        self.ref = self.con.prop_dict['dataport.corba_cdr.inport_ref']
+        self.data_class = eval('RTC.' + self.prop['dataport.data_type'])
+        self.data_tc = eval('RTC._tc_' + self.prop['dataport.data_type'])
+    def write(self,data) :
+        self.ref.put(CORBA.Any(self.data_tc,
+                         self.data_class(RTC.Time(0,0),data)))
+
+class RtcOutport(Port) :
+    def __init__(self, profile,nv_dict=None) :
+        Port.__init__(self, profile, nv_dict)
+        self.con = IOConnector([self])
+        self.get_info()
+        if 'dataport.corba_any.outport_ref' in self.con.prop_dict :
+           self.ref = self.con.prop_dict['dataport.corba_cdr.outport_ref']
+#          self.ref = self.con.prop_dict['dataport.corba_any.outport_ref']
+        else :
+           self.ref=None
+        self.data_class = eval('RTC.' + self.prop['dataport.data_type'])
+        self.data_tc = eval('RTC._tc_' + self.prop['dataport.data_type'])
+
+    def read(self) :
+        if self.ref :
+           return self.ref.get().value()
+        else :
+           print("not supported")
+           return None
+#
+# RtcHandle
+#
+class RtcHandle :
+  def __init__(self, name, env, ref=None) :
+    self.name = name
+    self.env = env
+    if ref :
+        self.rtc_ref = ref
+    else :
+        self.rtc_ref = env.naming.resolve(name)._narrow(RTC.RTObject)
+    self.conf_ref = None
+    self.retrieve_info()
+
+  def retrieve_info(self) :
+    self.conf_set={}
+    self.conf_set_data={}
+    self.port_refs = []
+    self.execution_contexts =[]
+    if self.rtc_ref :
+        self.conf_ref = self.rtc_ref.get_configuration()
+        conf_set = self.conf_ref.get_configuration_sets()
+        for cc in conf_set :
+            self.conf_set[cc.id]=cc
+            self.conf_set_data[cc.id]=nvlist2dict(cc.configuration_data)
+        self.profile = self.rtc_ref.get_component_profile()
+        self.prop = nvlist2dict(self.profile.properties)
+        #self.execution_contexts = self.rtc_ref.get_contexts()
+        self.execution_contexts = self.rtc_ref.get_owned_contexts()
+        self.port_refs = self.rtc_ref.get_ports()  
+    # this includes inports, outports and service ports
+    self.ports = {}
+    self.services = {}
+    self.inports = {}
+    self.outports = {}
+    for pp in self.port_refs :
+        tmp = pp.get_port_profile()
+        tmp_prop = nvlist2dict(tmp.properties)
+#       self.ports[tmp.name]=Port(tmp, tmp_prop)
+        if tmp_prop['port.port_type']=='DataInPort' :
+            self.inports[tmp.name]=RtcInport(tmp,tmp_prop)
+#            self.inports[tmp.name]=Port(tmp, tmp_prop)
+        elif tmp_prop['port.port_type']=='DataOutPort' :
+            self.outports[tmp.name]=RtcOutport(tmp, tmp_prop)
+#            self.outports[tmp.name]=Port(tmp, tmp_prop)
+        elif tmp_prop['port.port_type']=='CorbaPort' :
+            self.services[tmp.name]=RtcService(tmp, tmp_prop)
+#            self.services[tmp.name]=Port(tmp, tmp_prop)
+
+  def set_conf(self,conf_set_name,param_name,value) :
+      conf_set=self.conf_set[conf_set_name]
+      conf_set_data=self.conf_set_data[conf_set_name]
+      conf_set_data[param_name]=value
+      conf_set.configuration_data=dict2nvlist(conf_set_data)
+      self.conf_ref.set_configuration_set_values(conf_set_name,conf_set)
+  def set_conf_activate(self,conf_set_name,param_name,value) :
+      self.set_conf(conf_set_name,param_name,value)
+      self.conf_ref.activate_configuration_set(conf_set_name)
+  def activate(self):
+      return self.execution_contexts[0].activate_component(self.rtc_ref)
+  def deactivate(self):
+      return self.execution_contexts[0].deactivate_component(self.rtc_ref)
+#
+# pipe
+#  a pipe is an port (interface & implementation)
+#  whhich corresponds to an outside port interface.
+#  you can subscribe and communicate to the outside port with the pipe.
+#  you need an rtc implementation to use pipes.
+#
+class Pipe :
+    pass
+
+class PipeOut(Pipe):
+    def __init__(self, name, data_buf, size=8) :
+        self.name =  name
+        self.data =  data_buf
+        self.OpenRTM_aist.InPort(name,data_buf,OpenRTM_aist.RingBuffer(size))

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/rtc_handle10_11.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/rtc_handle10_11.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/AutoTest/rtc_handle10_11.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,483 @@
+#/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+from omniORB import CORBA, URI
+# from omniORB import any
+from omniORB import any, cdrMarshal, cdrUnmarshal
+
+import OpenRTM_aist
+import RTC
+
+
+from CorbaNaming import *
+import SDOPackage
+# from EmbryonicRtc import *
+
+# class RtmEnv :
+#       rtm environment manager
+#       orb, naming service, rtc proxy list
+#
+class RtmEnv : 
+
+    def __init__(self, orb_args, nserver_names=["localhost"], 
+                                     orb=None, naming=None):
+        if not orb :
+            orb = CORBA.ORB_init(orb_args)
+        self.orb = orb
+        self.name_space = {}
+        if naming : # naming can specify only one naming service
+            self.name_space['default']=NameSpace(orb, naming=naming)
+        else :
+            for ns in nserver_names :
+              self.name_space[ns]=NameSpace(orb, server_name=ns)
+
+    def __del__(self):
+        self.orb.shutdown(wait_for_completion=CORBA.FALSE)
+        self.orb.destroy()
+#
+# class NameSpace :
+#       rtc_handles and object list in naming service
+#
+class NameSpace :
+    def __init__(self, orb, server_name=None, naming=None):
+        self.orb = orb
+        self.name = server_name
+        if naming :
+          self.naming = naming
+        else :
+          self.naming = CorbaNaming(self.orb, server_name) 
+
+        self.b_len = 10 # iteration cut off no.
+        self.rtc_handles = {}
+        self.obj_list = {}
+
+    def get_object_by_name(self, name, cl=RTC.RTObject):
+        ref = self.naming.resolveStr(name)
+        if ref is None: return None     # return CORBA.nil ?
+        if cl :
+            return ref._narrow(cl)
+        else :
+            return ref
+
+    def list_obj(self) :
+        self.rtc_handes = {}
+        self.obj_list = {}
+        return self.list_obj1(self.naming._rootContext, "")
+
+    def list_obj1(self, name_context, parent) :
+        if not name_context :
+            name_context = self.naming._rootContext 
+        rslt = []
+        b_list = name_context.list(self.b_len)
+        for bd in b_list[0] :
+            rslt = rslt + self.proc_bd(bd, name_context, parent)
+        if b_list[1] :  # iterator : there exists remaining.
+            t_list = b_list[1].next_n(self.b_len)
+            while t_list[0] :
+                for bd in t_list[1] :
+                    rslt = rslt + self.proc_bd(bd, name_context, parent)
+                t_list = b_list[1].next_n(self.b_len)
+        return rslt
+
+    def proc_bd(self, bd, name_context, parent) :
+#        print('-------------------------------------------------------------------')
+#        print('bd= ', bd)
+#        print('name_context= ', name_context)
+#        print('parent= ', parent)
+        rslt = []
+        pre = ""
+        if parent :
+            pre = parent + "/"
+        nam = pre + URI.nameToString(bd.binding_name)
+        if bd.binding_type == CosNaming.nobject :
+            tmp = name_context.resolve(bd.binding_name)
+            self.obj_list[nam]=tmp
+            print('objcet '+nam+' was listed.')
+            try :
+                tmp = tmp._narrow(RTC.RTObject)
+            except :
+                print(nam+' is not RTC.')
+                tmp = None
+            try :
+                if tmp :
+                   rslt = [[nam, tmp]]
+                   self.rtc_handles[nam]=RtcHandle(nam,self,tmp)
+                   print('handle for '+nam+' was created.')
+                else :
+                   pass
+            except :
+                print(nam+' is not alive.' , sys.exc_info()[0])
+                pass
+        else :
+            tmp = name_context.resolve(bd.binding_name)
+            tmp = tmp._narrow(CosNaming.NamingContext)
+            rslt = self.list_obj1(tmp, nam)
+        return rslt
+
+#
+# data conversion
+#
+def nvlist2dict(nvlist) :
+    rslt = {}
+    for tmp in nvlist :
+        rslt[tmp.name]=tmp.value.value()   # nv.value and any.value()
+    return rslt
+def dict2nvlist(dict) :
+    rslt = []
+    for tmp in dict.keys() :
+        rslt.append(SDOPackage.NameValue(tmp, any.to_any(dict[tmp])))
+    return rslt
+#
+#  connector, port, inport, outport, service
+#                
+
+class Connector :
+    def __init__(self, plist, name = None, id="", prop_dict={}) :
+       self.connectp=False
+       self.plist = plist
+       self.port_reflist = [tmp.port_profile.port_ref for tmp in plist]
+       if name :
+           self.name = name
+       else :
+           self.name = string.join([tmp.name for tmp in plist],'_')
+       self.prop_dict_req = prop_dict
+       self.prop_nvlist_req = dict2nvlist(self.prop_dict_req)
+       self.profile_req = RTC.ConnectorProfile(self.name, id, self.port_reflist, 
+                          self.prop_nvlist_req)
+       self.nego_prop()
+
+    def nego_prop(self) :
+       self.possible = True
+       for kk in self.def_prop :
+           if kk in self.prop_dict_req :
+               if not self.prop_dict_req[kk] :
+                   self.prop_dict_req[kk]=self.def_prop[kk]
+           else :
+                self.prop_dict_req[kk]=self.def_prop[kk]
+           for pp in self.plist :  
+               if not ((self.prop_dict_req[kk] in pp.prop[kk]) or 
+                                 ('Any' in    pp.prop[kk])) :
+                   print(kk, self.prop_dict_req[kk])
+                   self.prop_dict_req[kk] = ""
+                   self.possible = False
+       self.prop_nvlist_req = dict2nvlist(self.prop_dict_req)
+       self.profile_req.properties = self.prop_nvlist_req
+       return self.possible
+
+    def connect(self) :
+#
+#   out and inout parameters are retuned as a tuple   
+#
+       if self.connectp == False :
+          ret, self.profile = self.port_reflist[0].connect(self.profile_req)
+          self.prop_nvlist = self.profile.properties
+          self.prop_dict = nvlist2dict(self.prop_nvlist)
+          if ret == RTC.RTC_OK :
+              self.connectp=True
+       else :
+          ret = "?"
+       return ret
+
+    def disconnect(self) :
+       if self.connectp == True :
+           ret = self.port_reflist[0].disconnect(self.profile.connector_id)
+       else :
+           ret = "?"
+       self.connectp = False
+       return ret
+
+class IOConnector(Connector) :
+    def __init__(self, plist, name = None, id="", prop_dict={}) :
+#      self.def_prop = {'dataport.dataflow_type':'Push' ,
+#                       'dataport.interface_type':'CORBA_Any' ,
+#                       'dataport.subscription_type':'Flush'}
+       self.def_prop = {'dataport.dataflow_type':'push',
+                        'dataport.interface_type':'corba_cdr' ,
+                        'dataport.subscription_type':'flush'}
+       Connector.__init__(self, plist, name, id, prop_dict)
+
+class ServiceConnector(Connector) :
+    def __init__(self, plist, name = None, id="", prop_dict={}) :
+       self.def_prop = {'port.port_type':'CorbaPort' }
+       Connector.__init__(self, plist, name, id, prop_dict)
+
+
+class Port :
+    def __init__(self, profile,nv_dict=None,handle=None) :
+        self.handle=handle
+        self.name=profile.name    
+        self.port_profile = profile
+        if not nv_dict :
+            nv_dict = nvlist2dict(profile.properties)
+        self.prop = nv_dict
+        self.con = None           # this must be set in each subclasses
+    def get_info(self) :
+        self.con.connect()
+        tmp1 = self.get_connections()
+        tmp2 = [pp.connector_id for pp in tmp1]
+        if self.con.profile.connector_id in tmp2 :
+            print("connecting")
+            self.con.disconnect()
+
+    def get_connections(self) :
+        return self.port_profile.port_ref.get_connector_profiles()
+
+class CorbaServer :
+    def __init__(self, profile, port) :
+        self.profile = profile
+        self.port = port
+        self.name = profile.instance_name
+        self.type = profile.type_name
+        self.ref = None
+        ref_key = 'port.' + self.type + '.' + self.name
+        self.ref=self.port.con.prop_dict[ref_key]
+        if isinstance(self.ref,str) :
+            self.ref=port.handle.env.orb.string_to_object(self.ref)
+#
+# if we import stubs before we create instances,
+# we rarely need to narrow the object references.
+# we need to specify global symbol table to evaluate class symbols.
+#
+    def narrow_ref(self, gls) :
+        if self.type.find('::') == -1 :
+            self.narrow_sym = eval('_GlobalIDL.' + self.type, gls)
+        else :
+            self.narrow_sym = eval(self.type.replace('::','.'), gls)
+        self.ref = self.ref._narrow(self.narrow_sym)
+
+class CorbaClient :
+    def __init__(self, profile) :
+        self.profile = profile
+        self.name = profile.instance_name
+        self.type = profile.type_name
+#
+# to connect to an outside corba client,
+# we need an implementation of the corresponding corba server.
+# but ....
+#
+
+class RtcService(Port) :
+    def __init__(self, profile,nv_dict=None, handle=None) :
+        Port.__init__(self, profile, nv_dict, handle)
+        self.con = ServiceConnector([self])
+        self.get_info()
+        self.provided={}
+        self.required={}
+        tmp = self.port_profile.interfaces
+        for itf in tmp :
+            if itf.polarity == RTC.PROVIDED :
+                self.provided[itf.instance_name] = CorbaServer(itf,self)
+            elif itf.polarity == RTC.REQUIRED :
+                self.required[itf.instance_name] = CorbaClient(itf)
+
+#    def open(self) :
+#        self.con.connect()
+#        self.provided={}
+#        self.required={}
+#        tmp = self.port_profile.interfaces
+#        for itf in tmp :
+#            if itf.polarity == RTC.PROVIDED :
+#                self.provided[itf.instance_name] = CorbaServer(itf,self)
+#            elif itf.polarity == RTC.REQUIRED :
+#                self.required[itf.instance_name] = CorbaClient(itf)
+
+#    def close(self) :
+#        return self.con.disconnect()
+def strip_data_class(data_class_str) :
+    tmp = data_class_str.split(':')
+    if len(tmp) == 1 :
+        return data_class_str
+    else :
+        tmp = tmp[1].split('/')
+        return tmp[1]
+
+class RtcInport(Port) :
+    def __init__(self, profile, nv_dict=None, handle=None) :
+        Port.__init__(self, profile, nv_dict, handle)
+        self.con = IOConnector([self], prop_dict={'dataport.dataflow_type':'push'})
+        self.get_info() 
+#       self.ref = self.con.prop_dict['dataport.corba_any.inport_ref']
+        self.ref = self.con.prop_dict['dataport.corba_cdr.inport_ref']
+#        self.data_class = eval('RTC.' + self.prop['dataport.data_type'])
+#        self.data_tc = eval('RTC._tc_' + self.prop['dataport.data_type'])
+        tmp=strip_data_class(self.prop['dataport.data_type'])
+        print(tmp)
+        self.data_class = eval('RTC.' + tmp)
+        self.data_tc = eval('RTC._tc_' + tmp)
+    def write(self,data) :
+#        self.ref.put(CORBA.Any(self.data_tc,
+#                         self.data_class(RTC.Time(0,0),data)))
+        self.ref.put(cdrMarshal(self.data_tc,
+                                self.data_class(RTC.Time(0,0),data), 1))
+    def open(self) :
+        self.con.connect()
+        self.ref = self.con.prop_dict['dataport.corba_cdr.inport_ref']
+
+    def close(self) :
+        return self.con.disconnect()
+
+class RtcOutport(Port) :
+    def __init__(self, profile,nv_dict=None, handle=None) :
+        Port.__init__(self, profile, nv_dict, handle)
+        con_prop_dict={'dataport.dataflow_type':'pull',
+		       'dataport.buffer.type':'ringbuffer',
+                       'dataport.buffer.read.empty_policy':'last',
+		       'dataport.buffer.length':'1'}
+        self.con = IOConnector([self], prop_dict=con_prop_dict)
+        self.get_info()
+#        if 'dataport.corba_any.outport_ref' in self.con.prop_dict :
+#          self.ref = self.con.prop_dict['dataport.corba_any.outport_ref']
+        if 'dataport.corba_cdr.outport_ref' in self.con.prop_dict :
+           self.ref = self.con.prop_dict['dataport.corba_cdr.outport_ref']
+        else :
+           self.ref=None
+#        self.data_class = eval('RTC.' + self.prop['dataport.data_type'])
+#        self.data_tc = eval('RTC._tc_' + self.prop['dataport.data_type'])
+        tmp=strip_data_class(self.prop['dataport.data_type'])
+        self.data_class = eval('RTC.' + tmp)
+        self.data_tc = eval('RTC._tc_' + tmp)
+
+    def read(self) :
+        if self.ref :
+           try :
+                tmp1=self.ref.get()
+           	tmp2= cdrUnmarshal(self.data_tc,tmp1[1], 1)
+#           return tmp2.data
+           	return tmp2
+           except :
+                return None
+        else :
+           print("not supported")
+           return None
+
+    def open(self) :
+        self.con.connect()
+        if 'dataport.corba_cdr.outport_ref' in self.con.prop_dict :
+           self.ref = self.con.prop_dict['dataport.corba_cdr.outport_ref']
+
+    def close(self) :
+        return self.con.disconnect()
+
+#
+# RtcHandle
+#
+class RtcHandle :
+  def __init__(self, name, env, ref=None) :
+    self.name = name
+    self.env = env
+    if ref :
+        self.rtc_ref = ref
+    else :
+        self.rtc_ref = env.naming.resolve(name)._narrow(RTC.RTObject)
+    self.conf_ref = None
+    self.retrieve_info()
+
+  def retrieve_info(self) :
+    self.conf_set={}
+    self.conf_set_data={}
+    self.port_refs = []
+    self.execution_contexts =[]
+    if self.rtc_ref :
+        self.conf_ref = self.rtc_ref.get_configuration()
+        conf_set = self.conf_ref.get_configuration_sets()
+        for cc in conf_set :
+            self.conf_set[cc.id]=cc
+            self.conf_set_data[cc.id]=nvlist2dict(cc.configuration_data)
+        self.profile = self.rtc_ref.get_component_profile()
+        self.prop = nvlist2dict(self.profile.properties)
+        #self.execution_contexts = self.rtc_ref.get_contexts()
+        self.execution_contexts = self.rtc_ref.get_owned_contexts()
+        self.port_refs = self.rtc_ref.get_ports()  
+    # this includes inports, outports and service ports
+    self.ports = {}
+    self.services = {}
+    self.inports = {}
+    self.outports = {}
+    for pp in self.port_refs :
+        tmp = pp.get_port_profile()
+        tmp_prop = nvlist2dict(tmp.properties)
+        tmp_name = tmp.name.lstrip(self.name.split('.')[0]).lstrip('.')
+        print('port_name:', tmp_name)
+#       self.ports[tmp.name]=Port(tmp, tmp_prop)
+        if tmp_prop['port.port_type']=='DataInPort' :
+            self.inports[tmp_name]=RtcInport(tmp,tmp_prop, self)
+#            self.inports[tmp.name]=Port(tmp, tmp_prop)
+        elif tmp_prop['port.port_type']=='DataOutPort' :
+            self.outports[tmp_name]=RtcOutport(tmp, tmp_prop, self)
+#            self.outports[tmp.name]=Port(tmp, tmp_prop)
+        elif tmp_prop['port.port_type']=='CorbaPort' :
+            self.services[tmp_name]=RtcService(tmp, tmp_prop, self)
+#            self.services[tmp.name]=Port(tmp, tmp_prop)
+
+  def set_conf(self,conf_set_name,param_name,value) :
+      conf_set=self.conf_set[conf_set_name]
+      conf_set_data=self.conf_set_data[conf_set_name]
+      conf_set_data[param_name]=value
+      conf_set.configuration_data=dict2nvlist(conf_set_data)
+#      self.conf_ref.set_configuration_set_values(conf_set_name,conf_set)
+      self.conf_ref.set_configuration_set_values(conf_set)
+  def set_conf_activate(self,conf_set_name,param_name,value) :
+      self.set_conf(conf_set_name,param_name,value)
+      self.conf_ref.activate_configuration_set(conf_set_name)
+  def activate(self):
+      return self.execution_contexts[0].activate_component(self.rtc_ref)
+  def deactivate(self):
+      return self.execution_contexts[0].deactivate_component(self.rtc_ref)
+  def reset(self):
+      return self.execution_contexts[0].reset_component(self.rtc_ref)
+  def get_state(self):
+      return self.execution_contexts[0].get_component_state(self.rtc_ref)
+
+#
+# pipe
+#  a pipe is an port (interface & implementation)
+#  for a port(an RtcInport or RtcOutport object) of an outside rtc.
+#  you need an empty rtc (comp) to create pipes.
+#  you can subscribe and communicate to the outside port with the pipe.
+#  
+#
+class InPipe() :
+  def __init__(self,comp, port) :
+    self.comp=comp
+    self.port=port
+    self.pname=port.name.replace('.','_')
+    self.pipe=comp.makeOutPort(self.pname,port.data_class(RTC.Time(0,0),[]),OpenRTM_aist.RingBuffer(1))
+    self.buf=getattr(comp,'_d_'+self.pname)
+    tmp = self.pipe.getPortProfile()
+    self.pipe_port = RtcOutport(tmp, nvlist2dict(tmp.properties))
+    self.con = IOConnector([self.pipe_port,self.port])
+  def connect(self):
+    return self.con.connect()
+  def disconnect(self):
+    return self.con.disconnect()
+  def write(self, data) :
+    self.buf.data=data
+    self.pipe.write()
+class OutPipe() :
+  def __init__(self,comp, port) :
+    self.comp=comp
+    self.port=port
+    self.pname=port.name.replace('.','_')
+    self.pipe=comp.makeInPort(self.pname,port.data_class(RTC.Time(0,0),[]),OpenRTM_aist.RingBuffer(1))
+    self.buf=getattr(comp,'_d_'+self.pname)
+    tmp = self.pipe.getPortProfile()
+    self.pipe_port = RtcInport(tmp, nvlist2dict(tmp.properties))
+    self.con = IOConnector([self.pipe_port,self.port])
+  def connect(self):
+    return self.con.connect()
+  def disconnect(self):
+    return self.con.disconnect()
+  def read(self) :
+    return self.pipe.read().data
+#
+#
+#
+def make_pipe(comp, handle) :
+  handle.in_pipe={}
+  for i_port in handle.inports :
+    handle.in_pipe[i_port]=InPipe(comp, handle.inports[i_port])
+  handle.out_pipe={}
+  for o_port in handle.outports :
+    handle.out_pipe[o_port]=OutPipe(comp, handle.outports[o_port])

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/Composite.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/Composite.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/Composite.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+##
+# @file Composite.cpp
+# @brief RT component server daemon
+# @date $Date: 2009-01-15 09:06:19 $
+# @author Noriaki Ando <n-ando at aist.go.jp>
+#
+# Copyright (C) 2003-2008
+#     Task-intelligence Research Group,
+#     Intelligent Systems Research Institute,
+#     National Institute of
+#         Advanced Industrial Science and Technology (AIST), Japan
+#     All rights reserved.
+#
+
+
+import sys
+
+import OpenRTM_aist
+
+def main():
+  manager = OpenRTM_aist.Manager.init(sys.argv)
+
+  manager.activateManager()
+  
+  manager.runManager()
+
+  return 0
+
+
+if __name__ == "__main__":
+  main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/Controller.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/Controller.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/Controller.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,77 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+import time
+sys.path.append(".")
+
+# Import RTM module
+import RTC
+import OpenRTM_aist
+
+controller_spec = ["implementation_id", "Controller", 
+                   "type_name",         "Controller", 
+                   "description",       "Controller component", 
+                   "version",           "1.0", 
+                   "vendor",            "Shinji Kurihara, AIST", 
+                   "category",          "example", 
+                   "activity_type",     "DataFlowComponent", 
+                   "max_instance",      "10", 
+                   "language",          "Python", 
+                   "lang_type",         "SCRIPT",
+                   ""]
+
+class Controller(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+    return
+    
+  def onInitialize(self):
+    self._d_in = RTC.TimedFloat(RTC.Time(0,0),0)
+    self._inIn = OpenRTM_aist.InPort("in", self._d_in)
+    self._d_out = RTC.TimedFloat(RTC.Time(0,0),0)
+    self._outOut = OpenRTM_aist.OutPort("out", self._d_out)
+
+    # Set InPort buffers
+    self.addInPort("in",self._inIn)
+    
+    # Set OutPort buffers
+    self.addOutPort("out",self._outOut)
+    
+    return RTC.RTC_OK
+
+
+  def onExecute(self, ec_id):
+    if self._inIn.isNew():
+      data = self._inIn.read()
+      print("Controller Received data: ", data.data)
+      self._d_out.data = data.data *2
+      self._outOut.write()
+    return RTC.RTC_OK
+  
+
+
+
+def ControllerInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=controller_spec)
+  manager.registerFactory(profile,
+                          Controller,
+                          OpenRTM_aist.Delete)
+
+def MyModuleInit(manager):
+  ControllerInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("Controller")
+
+
+
+def main():
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+  mgr.setModuleInitProc(MyModuleInit)
+  mgr.activateManager()
+  mgr.runManager()
+
+if __name__ == "__main__":
+  main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/Motor.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/Motor.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/Motor.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,84 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+import time
+sys.path.append(".")
+
+# Import RTM module
+import RTC
+import OpenRTM_aist
+
+motor_spec = ["implementation_id", "Motor", 
+              "type_name",         "Motor", 
+              "description",       "Motor component", 
+              "version",           "1.0", 
+              "vendor",            "Noriaki Ando, AIST", 
+              "category",          "example", 
+              "activity_type",     "DataFlowComponent", 
+              "max_instance",      "10", 
+              "language",          "Python", 
+              "lang_type",         "SCRIPT",
+              "conf.default.motor_id", "0",
+              ""]
+
+class Motor(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+    return
+
+  def onInitialize(self):
+    self._d_in = RTC.TimedFloat(RTC.Time(0,0),0)
+    self._inIn = OpenRTM_aist.InPort("in", self._d_in)
+    self._d_out = RTC.TimedLong(RTC.Time(0,0),0)
+    self._outOut = OpenRTM_aist.OutPort("out", self._d_out)
+
+    # Set InPort buffers
+    self.addInPort("in",self._inIn)
+    
+    # Set OutPort buffers
+    self.addOutPort("out",self._outOut)
+
+    self._motor_id = [0]
+    
+    # Bind variables and configuration variable
+    self.bindParameter("motor_id", self._motor_id, "0")
+    self._configsets.update("default")
+    return RTC.RTC_OK
+
+
+  def onExecute(self, ec_id):
+    if self._inIn.isNew():
+      data = self._inIn.read()
+      print("Motor Received data: ", data.data)
+      self._d_out.data = int(data.data *2)
+      self._outOut.write()
+    return RTC.RTC_OK
+  
+
+
+
+def MotorInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=motor_spec)
+  manager.registerFactory(profile,
+                          Motor,
+                          OpenRTM_aist.Delete)
+
+def MyModuleInit(manager):
+  MotorInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("Motor")
+
+
+
+def main():
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+  mgr.setModuleInitProc(MyModuleInit)
+  mgr.activateManager()
+  mgr.runManager()
+
+if __name__ == "__main__":
+  main()
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/README.Controller
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/README.Controller	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/README.Controller	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,125 @@
+======================================================================
+  RTComponent: Controller specificatioin
+
+  OpenRTM-0.4.1
+  Date: Wed Aug  5 10:13:43 2009
+
+  This file is generated by rtc-template with the following argments.
+
+    
+    /usr/users/kurihara/svn/RC1/OpenRTM-aist-Python/OpenRTM_aist/rtc-template/rtc-template.py 
+    -bpython --module-name=Controller --module-type=DataFlowComponent 
+    --module-desc=Controller component --module-version=1.0 
+    --module-vendor=Noriaki Ando, AIST --module-category=example 
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC 
+    --module-max-inst=10 --outport=out:TimedLong --inport=in:TimedFloat 
+    --config=motor_id:int:0 
+
+======================================================================
+# <rtc-template block="module">
+Description: Controller component
+Version:     1.0
+Author:      Noriaki Ando, AIST
+Category:    example
+Comp. Type:  DataFlowComponent
+Act. Type:   SPORADIC
+MAX Inst.:   10
+Lang:        
+Lang Type:   
+
+# </rtc-template>
+
+
+======================================================================
+    Activity definition
+======================================================================
+
+[Initializing]
+
+[Ready]
+	[Entry]
+	[Do]
+	[Exit]
+
+[Starting]
+
+[Active]
+	[Entry]
+	[Do]
+	[Exit]
+
+[Stopping]
+
+[Error]
+	[Entry]
+	[Do]
+	[Exit]
+
+
+[Fatal Error]
+	[Entry]
+	[Do]
+	[Exit]
+
+[Exiting]
+
+======================================================================
+    InPorts definition
+======================================================================
+# <rtc-template block="inport">
+
+	Name:        in
+	PortNumber:  0
+	Description:
+	PortType: 
+	DataType:    TimedFloat
+	MaxOut: 
+	[Data Elements]
+		Number:
+		Name:
+		Type:
+		Unit:
+		RangeLow:
+		RangeHigh:
+		DefaultValue:
+
+
+# </rtc-template>
+
+======================================================================
+    OutPorts definition
+======================================================================
+# <rtc-template block="outport">
+
+	Name:        out
+	PortNumber:  0
+	Description:
+	PortType: 
+	DataType:    TimedLong
+	MaxOut: 
+	[Data Elements]
+		Number:
+		Name:
+		Type:
+		Unit:
+		RangeLow:
+		RangeHigh:
+		DefaultValue:
+
+
+# </rtc-template>
+
+
+======================================================================
+    Service definition
+======================================================================
+# <rtc-template block="service">
+
+
+# </rtc-template> 
+
+======================================================================
+    Configuration definition
+======================================================================
+This area is reserved for future OpenRTM.
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/README.Motor
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/README.Motor	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/README.Motor	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,125 @@
+======================================================================
+  RTComponent: Motor specificatioin
+
+  OpenRTM-0.4.1
+  Date: Wed Aug  5 10:13:43 2009
+
+  This file is generated by rtc-template with the following argments.
+
+    
+    /usr/users/kurihara/svn/RC1/OpenRTM-aist-Python/OpenRTM_aist/rtc-template/rtc-template.py 
+    -bpython --module-name=Motor --module-type=DataFlowComponent 
+    --module-desc=Motor component --module-version=1.0 
+    --module-vendor=Noriaki Ando, AIST --module-category=example 
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC 
+    --module-max-inst=10 --outport=out:TimedLong --inport=in:TimedFloat 
+    --config=motor_id:int:0 
+
+======================================================================
+# <rtc-template block="module">
+Description: Motor component
+Version:     1.0
+Author:      Noriaki Ando, AIST
+Category:    example
+Comp. Type:  DataFlowComponent
+Act. Type:   SPORADIC
+MAX Inst.:   10
+Lang:        
+Lang Type:   
+
+# </rtc-template>
+
+
+======================================================================
+    Activity definition
+======================================================================
+
+[Initializing]
+
+[Ready]
+	[Entry]
+	[Do]
+	[Exit]
+
+[Starting]
+
+[Active]
+	[Entry]
+	[Do]
+	[Exit]
+
+[Stopping]
+
+[Error]
+	[Entry]
+	[Do]
+	[Exit]
+
+
+[Fatal Error]
+	[Entry]
+	[Do]
+	[Exit]
+
+[Exiting]
+
+======================================================================
+    InPorts definition
+======================================================================
+# <rtc-template block="inport">
+
+	Name:        in
+	PortNumber:  0
+	Description:
+	PortType: 
+	DataType:    TimedFloat
+	MaxOut: 
+	[Data Elements]
+		Number:
+		Name:
+		Type:
+		Unit:
+		RangeLow:
+		RangeHigh:
+		DefaultValue:
+
+
+# </rtc-template>
+
+======================================================================
+    OutPorts definition
+======================================================================
+# <rtc-template block="outport">
+
+	Name:        out
+	PortNumber:  0
+	Description:
+	PortType: 
+	DataType:    TimedLong
+	MaxOut: 
+	[Data Elements]
+		Number:
+		Name:
+		Type:
+		Unit:
+		RangeLow:
+		RangeHigh:
+		DefaultValue:
+
+
+# </rtc-template>
+
+
+======================================================================
+    Service definition
+======================================================================
+# <rtc-template block="service">
+
+
+# </rtc-template> 
+
+======================================================================
+    Configuration definition
+======================================================================
+This area is reserved for future OpenRTM.
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/README.Sensor
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/README.Sensor	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/README.Sensor	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,124 @@
+======================================================================
+  RTComponent: Sensor specificatioin
+
+  OpenRTM-0.4.1
+  Date: Wed Aug  5 10:13:43 2009
+
+  This file is generated by rtc-template with the following argments.
+
+    
+    /usr/users/kurihara/svn/RC1/OpenRTM-aist-Python/OpenRTM_aist/rtc-template/rtc-template.py 
+    -bpython --module-name=Sensor --module-type=DataFlowComponent 
+    --module-desc=Sensor component --module-version=1.0 
+    --module-vendor=Noriaki Ando, AIST --module-category=example 
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC 
+    --module-max-inst=10 --outport=out:TimedFloat --inport=in:TimedLong 
+
+======================================================================
+# <rtc-template block="module">
+Description: Sensor component
+Version:     1.0
+Author:      Noriaki Ando, AIST
+Category:    example
+Comp. Type:  DataFlowComponent
+Act. Type:   SPORADIC
+MAX Inst.:   10
+Lang:        
+Lang Type:   
+
+# </rtc-template>
+
+
+======================================================================
+    Activity definition
+======================================================================
+
+[Initializing]
+
+[Ready]
+	[Entry]
+	[Do]
+	[Exit]
+
+[Starting]
+
+[Active]
+	[Entry]
+	[Do]
+	[Exit]
+
+[Stopping]
+
+[Error]
+	[Entry]
+	[Do]
+	[Exit]
+
+
+[Fatal Error]
+	[Entry]
+	[Do]
+	[Exit]
+
+[Exiting]
+
+======================================================================
+    InPorts definition
+======================================================================
+# <rtc-template block="inport">
+
+	Name:        in
+	PortNumber:  0
+	Description:
+	PortType: 
+	DataType:    TimedLong
+	MaxOut: 
+	[Data Elements]
+		Number:
+		Name:
+		Type:
+		Unit:
+		RangeLow:
+		RangeHigh:
+		DefaultValue:
+
+
+# </rtc-template>
+
+======================================================================
+    OutPorts definition
+======================================================================
+# <rtc-template block="outport">
+
+	Name:        out
+	PortNumber:  0
+	Description:
+	PortType: 
+	DataType:    TimedFloat
+	MaxOut: 
+	[Data Elements]
+		Number:
+		Name:
+		Type:
+		Unit:
+		RangeLow:
+		RangeHigh:
+		DefaultValue:
+
+
+# </rtc-template>
+
+
+======================================================================
+    Service definition
+======================================================================
+# <rtc-template block="service">
+
+
+# </rtc-template> 
+
+======================================================================
+    Configuration definition
+======================================================================
+This area is reserved for future OpenRTM.
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/Sensor.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/Sensor.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/Sensor.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,76 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+import time
+sys.path.append(".")
+
+import RTC
+import OpenRTM_aist
+
+sensor_spec = ["implementation_id", "Sensor", 
+               "type_name",         "Sensor", 
+               "description",       "Sensor component", 
+               "version",           "1.0", 
+               "vendor",            "Noriaki Ando, AIST", 
+               "category",          "example", 
+               "activity_type",     "DataFlowComponent", 
+               "max_instance",      "10", 
+               "language",          "Python", 
+               "lang_type",         "SCRIPT",
+               ""]
+
+
+class Sensor(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+    return
+
+  def onInitialize(self):
+    self._d_in = RTC.TimedLong(RTC.Time(0,0),0)
+    self._inIn = OpenRTM_aist.InPort("in", self._d_in)
+    self._d_out = RTC.TimedFloat(RTC.Time(0,0),0)
+    self._outOut = OpenRTM_aist.OutPort("out", self._d_out)
+    
+    # Set InPort buffers
+    self.addInPort("in",self._inIn)
+    
+    # Set OutPort buffers
+    self.addOutPort("out",self._outOut)
+     
+    return RTC.RTC_OK
+
+
+  def onExecute(self, ec_id):
+    if self._inIn.isNew():
+      data = self._inIn.read()
+      print("Sensor Received data: ", data.data)
+      self._d_out.data = data.data *2
+      self._outOut.write()
+    return RTC.RTC_OK
+  
+
+
+def SensorInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=sensor_spec)
+  manager.registerFactory(profile,
+                          Sensor,
+                          OpenRTM_aist.Delete)
+
+def MyModuleInit(manager):
+  SensorInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("Sensor")
+
+
+def main():
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+  mgr.setModuleInitProc(MyModuleInit)
+  mgr.activateManager()
+  mgr.runManager()
+
+if __name__ == "__main__":
+  main()
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/__init__.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/__init__.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/__init__.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1 @@
+# Empty file

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/composite.conf
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/composite.conf	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/composite.conf	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,3 @@
+conf.default.exported_ports: Motor0.out, Sensor0.in
+#exported_ports: Motor0.out, Sensor0.in
+conf.default.members: Sensor0, Controller0, Motor0

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/gen.bat
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/gen.bat	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/gen.bat	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+python %PYTHONPATH%\OpenRTM_aist\utils\rtc-template\rtc-template.py -bpython^
+ --module-name=Controller --module-type='DataFlowComponent'^
+ --module-desc='Controller component'^
+ --module-version=1.0 --module-vendor='Noriaki Ando, AIST'^
+ --module-category=example^
+ --module-comp-type=DataFlowComponent --module-act-type=SPORADIC^
+ --module-max-inst=10^
+ --outport=out:TimedFloat^
+ --inport=in:TimedFloat
+
+
+python %PYTHONPATH%\OpenRTM_aist\utils\rtc-template\rtc-template.py -bpython^
+ --module-name=Motor --module-type='DataFlowComponent'^
+ --module-desc='Motor component'^
+ --module-version=1.0 --module-vendor='Noriaki Ando, AIST'^
+ --module-category=example^
+ --module-comp-type=DataFlowComponent --module-act-type=SPORADIC^
+ --module-max-inst=10^
+ --outport=out:TimedLong^
+ --inport=in:TimedFloat^
+ --config=motor_id:int:0
+
+python %PYTHONPATH%\OpenRTM_aist\utils\rtc-template\rtc-template.py -bpython^
+ --module-name=Sensor --module-type='DataFlowComponent'^
+ --module-desc='Sensor component'^
+ --module-version=1.0 --module-vendor='Noriaki Ando, AIST'^
+ --module-category=example^
+ --module-comp-type=DataFlowComponent --module-act-type=SPORADIC^
+ --module-max-inst=10^
+ --outport=out:TimedFloat^
+ --inport=in:TimedLong

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/gen.sh
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/gen.sh	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/gen.sh	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+python ${PYTHONPATH}/OpenRTM_aist/utils/rtc-template/rtc-template.py -bpython \
+    --module-name=Controller --module-type='DataFlowComponent' \
+    --module-desc='Controller component' \
+    --module-version=1.0 --module-vendor='Noriaki Ando, AIST' \
+    --module-category=example \
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC \
+    --module-max-inst=10 \
+    --outport=out:TimedFloat \
+    --inport=in:TimedFloat
+
+
+python ${PYTHONPATH}/OpenRTM_aist/utils/rtc-template/rtc-template.py -bpython \
+    --module-name=Motor --module-type='DataFlowComponent' \
+    --module-desc='Motor component' \
+    --module-version=1.0 --module-vendor='Noriaki Ando, AIST' \
+    --module-category=example \
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC \
+    --module-max-inst=10 \
+    --outport=out:TimedLong \
+    --inport=in:TimedFloat \
+    --config=motor_id:int:0
+
+
+python ${PYTHONPATH}/OpenRTM_aist/utils/rtc-template/rtc-template.py -bpython \
+    --module-name=Sensor --module-type='DataFlowComponent' \
+    --module-desc='Sensor component' \
+    --module-version=1.0 --module-vendor='Noriaki Ando, AIST' \
+    --module-category=example \
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC \
+    --module-max-inst=10 \
+    --outport=out:TimedFloat \
+    --inport=in:TimedLong

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/rtc.conf
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/rtc.conf	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Composite/rtc.conf	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,10 @@
+corba.nameservers: localhost
+naming.formats: %n.rtc
+logger.enable: NO
+#logger.file_name: rtc.log
+#logger.log_level: PARANOID
+manager.modules.load_path: .
+manager.modules.preload:Controller,Motor,Sensor
+manager.components.precreate: Controller, Motor, Sensor, PeriodicECSharedComposite
+composite.PeriodicECShared.PeriodicECSharedComposite0.config_file: composite.conf
+#example.Motor0.config_file: motor.conf

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/ConfigSample.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/ConfigSample.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/ConfigSample.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,166 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+import time
+
+import RTC
+import OpenRTM_aist
+
+# Module specification
+configsample_spec = ["implementation_id", "ConfigSample",
+                     "type_name",         "ConfigSample",
+                     "description",       "Configuration example component",
+                     "version",           "1.0",
+                     "vendor",            "Shinji Kurihara",
+                     "category",          "example",
+                     "activity_type",     "DataFlowComponent",
+                     "max_instance",      "10",
+                     "language",          "Python",
+                     "lang_type",         "script",
+                     "conf.default.int_param0", "0",
+                     "conf.default.int_param1", "1",
+                     "conf.default.double_param0", "0.11",
+                     "conf.default.double_param1", "9.9",
+                     "conf.default.str_param0", "hoge",
+                     "conf.default.str_param1", "dara",
+                     "conf.default.vector_param0", "0.0,1.0,2.0,3.0,4.0",
+                     ""]
+
+i = 0
+maxlen = 0
+
+def ticktack():
+  global i
+  str_ = "/-\\|"
+  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):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+    print("ConfigSample constructor.")
+    self._int_param0 = [0]
+    self._int_param1 = [1]
+    self._double_param0 = [0.11]
+    self._double_param1 = [9.9]
+    self._str_param0 = ["hoge"]
+    self._str_param1 = ["dara"]
+    self._vector_param0 = [[0.0, 1.0, 2.0, 3.0, 4.0]]
+    
+  # The initialize action (on CREATED->ALIVE transition)
+  def onInitialize(self):
+    self.bindParameter("int_param0", self._int_param0, "0")
+    self.bindParameter("int_param1", self._int_param1, "1")
+    self.bindParameter("double_param0", self._double_param0, "0.11")
+    self.bindParameter("double_param1", self._double_param1, "9.9")
+    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")
+    
+    return RTC.RTC_OK
+
+  # The execution action that is invoked periodically
+  def onExecute(self, ec_id):
+    global maxlen
+    curlen = 0
+    c = "                    "
+
+    print("---------------------------------------")
+    print(" Active Configuration Set: ", self._configsets.getActiveId(),c)
+    print("---------------------------------------")
+    
+    print("int_param0:       ", self._int_param0, c)
+    print("int_param1:       ", self._int_param1, c)
+    print("double_param0:    ", self._double_param0, c)
+    print("double_param1:    ", self._double_param1, c)
+    print("str_param0:       ", self._str_param0, c)
+    print("str_param1:       ", self._str_param1, c)
+
+    for idx in range(len(self._vector_param0[0])):
+      print("vector_param0[", idx, "]: ", self._vector_param0[0][idx], c)
+
+    print("---------------------------------------")
+
+    curlen = len(self._vector_param0[0])
+
+    if maxlen > curlen:
+      maxlen = maxlen
+    else:
+      maxlen = curlen
+        
+    for idx in range(maxlen - curlen):
+      print(c, c)
+
+    print("Updating.... ", ticktack(), c)
+
+    str_ = ""
+    for idx in range(12 + maxlen):
+      str_ += "\r"
+    print(str_)
+
+
+    if self._int_param0 > 1000 and self._int_param0 < 1000000:
+      time.sleep(self._int_param0/1000000.0)
+    else:
+      time.sleep(0.1)
+
+    return RTC.RTC_OK
+
+
+def ConfigSampleInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=configsample_spec)
+  manager.registerFactory(profile,
+                          ConfigSample,
+                          OpenRTM_aist.Delete)
+
+def MyModuleInit(manager):
+  ConfigSampleInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("ConfigSample")
+
+  # Activate component
+  poa = manager.getPOA()
+  obj = comp._default_POA().servant_to_reference(comp)
+  rtobj = obj._narrow(RTC.RTObject)
+
+  ecs = rtobj.get_owned_contexts()
+  ecs[0].activate_component(rtobj)
+    
+
+def main():
+  # Initialize manager
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+
+  # Set module initialization proceduer
+  # This procedure will be invoked in activateManager() function.
+  mgr.setModuleInitProc(MyModuleInit)
+
+  # Activate manager and register to naming service
+  mgr.activateManager()
+
+  # run the manager in blocking mode
+  # runManager(False) is the default
+  mgr.runManager()
+
+  # If you want to run the manager in non-blocking mode, do like this
+  # mgr.runManager(True)
+
+if __name__ == "__main__":
+  main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/__init__.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/__init__.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/__init__.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1 @@
+# Empty file

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/configsample.conf
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/configsample.conf	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/configsample.conf	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,41 @@
+configuration.active_config: mode1
+
+conf.default.int_param0: 0
+conf.default.int_param1: 1
+conf.default.double_param0: 0.99
+conf.default.double_param1: -0.99
+conf.default.str_param0: default
+conf.default.str_param1: default set in conf file
+conf.default.vector_param0: 0.0,0.1,0.2,0.3,0.4,0.5,0.6
+
+conf.mode0.int_param0: 12345
+conf.mode0.int_param1: 98765
+conf.mode0.double_param0: 3.141592653589793238462643383279
+conf.mode0.double_param1: 2.718281828459045235360287471352
+conf.mode0.str_param0: mode0
+conf.mode0.str_param1: foo
+conf.mode0.vector_param0: 0.0,0.1,0.2,0.3,0.4
+
+conf.mode1.int_param0: -999
+conf.mode1.int_param1: 999
+conf.mode1.double_param0: 297992458
+conf.mode1.double_param1: 2.97992458e+8
+conf.mode1.str_param0: mode1
+conf.mode1.str_param1: AIST
+conf.mode1.vector_param0: 1,2,3,4,5,6,7,8,9
+
+conf.__widget__.int_param0: slider.10
+conf.__widget__.int_param1: spin
+conf.__widget__.double_param0: slider.0.1
+conf.__widget__.double_param1: text
+conf.__widget__.str_param0: radio
+conf.__widget__.str_param1: text
+conf.__widget__.vector_param0: text
+
+conf.__constraints__.int_param0: 0<=x<=150
+conf.__constraints__.int_param1: 0<=x<=1000
+conf.__constraints__.double_param0: 0<=x<=100
+conf.__constraints__.double_param1: 
+conf.__constraints__.str_param0: (default,mode0,mode1,foo,bar,radio)
+conf.__constraints__.str_param1: 
+conf.__constraints__.vector_param0: 

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/gen.bat
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/gen.bat	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/gen.bat	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,12 @@
+python %PYTHONPATH%\OpenRTM_aist\utils\rtc-template\rtc-template.py -bpython^
+    --module-name=ConfigSample --module-type="DataFlowComponent"^
+    --module-desc="Configuration example component"^
+    --module-version=1.0 --module-vendor="Shinji Kurihara"^
+    --module-category=example^
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC^
+    --module-max-inst=10^
+    --config=int_param0:int:0 --config=int_param1:int:1^
+    --config=double_param0:double:0.11 --config=double_param1:double:9.9^
+    --config="str_param0:std::string:hoge"^
+    --config="str_param1:std::string:dara"^
+    --config="vector_param0:float:0.0,1.0,2.0,3.0,4.0"

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/gen.sh
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/gen.sh	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/gen.sh	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+python ${PYTHONPATH}/OpenRTM_aist/utils/rtc-template/rtc-template.py -bpython \
+    --module-name=ConfigSample --module-type='DataFlowComponent' \
+    --module-desc='Configuration example component' \
+    --module-version=1.0 --module-vendor='Noriaki Ando, AIST' \
+    --module-category=example \
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC \
+    --module-max-inst=10 \
+    --config=int_param0:int:0 --config=int_param1:int:1 \
+    --config=double_param0:double:0.11 --config=double_param1:double:9.9 \
+    --config="str_param0:std::string:hoge" \
+    --config="str_param1:std::string:dara" \
+    --config="vector_param0:float:0.0,1.0,2.0,3.0,4.0"
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/rtc.conf
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/rtc.conf	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ConfigSample/rtc.conf	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,5 @@
+corba.nameservers: localhost
+naming.formats: %n.rtc
+logger.enable: NO
+logger.log_level: PARANOID
+example.ConfigSample.config_file: configsample.conf

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/Connector.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/Connector.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/Connector.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,101 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+
+from omniORB import CORBA
+
+import RTC
+import OpenRTM
+import OpenRTM_aist
+
+
+def main():
+
+  # subscription type
+  subs_type = "Flush"
+
+  # initialization of ORB
+  orb = CORBA.ORB_init(sys.argv)
+
+  # get NamingService
+  naming = OpenRTM_aist.CorbaNaming(orb, "localhost")
+    
+  conin = OpenRTM_aist.CorbaConsumer()
+  conout = OpenRTM_aist.CorbaConsumer()
+
+  ec0 = OpenRTM_aist.CorbaConsumer(interfaceType=OpenRTM.ExtTrigExecutionContextService)
+  ec1 = OpenRTM_aist.CorbaConsumer(interfaceType=OpenRTM.ExtTrigExecutionContextService)
+
+  # find ConsoleIn0 component
+  conin.setObject(naming.resolve("ConsoleIn0.rtc"))
+
+  # get ports
+  inobj = conin.getObject()._narrow(RTC.RTObject)
+  pin = inobj.get_ports()
+  pin[0].disconnect_all()
+
+  # activate ConsoleIn0
+  eclisti = inobj.get_owned_contexts()
+  eclisti[0].activate_component(inobj)
+  ec0.setObject(eclisti[0])
+
+
+  # find ConsoleOut0 component
+  conout.setObject(naming.resolve("ConsoleOut0.rtc"))
+
+  # get ports
+  outobj = conout.getObject()._narrow(RTC.RTObject)
+  pout = outobj.get_ports()
+  pout[0].disconnect_all()
+  
+  # activate ConsoleOut0
+  eclisto = outobj.get_owned_contexts()
+  eclisto[0].activate_component(outobj)
+  ec1.setObject(eclisto[0])
+
+
+  # connect ports
+  conprof = RTC.ConnectorProfile("connector0", "", [pin[0],pout[0]], [])
+  OpenRTM_aist.CORBA_SeqUtil.push_back(conprof.properties,
+                                       OpenRTM_aist.NVUtil.newNV("dataport.interface_type",
+                                                                 "corba_cdr"))
+
+  OpenRTM_aist.CORBA_SeqUtil.push_back(conprof.properties,
+                                       OpenRTM_aist.NVUtil.newNV("dataport.dataflow_type",
+                                                                 "push"))
+
+  OpenRTM_aist.CORBA_SeqUtil.push_back(conprof.properties,
+                                       OpenRTM_aist.NVUtil.newNV("dataport.subscription_type",
+                                                                 subs_type))
+
+  ret = pin[0].connect(conprof)
+
+    
+  while 1:
+    try:
+      print("\n\n")
+      print("0: tick ConsoleIn component")
+      print("1: tick ConsoleOut component")
+      print("2: tick both components")
+      print("q: exit")
+      print("cmd? >")
+      cmd = str(sys.stdin.readline())
+      if cmd == "0\n":
+        ec0._ptr().tick()
+      elif cmd == "1\n":
+        ec1._ptr().tick()
+      elif cmd == "2\n":
+        ec0._ptr().tick()
+        ec1._ptr().tick()
+      elif cmd == "q\n":
+        print("exit")
+        break
+                
+    except:
+      print("Exception.")
+      pass
+
+if __name__ == "__main__":
+  main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/ConsoleIn.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/ConsoleIn.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/ConsoleIn.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,73 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+
+import RTC
+import OpenRTM_aist
+
+consolein_spec = ["implementation_id", "ConsoleIn",
+                  "type_name",         "ConsoleIn",
+                  "description",       "Console input component",
+                  "version",           "1.0",
+                  "vendor",            "Shinji Kurihara",
+                  "category",          "example",
+                  "activity_type",     "DataFlowComponent",
+                  "max_instance",      "10",
+                  "language",          "Python",
+                  "lang_type",         "script",
+                  ""]
+
+
+class ConsoleIn(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+    return
+        
+  def onInitialize(self):
+    self._data = RTC.TimedLong(RTC.Time(0,0),0)
+    self._outport = OpenRTM_aist.OutPort("out", self._data)
+    # Set OutPort buffer
+    self.addOutPort("out", self._outport)
+    return RTC.RTC_OK
+
+  def onExecute(self, ec_id):
+    print("> ",end="")
+    self._data.data = int(input())
+    print("Sending to subscriber: ", self._data.data)
+    self._outport.write()
+    return RTC.RTC_OK
+
+
+def MyModuleInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=consolein_spec)
+  manager.registerFactory(profile,
+                          ConsoleIn,
+                          OpenRTM_aist.Delete)
+
+  # Create a component
+  comp = manager.createComponent("ConsoleIn")
+  return
+
+
+def main():
+  # Initialize manager
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+  
+  # Set module initialization proceduer
+  # This procedure will be invoked in activateManager() function.
+  mgr.setModuleInitProc(MyModuleInit)
+
+  # Activate manager and register to naming service
+  mgr.activateManager()
+  
+  # run the manager in blocking mode
+  # runManager(False) is the default
+  mgr.runManager()
+  
+  # If you want to run the manager in non-blocking mode, do like this
+  # mgr.runManager(True)
+
+if __name__ == "__main__":
+  main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/ConsoleOut.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/ConsoleOut.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/ConsoleOut.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,74 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+import time
+
+import RTC
+import OpenRTM_aist
+
+consoleout_spec = ["implementation_id", "ConsoleOut",
+                   "type_name",         "ConsoleOut",
+                   "description",       "Console output component",
+                   "version",           "1.0",
+                   "vendor",            "Shinji Kurihara",
+                   "category",          "example",
+                   "activity_type",     "DataFlowComponent",
+                   "max_instance",      "10",
+                   "language",          "Python",
+                   "lang_type",         "script",
+                   ""]
+
+
+class ConsoleOut(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+    return
+
+  def onInitialize(self):
+    self._data = RTC.TimedLong(RTC.Time(0,0),0)
+    self._inport = OpenRTM_aist.InPort("in", self._data)
+    # Set InPort buffer
+    self.addInPort("in", self._inport)
+    return RTC.RTC_OK
+
+  def onExecute(self, ec_id):
+    if self._inport.isNew():
+      data = self._inport.read()
+      print("Received: ", data.data)
+      print("TimeStamp: ", data.tm.sec, "[s] ", data.tm.nsec, "[ns]")
+    time.sleep(0.001)
+    return RTC.RTC_OK
+
+
+def MyModuleInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=consoleout_spec)
+  manager.registerFactory(profile,
+                          ConsoleOut,
+                          OpenRTM_aist.Delete)
+
+  # Create a component
+  comp = manager.createComponent("ConsoleOut")
+
+
+def main():
+  # Initialize manager
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+
+  # Set module initialization proceduer
+  # This procedure will be invoked in activateManager() function.
+  mgr.setModuleInitProc(MyModuleInit)
+
+  # Activate manager and register to naming service
+  mgr.activateManager()
+
+  # run the manager in blocking mode
+  # runManager(False) is the default
+  mgr.runManager()
+
+  # If you want to run the manager in non-blocking mode, do like this
+  # mgr.runManager(True)
+
+if __name__ == "__main__":
+	main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/__init__.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/__init__.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/__init__.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1 @@
+# Empty file

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/gen.sh
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/gen.sh	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/gen.sh	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+python ${PYTHONPATH}/OpenRTM_aist/utils/rtc-template/rtc-template.py -bpython \
+    --module-name=ConsoleIn --module-type='DataFlowComponent' \
+    --module-desc='Console input component' \
+    --module-version=1.0 --module-vendor='Noriaki Ando, AIST' \
+    --module-category=example \
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC \
+    --module-max-inst=10 --outport=out:TimedLong
+
+python ${PYTHONPATH}/OpenRTM_aist/utils/rtc-template/rtc-template.py -bpython \
+    --module-name=ConsoleOut --module-type='DataFlowComponent' \
+    --module-desc='Console output component' \
+    --module-version=1.0 --module-vendor='Noriaki Ando, AIST' \
+    --module-category=example \
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC \
+    --module-max-inst=10 --inport=in:TimedLong
+
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/rtc.conf
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/rtc.conf	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/rtc.conf	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,6 @@
+corba.nameservers: localhost
+naming.formats: %n.rtc
+logger.enable: NO
+logger.log_level: TRACE
+exec_cxt.periodic.type: ExtTrigExecutionContext
+exec_cxt.periodic.rate: 1000

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/run.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/run.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/ExtTrigger/run.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,65 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+#
+# @file run.py
+# @brief ExtTrigger example startup script
+# @date $Date: 2007/10/26 $
+#
+# Copyright (c) 2003-2007 Noriaki Ando <n-ando at aist.go.jp> and Shinji Kurihara
+#          Task-intelligence Research Group,
+#          Intelligent System Research Institute,
+#          National Institute of Industrial Science (AIST), Japan
+#          All rights reserved.
+#
+
+import sys,os,platform
+import time
+import commands
+
+nsport="2809"
+sysinfo = platform.uname()
+hostname= sysinfo[1]
+plat=sys.platform
+
+if plat == "win32":
+    os.system("start \"\" \"%RTM_ROOT%\\bin\\rtm-naming.bat\"")
+    os.system("start python ConsoleIn.py")
+    os.system("start python Consoleout.py")
+    time.sleep(5)
+    os.system("python Connector.py")
+
+else:
+    status,term=commands.getstatusoutput("which xterm")
+    term += " -e"
+    if status != 0:
+        status,term=commands.getstatusoutput("which kterm")
+        term += " -e"
+
+    if status != 0:
+        status,term=commands.getstatusoutput("which uxterm")
+        term += " -e"
+
+    if status != 0:
+        status,term=commands.getstatusoutput("which gnome-terminal")
+        term += " -x"
+
+    if status != 0:
+        print("No terminal program (kterm/xterm/gnome-terminal) exists.")
+        exit
+
+    path = None
+    for p in sys.path:
+        if os.path.exists(os.path.join(p,"OpenRTM_aist")):
+            path = os.path.join(p,"OpenRTM_aist","utils","rtm-naming")
+            break
+    if path is None:
+        print("rtm-naming directory not exist.")
+        sys.exit(0)
+
+    os.system('python %s/rtm-naming.py &'%path)
+    os.system('%s python ConsoleIn.py &'%term)
+    os.system('%s python ConsoleOut.py &'%term)
+    time.sleep(1)
+    os.system("python Connector.py")

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/MobileRobotCanvas/TkMobileRobotSimulator.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/MobileRobotCanvas/TkMobileRobotSimulator.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/MobileRobotCanvas/TkMobileRobotSimulator.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,957 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+# @brief 2D mobile robot on tk canvas
+# @date $Date$
+# @author Norkai Ando <n-ando at aist.go.jp>
+#
+# Copyright (C) 2007
+#     Noriaki Ando
+#     Task-intelligence Research Group,
+#     Intelligent Systems Research Institute,
+#     National Institute of
+#         Advanced Industrial Science and Technology (AIST), Japan
+#     All rights reserved.
+#
+# $Id$
+#
+
+# $Log$
+#
+
+#from Tkinter import *
+from Tix import *
+import time
+import math
+
+# Import RTM module
+import RTC
+import OpenRTM_aist
+# This module's spesification
+# <rtc-template block="module_spec">
+tkmobilerobotsimulator_spec = ["implementation_id", "TkMobileRobotSimulator", 
+                               "type_name",         "TkMobileRobotSimulator", 
+                               "description",       "sample component for Python and Tkinter", 
+                               "version",           "1.0", 
+                               "vendor",            "Noriaki Ando, AIST", 
+                               "category",          "example", 
+                               "activity_type",     "DataFlowComponent", 
+                               "max_instance",      "10", 
+                               "language",          "Python", 
+                               "lang_type",         "SCRIPT",
+                               ""]
+# </rtc-template>
+
+
+class TkMobileRobotSimulator(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+        
+    self.pos = []
+    self.vel = []
+    return
+
+  def onInitialize(self):
+    self._d_vel = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._velIn = OpenRTM_aist.InPort("vel", self._d_vel)
+        
+    self._d_pos = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._posOut = OpenRTM_aist.OutPort("pos", self._d_pos)
+        
+    # Set InPort buffers
+    self.addInPort("vel",self._velIn)
+    self.addOutPort("pos",self._posOut)
+
+    # Bind variables and configuration variable
+    return RTC.RTC_OK
+
+  def onShutdown(self, ec_id):
+    return RTC.RTC_OK
+
+  def onDeactivated(self, ec_id):
+    self.pos = []
+    self.vel = []
+    return RTC.RTC_OK
+
+  def onExecute(self, ec_id):
+    if self._velIn.isNew():
+      self.vel = self._velIn.read().data
+    self._d_pos.data = self.pos
+    self._posOut.write()
+    time.sleep(0.01)
+    return RTC.RTC_OK
+
+  def get_velocity(self):
+    return self.vel
+
+  def set_position(self, pos):
+    self.pos = pos
+
+
+class ToggleItem:
+  def __init__(self):
+    self.active = True
+    return
+
+  def __del__(self):
+    self.delete()
+    return
+
+  def activate(self):
+    self.active = True
+    self.draw()
+    return
+
+  def deactivate(self):
+    self.active = False
+    self.delete()
+    return
+
+  def toggle(self):
+    if self.active:
+      self.deactivate()
+    else:
+      self.activate()
+    return
+
+class CanvasText(ToggleItem):
+  def __init__(self, canvas, text, x, y):
+    ToggleItem.__init__(self)
+    self.canvas = canvas
+    self.id = self.canvas.create_text(x, y, text=text)
+    self.text = text
+    self.x = x
+    self.y = y
+    self.draw_text(x, y, text)
+    return
+
+  def draw(self):
+    if self.active == False: return
+    self.delete()
+    self.id = self.canvas.create_text(self.x, self.y, text=self.text)
+    return
+
+  def draw_text(self, x, y, text):
+    self.x = x
+    self.y = y
+    self.text = text
+    self.draw()
+    return
+    
+  def delete(self):
+    self.canvas.delete(self.id)
+    return
+
+class RobotTitle(ToggleItem):
+  def __init__(self, simulator, robot, name, r):
+    ToggleItem.__init__(self)
+    self.canvas = simulator.get_canvas()
+    self.trans = simulator.get_translation()
+    self.robot = robot
+    self.name = name
+    self.r = r
+    self.id_circle = None
+    self.id_line0 = None
+    self.id_line1 = None
+    self.id_name = None
+    self.id_pos = None
+    self.llength = 50
+    return
+
+  def draw(self):
+    if self.active == False: return
+    self.delete()
+    rx, ry, rt = self.robot.get_pos()
+        
+    tmp_x0 = - self.r
+    tmp_y0 = - self.r
+    tmp_x1 =   self.r
+    tmp_y1 =   self.r
+    x0, y0 = self.trans(tmp_x0, tmp_y0, rx, ry, 0)
+    x1, y1 = self.trans(tmp_x1, tmp_y1, rx, ry, 0)
+
+    self.id_circle = self.canvas.create_oval(x0, y0, x1, y1,
+                                             width=2,
+                                             fill="", outline="#aaaaaa")
+    r =  (x1 - x0)/2
+    xo = x0 + r
+    yo = y0 - r
+    
+    lx0 = xo + (r / math.sqrt(2))
+    ly0 = yo - (r / math.sqrt(2))
+    lx1 = lx0 + self.llength
+    ly1 = ly0 - self.llength
+
+    self.id_line0 = self.canvas.create_line(lx0, ly0, lx1, ly1,
+                                            fill="#777777")
+    self.id_line1 = self.canvas.create_line(lx1, ly1, lx1 + 120, ly1,
+                                            fill="#777777")
+    self.id_name = self.canvas.create_text(lx1+120, ly1-8,
+                                           anchor=E, text=self.name)
+    pos_text = '(%5.2f, %5.2f, %5.2f)' % (rx, ry, (rt*180/math.pi)%360)
+    self.id_pos = self.canvas.create_text(lx1+120, ly1+8,
+                                          anchor=E, text=pos_text)
+    return
+
+
+  def delete(self):
+    if self.id_circle != None:
+      self.canvas.delete(self.id_circle)
+    if self.id_line0 != None:
+      self.canvas.delete(self.id_line0)
+    if self.id_line1 != None:
+      self.canvas.delete(self.id_line1)
+    if self.id_name != None:
+      self.canvas.delete(self.id_name)
+    if self.id_pos != None:
+      self.canvas.delete(self.id_pos)
+    return
+
+
+class CanvasGrid(ToggleItem):
+  def __init__(self, canvas, x0, y0, width, height, pitch, color, linewd):
+    ToggleItem.__init__(self)
+    self.canvas = canvas
+    self.x0 = x0
+    self.y0 = y0
+    self.width = width
+    self.height = height
+    self.pitch = pitch
+    self.color = color
+    self.linewd = linewd
+    self.idx = []
+    self.idy = []
+
+    self.draw()
+    return
+
+
+  def draw(self):
+    if self.active == False: return
+    self.delete()
+
+    x_start = int(self.x0 % self.pitch)
+    x_num   = int((self.width - x_start) / self.pitch) + 1
+    for x in range(x_num):
+      x0 = x_start + self.pitch * x
+      id = self.canvas.create_line(x0, 0, x0, self.height,
+                                   fill=self.color, width=self.linewd)
+      self.idx.append(id)
+
+    y_start = int(self.y0 % self.pitch)
+    y_num   = int((self.height - y_start) / self.pitch) + 1
+    for y in range(y_num):
+      y0 = y_start + self.pitch * y
+      id = self.canvas.create_line(0, y0, self.width, y0,
+                                   fill=self.color, width=self.linewd)
+      self.idy.append(id)
+
+    for i in self.idx:
+      self.canvas.tag_lower(i)
+    for i in self.idy:
+      self.canvas.tag_lower(i)
+    return
+
+
+  def delete(self):
+    for i in self.idx:
+      self.canvas.delete(i)
+    for i in self.idy:
+      self.canvas.delete(i)
+    return
+
+
+  def set_pitch(self, pitch):
+    self.pitch = pitch
+    self.draw()
+    return
+
+
+class CanvasAxis(ToggleItem):
+  def __init__(self, canvas, width, height):
+    ToggleItem.__init__(self)
+    self.x0 = width/2
+    self.y0 = height/2
+    self.width = width
+    self.height = height
+    self.canvas = canvas
+    self.id = [None] * 4
+    self.draw()
+    return
+
+
+  def draw(self):
+    if self.active == False: return
+    self.delete()
+    self.id[0] = self.canvas.create_line(0, self.height/2, 
+                                         self.width, self.height/2)
+    self.id[1] = self.canvas.create_text(self.width - 10,
+                                         self.height/2 + 10,
+                                         text="x")
+    self.id[2] = self.canvas.create_line(self.width/2, 0, 
+                                         self.width/2, self.height)
+    self.id[3] = self.canvas.create_text(self.width/2 + 10,
+                                         + 10, text="y")
+    
+    return
+
+  def delete(self):
+    for i in self.id:
+      self.canvas.delete(i)
+    return
+
+
+
+class SimulatedObject:
+  def __init__(self, simulator):
+    self.simulator = simulator
+    self.tick = simulator.get_tick()
+    self.canvas = simulator.get_canvas()
+    self.trans = simulator.get_translation()
+    return
+
+  def translate(self, x, y, dx, dy, dth):
+    return self.trans(x, y, dx, dy, dth)
+
+  def get_tick(self):
+    return self.simulator.get_tick()
+
+
+import tkSimpleDialog
+
+class PropertyDialog:
+  def __init__(self):
+    # robot's profile
+    self.name = ""
+    self.type = ""
+    self.description = ""
+    self.vendor = ""
+    # robot's parameter/input/output
+    self.param = []
+    self.input = []
+    self.output = []
+    # max length of label text
+    self.label_len = 0
+    # max length of unit text
+    self.unit_len = 0
+
+    self.apply_param  = None
+    self.apply_input  = None
+    self.reset_output = None
+    return
+
+  def set_profile(self, name, type, description, vendor):
+    self.name = name
+    self.type = type
+    self.description = description
+    self.vendor =vendor
+    return
+
+  def append_parameter(self, label, variable, unit):
+    self.param.append({"label":label, "var":variable, "unit":unit})
+    self.label_len = max(len(label), self.label_len)
+    self.unit_len  = max(len(unit), self.unit_len)
+    return
+
+  def append_input(self, label, variable, unit):
+    self.input.append({"label":label, "var":variable, "unit":unit})
+    self.label_len = max(len(label), self.label_len)
+    self.unit_len  = max(len(unit), self.unit_len)
+    return
+
+  def append_output(self, label, variable, unit):
+    self.output.append({"label":label, "var":variable, "unit":unit})
+    self.label_len = max(len(label), self.label_len)
+    self.unit_len  = max(len(unit), self.unit_len)
+    return
+
+  def set_apply_param(self, func):
+    self.apply_param = func
+    return
+
+  def set_apply_input(self, func):
+    self.apply_input = func
+    return
+
+  def set_reset_output(self, func):
+    self.reset_output = func
+    return
+
+  def pack(self):
+    f = Toplevel()
+    self.toplevel = f
+    f.title(self.name)
+    w0 = LabelFrame(f, label="Robot's Profile",
+                    options="frame.anchor w frame.justify left")
+    prof_frame = w0.subwidget('frame')
+    self.profile_label(prof_frame)
+
+    w1 = LabelFrame(f, label="Robot's Parameters")
+    param_frame = w1.subwidget('frame')
+    self.label_entries(param_frame, self.param)
+    if self.apply_param != None:
+      self.button(param_frame, "Apply", self.apply_param)
+
+    w2 = LabelFrame(f, label="Robot's Input Values")
+    input_frame = w2.subwidget('frame')
+    self.label_entries(input_frame, self.input)
+    if self.apply_input != None:
+      self.button(input_frame, "Set", self.apply_input)
+
+    w3 = LabelFrame(f, label="Robot's Output Values")
+    output_frame = w3.subwidget('frame')
+    self.label_entries(output_frame, self.output)
+    if self.reset_output != None:
+      self.button(output_frame, "Reset", self.reset_output)
+
+
+    for w in [w0, w1, w2, w3]:
+      w.pack(side=TOP, anchor=W, fill=X)
+    self.button(f, "OK", self.on_ok)
+
+    return
+
+  def on_ok(self):
+    self.toplevel.destroy()
+    return
+
+
+  def button(self, master, label, func):
+    bt = Button(master, text=label, command=func, width=10,
+                padx=3, pady=3)
+    bt.pack(side=TOP, padx=5, pady=5)
+    return
+
+
+  def profile_label(self, master):
+    t = ["Robot's name: ", "Robot's type: ", "Description: ", "Vendor: "]
+    for i in range(len(t)):
+      Label(master, text=t[i], anchor=W).grid(row=i, sticky=W,
+                                              padx=3, pady=3)
+    l = [self.name, self.type, self.description, self.vendor]
+    for i in range(len(l)):
+      Label(master, text=l[i], anchor=W).grid(row=i, column=1, sticky=W,
+                                              padx=3, pady=3)
+    return
+
+        
+  def label_entry(self, master, label0, var, label1):
+    f = Frame(master)
+    l0 = Label(f, text=label0, width=self.label_len, justify=LEFT, anchor=W)
+    e = Entry(f, width=7, textvariable=var,
+              justify=RIGHT, relief=GROOVE, bd=2)
+    l1 = Label(f, text=label1, width=self.unit_len, justify=LEFT, anchor=W)
+    for w in [l0, e, l1]:
+      w.pack(side=LEFT, anchor=W, padx=3, pady=3)
+    return f
+
+  def label_entries(self, f, props):
+    for p in props:
+      self.label_entry(f, p["label"], p["var"], p["unit"]).pack(side=TOP)
+    return
+
+
+
+class DiffMobileModel:
+  def __init__(self, radius, wheeld, pos = (0, 0, math.pi/2), dt=0.1):
+    self.radius = radius
+    self.wheeld = wheeld
+    self.dt = dt
+    self.pre_x = pos[0]
+    self.pre_y = pos[1]
+    self.pre_t = pos[2]
+    self.pre_x_dot = 0
+    self.pre_y_dot = 0
+    self.pre_t_dot = 0
+    return
+
+
+  def set_wheel_radius(self, radius):
+    # wheel radius [m]
+    self.radius = radius
+    return
+
+
+  def set_wheel_distance(self, distance):
+    # distance between wheels [m]
+    self.wheeld = distance
+    return
+
+  
+  def set_time_tick(self, tick):
+    # time tick for simulation [sec]
+    self.dt = tick
+    return
+
+
+  def set_pos(self, pos = (0, 0, math.pi/2)):
+    # x:     pos[0] [m]
+    # y:     pos[1] [m]
+    # theta: pos[2] [rad]
+    self.pre_x = pos[0]
+    self.pre_y = pos[1]
+    self.pre_t = pos[2]
+    return
+
+
+  def get_pos(self):
+    return self.pre_x, self.pre_y, self.pre_t
+
+  def control(self, w1, w2):
+    # w1: [rad/s]
+    # w2: [rad/s]
+    x_dot = self.radius * (w1 + w2) * math.cos(self.pre_t)
+    y_dot = self.radius * (w1 + w2) * math.sin(self.pre_t)
+    t_dot = self.radius * (-w1 + w2) / self.wheeld
+
+    x     = (self.dt * (self.pre_x_dot + x_dot) / 2) + self.pre_x
+    y     = (self.dt * (self.pre_y_dot + y_dot) / 2) + self.pre_y
+    theta = (self.dt * (self.pre_t_dot + t_dot) / 2) + self.pre_t
+
+    self.pre_x = x
+    self.pre_y = y
+    self.pre_t = theta
+
+    self.pre_x_dot = x_dot
+    self.pre_y_dot = y_dot
+    self.pre_t_dot = t_dot
+    
+    return x, y, theta
+
+
+
+class DDMobileRobot(SimulatedObject):
+  count = 0
+  def __init__(self, simulator, radius=2, wheeld=20,
+               pos = (0, 0, math.pi/2)):
+    SimulatedObject.__init__(self, simulator)
+    self.tick = self.get_tick()
+    self.model = DiffMobileModel(radius, wheeld, pos, self.tick)
+    self.fig = [[10, 0], [5, 10], [-10, 10], [-10, -10], [5, -10]]
+    self.id = None
+    self.wl = 0.0
+    self.wr = 0.0
+    self.name = "DDMobileRobot" + str(self.__class__.count)
+    self.__class__.count += 1 
+    self.comp = OpenRTM_aist.Manager.instance().createComponent("TkMobileRobotSimulator")
+
+    # properties
+    self.rentry = StringVar()
+    self.rentry.set(radius)
+    self.dentry = StringVar()
+    self.dentry.set(wheeld)
+    # input variables
+    self.wlentry = StringVar()
+    self.wrentry = StringVar()
+    # output variables
+    self.xentry = StringVar()
+    self.yentry = StringVar()
+    self.tentry = StringVar()
+    return
+
+
+  def __del__(self):
+    try:
+      self.comp.exit()
+      del self.comp
+    except:
+      pass
+    self.delete()
+    return
+
+
+  def get_name(self):
+    return self.name
+
+
+  def set_pos(self, (x, y, th)):
+    self.model.set_pos((x, y, th))
+    return
+
+
+  def get_pos(self):
+    return self.model.get_pos()
+
+
+  def set_wheel_velocity(self, wl, wr):
+    self.wl = wl
+    self.wr = wr
+    self.wlentry.set('%5.2f'%self.wl)
+    self.wrentry.set('%5.2f'%self.wr)
+    return
+
+
+  def on_update(self):
+    self.model.set_time_tick(self.get_tick())
+    v = self.comp.get_velocity()
+    if len(v) == 2:
+      self.set_wheel_velocity(v[0], v[1])
+    self.x, self.y, self.th = self.model.control(self.wl, self.wr)
+    self.th_deg = (self.th * 180 / math.pi) % 360
+    self.comp.set_position((self.x, self.y, self.th_deg))
+    self.xentry.set('%5.2f'%self.x)
+    self.yentry.set('%5.2f'%self.y)
+    self.tentry.set('%5.2f'%self.th_deg)
+    self.draw()
+    return
+        
+
+  def draw(self):
+    # converting actual coordinate system into display coordinate
+    # system, and drawing figures
+    robotfig = []
+    for pos in self.fig:
+      robotfig.append(self.translate(pos[0], pos[1],
+                                       self.x, self.y, self.th))
+    if self.id != None:
+      self.canvas.delete(self.id)
+    self.id = self.canvas.create_polygon(robotfig, 
+                                         fill="#00aa00",
+                                         outline="#eeeeee")
+    return
+
+
+  def delete(self):
+    if self.id != None:
+      self.canvas.delete(self.id)
+    return
+
+
+  def property_page(self):
+    p = PropertyDialog()
+    p.set_profile(self.name, "DDMobileRobot",
+                  "Differential Drive Mobile Robot", "AIST")
+    p.append_parameter("Wheel radius r: ", self.rentry, "[m]")
+    p.append_parameter("Wheel distance d: ", self.dentry, "[m]")
+    p.append_input("Angular velocity (LEFT)  wl: ", self.wlentry, "[rad/s]")
+    p.append_input("Angular velocity (RIGHT) wr: ", self.wrentry, "[rad/s]")
+    p.append_output("Robot position x : ", self.xentry, "[m]")
+    p.append_output("Robot position y : ", self.yentry, "[m]")
+    p.append_output("Robot position th: ", self.tentry, "[deg]")
+    p.set_apply_param(self.on_apply_param)
+    p.set_apply_input(self.on_apply_input)
+    p.set_reset_output(self.on_reset_output)
+    p.pack()
+    return
+
+
+  def on_reset_output(self):
+    self.set_pos((0.0, 0.0, math.pi/2))
+    return
+
+
+  def on_apply_param(self):
+    r = float(self.rentry.get())
+    d = float(self.dentry.get())
+    self.model.set_wheel_radius(r)
+    self.model.set_wheel_distance(d)
+    return
+
+
+  def on_apply_input(self):
+    self.wl = float(self.wlentry.get())
+    self.wr = float(self.wrentry.get())
+    return
+
+
+
+
+class TkMobileRobot(Frame):
+  def __init__(self, master=None, width=800, height=600):
+    Frame.__init__(self, master)
+
+    # canvas properties
+    self.width = width
+    self.height = height
+    # zero of canvas
+    self.x0 = width/2
+    self.y0 = height/2
+
+    self.wd = 150
+
+    self.robots = {}
+
+    self.robot = None
+    self.postext = None
+
+    self.scale = 1.0
+    self.scale_var = DoubleVar()
+    self.scale_var.set(self.scale)
+
+    self.grid_pitch = 50
+
+    self.tick = 0.1
+    self.default_tick = 0.1
+    self.tickscale_var = DoubleVar()
+    self.tickscale_var.set(self.tick)
+
+    self.axis_check = StringVar()
+    self.axis_check.set("on")
+    self.grid_check = StringVar()
+    self.grid_check.set("on")
+    self.rname_check = StringVar()
+    self.rname_check.set("on")
+    self.rnames = {}
+
+    self.robot_kind_var = StringVar()
+    self.robot_factory = {"DDMobileRobot": DDMobileRobot}
+
+
+
+    self.init()
+    self.pack()
+
+
+    self.after(20, self.on_update)
+    return
+
+  def init(self):
+    self.canvas = Canvas(self, bg="#eeeeee",
+                         width = self.width, height = self.height)
+    self.canvas.pack(side=LEFT)
+
+    self.can_grid = CanvasGrid(self.canvas, self.x0, self.y0,
+                               self.width, self.height, self.grid_pitch,
+                               "#aaaaaa", 1)
+    self.can_axis = CanvasAxis(self.canvas, self.width, self.height)
+
+    self.frame = Frame(self)
+    self.frame.pack(side=LEFT)
+
+    # Screen control
+    self.scrctrl_frame = Frame(self.frame, width=self.wd, height=300,
+                               relief=GROOVE, bd=2)
+    self.scrctrl_frame.pack(side=TOP, fill=X)
+    self.create_scale(self.scrctrl_frame)
+    self.create_checkbutton(self.scrctrl_frame)
+
+    # Robot manager
+    self.robomgr_frame = Frame(self.frame, width=self.wd, height=300,
+                               relief=GROOVE, bd=2)
+    self.robomgr_frame.pack(side=TOP)
+    self.create_robotcreator(self.robomgr_frame)
+    self.create_robotlist(self.robomgr_frame)
+    return
+
+
+  def on_update(self):
+    for o in self.robots.keys():
+      self.robots[o].on_update()
+    for r in self.rnames.keys():
+      self.rnames[r].draw()
+    self.after(20, self.on_update)
+    return
+
+
+  def get_tick(self):
+    return self.tick
+
+
+  def get_canvas(self):
+    return self.canvas
+
+
+  def get_translation(self):
+    return self.real_to_canvas
+
+
+  #------------------------------------------------------------
+  # Scale control set
+  def create_scale(self, frame):
+    dummy = Frame(frame, width=self.wd)
+    dummy.pack(side=TOP)
+    sl = Scale(frame, from_=0, to=10, resolution=0.01,
+               label="Scale Factor", command=self.on_scale,
+               variable=self.scale_var, orient=HORIZONTAL)
+    bt = Button(frame, text="Reset Scale", command=self.reset_scale)
+    sl.pack(side=TOP, fill=X)
+    bt.pack(side=TOP, fill=X)
+
+    sl = Scale(frame, from_=0.001, to=1, resolution=0.001,
+               label="Time tick [s]", command=self.on_tickchange,
+               variable=self.tickscale_var, orient=HORIZONTAL)
+    bt = Button(frame, text="Reset Tick", command=self.reset_tickscale)
+    sl.pack(side=TOP, fill=X)
+    bt.pack(side=TOP, fill=X)
+    return
+
+
+  def on_scale(self, val):
+    v =  float(val)
+    if v == 0.0:
+      pitch = 0
+    else:
+      pitch = self.grid_pitch/v
+      self.scale = v
+    self.can_grid.set_pitch(pitch)
+    return
+        
+
+  def reset_scale(self):
+    self.scale_var.set(1.)
+    pitch = self.grid_pitch/1.0
+    self.scale = 1.0
+    self.can_grid.set_pitch(pitch)
+    return
+
+
+  def on_tickchange(self, val):
+    v =  self.tickscale_var.get()
+    if v == 0.0:
+      self.tick = 0
+    else:
+      self.tick = v
+    return
+        
+  def reset_tickscale(self):
+    self.tick = self.default_tick
+    self.tickscale_var.set(self.default_tick)
+    return
+  # end of Scale widget set
+  #------------------------------------------------------------
+
+  #------------------------------------------------------------
+  # Canvas control set
+  def create_checkbutton(self, frame):
+    axis = Checkbutton(frame, text="Axis",
+                       onvalue="on", offvalue="off",
+                       justify=LEFT, anchor=W,
+                       variable=self.axis_check,
+                       command=self.can_axis.toggle)
+    grid = Checkbutton(frame, text="Grid",
+                       onvalue="on", offvalue="off",
+                       justify=LEFT, anchor=W,
+                       variable=self.grid_check,
+                       command=self.can_grid.toggle)
+    rname = Checkbutton(frame, text="Robots' name",
+                        onvalue="on", offvalue="off",
+                        justify=LEFT, anchor=W,
+                        variable=self.rname_check,
+                        command=self.on_rname_toggle)
+    for w in [axis, grid, rname]:
+      w.pack(side=TOP, anchor=W, fill=X)
+    return
+
+
+  def on_rname_toggle(self):
+    for r in self.rnames.keys():
+      self.rnames[r].toggle()
+    return
+
+
+  # end of Canvas control set
+  #------------------------------------------------------------
+
+
+  #------------------------------------------------------------
+  # Robot creator control set
+  def create_robotcreator(self, frame):
+    lb = Label(frame, text="Robot Type", anchor=W, justify=LEFT)
+
+    om = OptionMenu(frame, label="Type: ", variable=self.robot_kind_var)
+    for opt in self.robot_factory.keys():
+      om.add_command(opt, label=opt)
+    self.robot_kind_var.set(self.robot_factory.keys()[0])
+
+    creater = Button(frame, text="Create", command=self.create_robot)
+    deleter = Button(frame, text="Delete", command=self.delete_robot)
+
+    om.pack(side=TOP, fill=X)
+    creater.pack(side=TOP, fill=X)
+    deleter.pack(side=TOP, fill=X)
+    return
+
+
+  def create_robotlist(self, frame):
+    f = Frame(frame, width=self.wd, height=200)
+    f.pack(side=TOP, fill=BOTH, expand=1)
+    ys = Scrollbar(f, orient = VERTICAL)
+    ys.grid(row = 0, column=1, sticky = N+S)
+    xs = Scrollbar(f, orient = HORIZONTAL)
+    xs.grid(row = 1, column=0, sticky = E+W)
+
+    self.rlistbox = Listbox(f,
+                            xscrollcommand = xs.set,
+                            yscrollcommand = ys.set,
+                            selectmode = 'single',
+                            setgrid = TRUE,
+                            height=20)
+    self.rlistbox.grid(row = 0, column = 0, sticky = N+S+E+W,)
+    xs['command']=self.rlistbox.xview
+    ys['command']=self.rlistbox.yview
+    self.rlistbox.bind("<Double-Button-1>", self.on_clickrlistbox)
+    return
+
+
+  def on_clickrlistbox(self, event):
+    index = self.rlistbox.curselection()
+    if len(index) > 0:
+      robot_name  = self.rlistbox.get(index[0])
+      self.robots[robot_name].property_page()
+    return
+
+
+  def create_robot(self):
+    kind = self.robot_kind_var.get()
+    robot = self.robot_factory[kind](self)
+
+    self.rlistbox.insert(END, robot.get_name())
+    self.rnames[robot.get_name()] = RobotTitle(self,
+                                               robot,
+                                               robot.get_name(),
+                                               20)
+    self.robots[robot.get_name()] = robot
+    return
+
+
+  def delete_robot(self):
+    index = self.rlistbox.curselection()
+    if len(index) > 0:
+      robot_name  = self.rlistbox.get(index[0])
+      r = self.rnames.pop(robot_name)
+      del(r)
+      r = self.robots.pop(robot_name)
+      del(r)
+    self.rlistbox.delete(index)
+    return
+
+  # end of Robot creator control set
+  #------------------------------------------------------------
+
+
+  #------------------------------------------------------------
+  # 
+  def real_to_canvas(self, x, y, dx, dy, dt):
+    # Simulator coordinate system -> display coordinate system
+    # x, y: original position
+    # dx, dy, dt: translation and rotation vector
+    # translation and rotation
+    x_tmp = (math.cos(dt) * x - math.sin(dt) * y + dx)/self.scale
+    y_tmp = (math.sin(dt) * x + math.cos(dt) * y + dy)/self.scale
+    # align to canvas coordinate system (origin is center and y+ is upward)
+    xo =  x_tmp  + self.x0
+    yo = -y_tmp + self.y0
+    return xo, yo
+
+
+def TkMobileRobotSimulatorInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=tkmobilerobotsimulator_spec)
+  manager.registerFactory(profile,
+                          TkMobileRobotSimulator,
+                          OpenRTM_aist.Delete)
+  return
+
+
+def main():
+  m = TkMobileRobot(Tk())
+  m.master.title("Tk Mobile Robot Simulator")
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+  mgr.activateManager()
+  profile = OpenRTM_aist.Properties(defaults_str=tkmobilerobotsimulator_spec)
+  mgr.registerFactory(profile, TkMobileRobotSimulator, OpenRTM_aist.Delete)
+  mgr.runManager(True)
+  m.mainloop()
+
+if  __name__ == '__main__':
+  main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/MobileRobotCanvas/__init__.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/MobileRobotCanvas/__init__.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/MobileRobotCanvas/__init__.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1 @@
+# Empty file

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/MobileRobotCanvas/gen.sh
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/MobileRobotCanvas/gen.sh	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/MobileRobotCanvas/gen.sh	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+python ${PYTHONPATH}/OpenRTM_aist/utils/rtc-template/rtc-template.py -bpython \
+    --module-name=MobileRobotCanvas --module-type='DataFlowComponent' \
+    --module-desc='sample component for Python and Tkinter' \
+    --module-version=1.0 --module-vendor='Noriaki Ando, AIST' \
+    --module-category=example \
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC \
+    --module-max-inst=10 --inport=vel:TimedFloatSeq
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/MobileRobotCanvas/rtc.conf
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/MobileRobotCanvas/rtc.conf	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/MobileRobotCanvas/rtc.conf	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,4 @@
+corba.nameservers: localhost
+naming.formats: %n.rtc
+logger.enable: NO
+manager.shutdown_on_nortcs: NO
\ No newline at end of file

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTBrick.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTBrick.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTBrick.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,131 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import nxt.locator
+from nxt.sensor import *
+from nxt.motor import *
+import time
+
+class NXTBrick:
+  def __init__(self, bsock=None):
+    """
+    Ctor
+    Connecting to NXT brick and creating motor object, sensor object
+    and so on. Motor encoders will be reset.
+    """
+    if bsock:
+      self.sock = bsock
+    else:
+      self.sock = nxt.locator.find_one_brick().connect()
+
+    self.motors = [Motor(self.sock, PORT_A),
+                   Motor(self.sock, PORT_B),
+                   Motor(self.sock, PORT_C)]
+            
+    self.sensors = [TouchSensor(self.sock, PORT_1),
+                    SoundSensor(self.sock, PORT_2),
+                    LightSensor(self.sock, PORT_3),
+                    UltrasonicSensor(self.sock, PORT_4)]
+    self.resetPosition()
+
+  def close(self):
+    """
+    Finalizing connection with NXT brick.
+    """
+    self.sock.close()
+
+  def resetPosition(self, relative = 0):
+    """
+    Resetting encoders of NXT motors
+    """
+    for m in self.motors:
+      m.reset_position(relative)
+
+  def setMotors(self, vels):
+    """
+    This operation receives array and set them as motor power.  If the
+    number of vels items does not match with the number of motors,
+    smaller number of them will be taken and set respectively.
+    """
+    for i, v in enumerate(vels[:min(len(vels),len(self.motors))]):
+      self.motors[i].power = max(min(v,127),-127)
+      self.motors[i].mode = MODE_MOTOR_ON | MODE_REGULATED
+      self.motors[i].regulation_mode = REGULATION_MOTOR_SYNC
+      self.motors[i].run_state = RUN_STATE_RUNNING
+      self.motors[i].tacho_limit = 0
+      self.motors[i].set_output_state()
+
+  def getMotors(self):
+    """
+    Getting motors' angle (degrees)
+    """
+    state = []
+    for m in self.motors:
+      stat = None
+      for i in range(3):
+        try:
+          stat = m.get_output_state()
+          break
+        except:
+          time.sleep(0.01)
+          continue
+
+      if stat == None:
+        import sys
+        print("Unknown motor encoder error")
+        print(sys.exc_info()[1])
+      state.append(stat)
+
+    return state
+
+
+  def getSensors(self):
+    """
+    Getting sensors' values. Data will be returned as array.
+    """
+    state = []
+    for s in self.sensors:
+      stat = None
+      for i in range(3):
+        try:
+          stat = s.get_sample()
+          break
+        except:
+          time.sleep(0.01)
+          continue
+      if stat == None:
+        import sys
+        print("Unknown sensor error")
+        print(sys.exc_info()[1])
+      state.append(stat)
+
+    return state
+
+
+"""
+Test program
+It gives appropriate values to motors, and angles of motors are
+obtained and shown.  Sensor data are also obtained and shown.
+"""
+if __name__ == "__main__":
+  import time
+  nxt = NXTBrick()
+  print("connected")
+    
+  # Testing motors
+  for i in range(0):
+    nxt.setMotors([80,-80,80])
+    print("Motor: ")
+    mstat = nxt.getMotors()
+    for i, m in enumerate(mstat):
+      print("(" , i, "): ", m)
+    time.sleep(0.1)
+  nxt.setMotors([0,0,0])
+
+  # Testing sensors
+  for i in range(100):
+    sensors = ["Touch", "Sound", "Light", "USonic"]
+    sval = nxt.getSensors()
+    print(sval)
+    time.sleep(0.1)

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTBrick20.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTBrick20.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTBrick20.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,127 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import nxt.locator
+from nxt.sensor import *
+from nxt.motor import *
+import time
+
+class NXTBrick:
+  def __init__(self, bsock=None):
+    """
+    Ctor
+    Connecting to NXT brick and creating motor object, sensor object
+    and so on. Motor encoders will be reset.
+    """
+    if bsock:
+      self.sock = bsock
+    else:
+      self.sock = nxt.locator.find_one_brick()
+
+    self.motors = [Motor(self.sock, PORT_A),
+                   Motor(self.sock, PORT_B),
+                   Motor(self.sock, PORT_C)]
+            
+    self.sensors = [Touch(self.sock, PORT_1),
+                    Sound(self.sock, PORT_2),
+                    Light(self.sock, PORT_3),
+                    Ultrasonic(self.sock, PORT_4)]
+    self.resetPosition()
+
+  def close(self):
+    """
+    Finalizing connection with NXT brick.
+    """
+    self.sock.close()
+
+  def resetPosition(self, relative = 0):
+    """
+    Resetting encoders of NXT motors
+    """
+    for m in self.motors:
+      m.reset_position(relative)
+
+  def setMotors(self, vels):
+    """
+    This operation receives array and set them as motor power.  If the
+    number of vels items does not match with the number of motors,
+    smaller number of them will be taken and set respectively.
+    """
+    for i, v in enumerate(vels[:min(len(vels),len(self.motors))]):
+      self.motors[i].sync = 1
+      self.motors[i].run(max(min(v,127),-127))
+
+  def getMotors(self):
+    """
+    Getting motors' angle (degrees)
+    """
+    state = []
+    for m in self.motors:
+      stat = None
+      for i in range(3):
+        try:
+          stat = m.get_tacho().tacho_count
+          break
+        except:
+          time.sleep(0.01)
+          continue
+
+      if stat == None:
+        import sys
+        print("Unknown motor encoder error")
+        print(sys.exc_info()[1])
+      state.append(stat)
+
+    return state
+
+
+  def getSensors(self):
+    """
+    Getting sensors' values. Data will be returned as array.
+    """
+    state = []
+    for s in self.sensors:
+      stat = None
+      for i in range(3):
+        try:
+          stat = s.get_sample()
+          break
+        except:
+          time.sleep(0.01)
+          continue
+      if stat == None:
+        import sys
+        print("Unknown sensor error")
+        print(sys.exc_info()[1])
+      state.append(stat)
+
+    return state
+
+
+"""
+Test program
+It gives appropriate values to motors, and angles of motors are
+obtained and shown.  Sensor data are also obtained and shown.
+"""
+if __name__ == "__main__":
+  import time
+  nxt = NXTBrick()
+  print("connected")
+    
+  # Testing motors
+  for i in range(0):
+    nxt.setMotors([80,-80,80])
+    print("Motor: ")
+    mstat = nxt.getMotors()
+    for i, m in enumerate(mstat):
+      print("(" , i, "): ", m)
+    time.sleep(0.1)
+  nxt.setMotors([0,0,0])
+
+  # Testing sensors
+  for i in range(100):
+    sensors = ["Touch", "Sound", "Light", "USonic"]
+    sval = nxt.getSensors()
+    print(sval)
+    time.sleep(0.1)

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTRTC.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTRTC.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTRTC.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,151 @@
+#!/usr/bin/env python
+# -*- coding:utf-8 -*-
+# -*- Python -*-
+
+import sys
+import time
+sys.path.append(".")
+
+# Import RTM module
+import RTC
+import OpenRTM_aist
+
+
+# import NXTBrick class
+import NXTBrick
+
+
+# This module's spesification
+# <rtc-template block="module_spec">
+nxtrtc_spec = ["implementation_id", "NXTRTC", 
+               "type_name",         "NXTRTC", 
+               "description",       "NXT sample component", 
+               "version",           "0.1", 
+               "vendor",            "AIST", 
+               "category",          "example", 
+               "activity_type",     "DataFlowComponent", 
+               "max_instance",      "10", 
+               "language",          "Python", 
+               "lang_type",         "SCRIPT",
+               "conf.default.map", "A,B",
+               ""]
+
+# </rtc-template>
+
+class NXTRTC(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+
+    # initialize of configuration-data.
+    # <rtc-template block="configurations">
+    self._map = [['A', 'B']]
+    self._nxtbrick = None
+    self._mapping = {'A':0,'B':1,'C':2}
+     
+  def onInitialize(self):
+    # DataPorts initialization
+    # <rtc-template block="data_ports">
+    self._d_vel = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._velIn = OpenRTM_aist.InPort("vel", self._d_vel)
+    self.addInPort("vel",self._velIn)
+    self._d_pos = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._posOut = OpenRTM_aist.OutPort("pos", self._d_pos)
+    self.addOutPort("pos",self._posOut)
+    self._d_sens = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._sensOut = OpenRTM_aist.OutPort("sens", self._d_sens)
+    self.addOutPort("sens",self._sensOut)
+
+    # Bind variables and configuration variable
+    # <rtc-template block="bind_config">
+    self.bindParameter("map", self._map, "A,B")
+
+    # create NXTBrick object
+    try:
+      print("Connecting to NXT brick ....")
+      self._nxtbrick = NXTBrick.NXTBrick()
+      print("Connection established.")
+    except:
+      print("NXTBrick connection failed.")
+      return RTC.RTC_ERROR
+
+    return RTC.RTC_OK
+
+  def onFinalize(self):
+    self._nxtbrick.close()
+
+  def onActivated(self, ec_id):
+    self._nxtbrick.setMotors([0,0,0])
+    # reset NXTBrick's position.
+    self._nxtbrick.resetPosition()
+    return RTC.RTC_OK
+
+  def onDeactivated(self, ec_id):
+    self._nxtbrick.setMotors([0,0,0])
+    # reset NXTBrick's position.
+    self._nxtbrick.resetPosition()
+
+    return RTC.RTC_OK
+
+  def onExecute(self, ec_id):
+    try:
+      # check new data.
+      if self._velIn.isNew():
+        # read velocity data from inport.
+        self._d_vel = self._velIn.read()
+        
+        vel_ = [0,0,0]
+        vel_[self._mapping[self._map[0][0]]] = self._d_vel.data[0]
+        vel_[self._mapping[self._map[0][1]]] = self._d_vel.data[1]
+        # set velocity
+#       print(vel_)
+        self._nxtbrick.setMotors(vel_)
+      else:
+        print("buffer empty")
+
+      # get sensor data.
+      sensor_   = self._nxtbrick.getSensors()
+      if sensor_:
+        self._d_sens.data = sensor_
+        # write sensor data to outport.
+        self._sensOut.write()
+
+      # get position data.
+      position_ = self._nxtbrick.getMotors()
+      if position_:
+        self._d_pos.data = \
+            [position_[self._mapping[self._map[0][0]]][9], \
+               position_[self._mapping[self._map[0][1]]][9]]
+        # write position data to outport.
+        self._posOut.write()
+    except:
+      print(sys.exc_info()[1])
+
+    return RTC.RTC_OK
+
+
+
+def NXTRTCInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=nxtrtc_spec)
+  manager.registerFactory(profile,
+                          NXTRTC,
+                          OpenRTM_aist.Delete)
+
+
+def MyModuleInit(manager):
+  NXTRTCInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("NXTRTC")
+
+
+
+def main():
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+  mgr.setModuleInitProc(MyModuleInit)
+  mgr.activateManager()
+  mgr.runManager()
+
+if __name__ == "__main__":
+  main()
+
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTRTC20.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTRTC20.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTRTC20.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,150 @@
+#!/usr/bin/env python
+# -*- coding:utf-8 -*-
+# -*- Python -*-
+
+import sys
+import time
+sys.path.append(".")
+
+# Import RTM module
+import RTC
+import OpenRTM_aist
+
+
+# import NXTBrick class
+import NXTBrick20
+
+
+# This module's spesification
+# <rtc-template block="module_spec">
+nxtrtc_spec = ["implementation_id", "NXTRTC", 
+               "type_name",         "NXTRTC", 
+               "description",       "NXT sample component", 
+               "version",           "0.1", 
+               "vendor",            "AIST", 
+               "category",          "example", 
+               "activity_type",     "DataFlowComponent", 
+               "max_instance",      "10", 
+               "language",          "Python", 
+               "lang_type",         "SCRIPT",
+               "conf.default.map", "A,B",
+               ""]
+
+# </rtc-template>
+
+class NXTRTC(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+
+    # initialize of configuration-data.
+    # <rtc-template block="configurations">
+    self._map = [['A', 'B']]
+    self._nxtbrick = None
+    self._mapping = {'A':0,'B':1,'C':2}
+     
+  def onInitialize(self):
+    # DataPorts initialization
+    # <rtc-template block="data_ports">
+    self._d_vel = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._velIn = OpenRTM_aist.InPort("vel", self._d_vel)
+    self.addInPort("vel",self._velIn)
+    self._d_pos = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._posOut = OpenRTM_aist.OutPort("pos", self._d_pos)
+    self.addOutPort("pos",self._posOut)
+    self._d_sens = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._sensOut = OpenRTM_aist.OutPort("sens", self._d_sens)
+    self.addOutPort("sens",self._sensOut)
+
+    # Bind variables and configuration variable
+    # <rtc-template block="bind_config">
+    self.bindParameter("map", self._map, "A,B")
+
+    # create NXTBrick object
+    try:
+      print("Connecting to NXT brick ....")
+      self._nxtbrick = NXTBrick20.NXTBrick()
+      print("Connection established.")
+    except:
+      print("NXTBrick connection failed.")
+      return RTC.RTC_ERROR
+
+    return RTC.RTC_OK
+
+  def onFinalize(self):
+    self._nxtbrick.close()
+
+  def onActivated(self, ec_id):
+    self._nxtbrick.setMotors([0,0,0])
+    # reset NXTBrick's position.
+    self._nxtbrick.resetPosition()
+    return RTC.RTC_OK
+
+  def onDeactivated(self, ec_id):
+    self._nxtbrick.setMotors([0,0,0])
+    # reset NXTBrick's position.
+    self._nxtbrick.resetPosition()
+
+    return RTC.RTC_OK
+
+  def onExecute(self, ec_id):
+    try:
+      # check new data.
+      if self._velIn.isNew():
+        # read velocity data from inport.
+        self._d_vel = self._velIn.read()
+        
+        vel_ = [0,0,0]
+        vel_[self._mapping[self._map[0][0]]] = self._d_vel.data[0]
+        vel_[self._mapping[self._map[0][1]]] = self._d_vel.data[1]
+        # set velocity
+        self._nxtbrick.setMotors(vel_)
+      else:
+        print("buffer empty")
+
+      # get sensor data.
+      sensor_   = self._nxtbrick.getSensors()
+      if sensor_:
+        self._d_sens.data = sensor_
+        # write sensor data to outport.
+        self._sensOut.write()
+
+      # get position data.
+      position_ = self._nxtbrick.getMotors()
+      if position_:
+        self._d_pos.data = \
+            [position_[self._mapping[self._map[0][0]]], \
+               position_[self._mapping[self._map[0][1]]]]
+        # write position data to outport.
+        self._posOut.write()
+    except:
+      print(sys.exc_info()[1])
+
+    return RTC.RTC_OK
+
+
+
+def NXTRTCInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=nxtrtc_spec)
+  manager.registerFactory(profile,
+                          NXTRTC,
+                          OpenRTM_aist.Delete)
+
+
+def MyModuleInit(manager):
+  NXTRTCInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("NXTRTC")
+
+
+
+def main():
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+  mgr.setModuleInitProc(MyModuleInit)
+  mgr.activateManager()
+  mgr.runManager()
+
+if __name__ == "__main__":
+  main()
+
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTRTC20_callback.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTRTC20_callback.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTRTC20_callback.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,156 @@
+#!/usr/bin/env python
+# -*- coding:utf-8 -*-
+# -*- Python -*-
+
+import sys
+import time
+sys.path.append(".")
+
+# Import RTM module
+import RTC
+import OpenRTM_aist
+
+
+# import NXTBrick class
+import NXTBrick20
+
+
+# This module's spesification
+# <rtc-template block="module_spec">
+nxtrtc_spec = ["implementation_id", "NXTRTC", 
+               "type_name",         "NXTRTC", 
+               "description",       "NXT sample component", 
+               "version",           "0.1", 
+               "vendor",            "AIST", 
+               "category",          "example", 
+               "activity_type",     "DataFlowComponent", 
+               "max_instance",      "10", 
+               "language",          "Python", 
+               "lang_type",         "SCRIPT",
+               "conf.default.map", "A,B",
+               ""]
+
+# </rtc-template>
+
+# @class CallBackClass
+# @brief callback class
+#
+# when data is written in the buffer of InPort,
+# it is called.
+class CallBackClass:
+  def __init__(self, nxtbrick_, map_):
+    self._nxtbrick = nxtbrick_
+    self._map = map_
+    self._mapping = {'A':0,'B':1,'C':2}
+
+  def __call__(self, pData):
+    vel_ = [0,0,0]
+    vel_[self._mapping[self._map[0][0]]] = pData.data[0]
+    vel_[self._mapping[self._map[0][1]]] = pData.data[1]
+    # set velocity
+    self._nxtbrick.setMotors(vel_)
+
+
+class NXTRTC(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+
+    # initialize of configuration-data.
+    # <rtc-template block="configurations">
+    self._map = [['A', 'B']]
+    self._nxtbrick = None
+    self._mapping = {'A':0,'B':1,'C':2}
+     
+  def onInitialize(self):
+    # DataPorts initialization
+    # <rtc-template block="data_ports">
+    self._d_vel = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._velIn = OpenRTM_aist.InPort("vel", self._d_vel)
+    self.addInPort("vel",self._velIn)
+    self._d_pos = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._posOut = OpenRTM_aist.OutPort("pos", self._d_pos)
+    self.addOutPort("pos",self._posOut)
+    self._d_sens = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._sensOut = OpenRTM_aist.OutPort("sens", self._d_sens)
+    self.addOutPort("sens",self._sensOut)
+
+    # Bind variables and configuration variable
+    # <rtc-template block="bind_config">
+    self.bindParameter("map", self._map, "A,B")
+
+    # create NXTBrick object
+    try:
+      print("Connecting to NXT brick ....")
+      self._nxtbrick = NXTBrick.NXTBrick()
+      print("Connection established.")
+    except:
+      print("NXTBrick connection failed.")
+      return RTC.RTC_ERROR
+
+    # set callback class
+    self._velIn.setOnWrite(CallBackClass(self._ntxbrick,self._map))
+
+    return RTC.RTC_OK
+
+  def onFinalize(self):
+    self._nxtbrick.close()
+
+  def onActivated(self, ec_id):
+    # reset NXTBrick's position.
+    self._nxtbrick.resetPosition()
+
+    return RTC.RTC_OK
+
+
+  def onDeactivated(self, ec_id):
+    # reset NXTBrick's position.
+    self._nxtbrick.resetPosition()
+
+    return RTC.RTC_OK
+
+
+  def onExecute(self, ec_id):
+    # get sensor data.
+    sensor_   = self._nxtbrick.getSensors()
+    if sensor_:
+      self._d_sens.data = sensor_
+      # write sensor data to outport.
+      self._sensOut.write()
+
+    # get position data.
+    position_ = self._nxtbrick.getMotors()
+    if position_:
+      self._d_pos.data = [position_[self._mapping[self._map[0][0]]],position_[self._mapping[self._map[0][1]]]]
+      # write position data to outport.
+      self._posOut.write()
+
+    return RTC.RTC_OK
+
+
+
+def NXTRTC_callbackInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=nxtrtc_spec)
+  manager.registerFactory(profile,
+                          NXTRTC,
+                          OpenRTM_aist.Delete)
+
+
+def MyModuleInit(manager):
+  NXTRTC_callbackInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("NXTRTC")
+
+
+
+def main():
+  mgr = OpenRTM_aist.Manager.init(len(sys.argv), sys.argv)
+  #mgr = OpenRTM_aist.Manager.init(sys.argv)
+  mgr.setModuleInitProc(MyModuleInit)
+  mgr.activateManager()
+  mgr.runManager()
+
+if __name__ == "__main__":
+  main()
+
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTRTC_callback.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTRTC_callback.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/NXTRTC_callback.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,156 @@
+#!/usr/bin/env python
+# -*- coding:utf-8 -*-
+# -*- Python -*-
+
+import sys
+import time
+sys.path.append(".")
+
+# Import RTM module
+import RTC
+import OpenRTM_aist
+
+
+# import NXTBrick class
+import NXTBrick
+
+
+# This module's spesification
+# <rtc-template block="module_spec">
+nxtrtc_spec = ["implementation_id", "NXTRTC", 
+               "type_name",         "NXTRTC", 
+               "description",       "NXT sample component", 
+               "version",           "0.1", 
+               "vendor",            "AIST", 
+               "category",          "example", 
+               "activity_type",     "DataFlowComponent", 
+               "max_instance",      "10", 
+               "language",          "Python", 
+               "lang_type",         "SCRIPT",
+               "conf.default.map", "A,B",
+               ""]
+
+# </rtc-template>
+
+# @class CallBackClass
+# @brief callback class
+#
+# when data is written in the buffer of InPort,
+# it is called.
+class CallBackClass:
+  def __init__(self, nxtbrick_, map_):
+    self._nxtbrick = nxtbrick_
+    self._map = map_
+    self._mapping = {'A':0,'B':1,'C':2}
+
+  def __call__(self, pData):
+    vel_ = [0,0,0]
+    vel_[self._mapping[self._map[0][0]]] = pData.data[0]
+    vel_[self._mapping[self._map[0][1]]] = pData.data[1]
+    # set velocity
+    self._nxtbrick.setMotors(vel_)
+
+
+class NXTRTC(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+
+    # initialize of configuration-data.
+    # <rtc-template block="configurations">
+    self._map = [['A', 'B']]
+    self._nxtbrick = None
+    self._mapping = {'A':0,'B':1,'C':2}
+     
+  def onInitialize(self):
+    # DataPorts initialization
+    # <rtc-template block="data_ports">
+    self._d_vel = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._velIn = OpenRTM_aist.InPort("vel", self._d_vel)
+    self.addInPort("vel",self._velIn)
+    self._d_pos = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._posOut = OpenRTM_aist.OutPort("pos", self._d_pos)
+    self.addOutPort("pos",self._posOut)
+    self._d_sens = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._sensOut = OpenRTM_aist.OutPort("sens", self._d_sens)
+    self.addOutPort("sens",self._sensOut)
+
+    # Bind variables and configuration variable
+    # <rtc-template block="bind_config">
+    self.bindParameter("map", self._map, "A,B")
+
+    # create NXTBrick object
+    try:
+      print("Connecting to NXT brick ....")
+      self._nxtbrick = NXTBrick.NXTBrick()
+      print("Connection established.")
+    except:
+      print("NXTBrick connection failed.")
+      return RTC.RTC_ERROR
+
+    # set callback class
+    self._velIn.setOnWrite(CallBackClass(self._ntxbrick,self._map))
+
+    return RTC.RTC_OK
+
+  def onFinalize(self):
+    self._nxtbrick.close()
+
+  def onActivated(self, ec_id):
+    # reset NXTBrick's position.
+    self._nxtbrick.resetPosition()
+
+    return RTC.RTC_OK
+
+
+  def onDeactivated(self, ec_id):
+    # reset NXTBrick's position.
+    self._nxtbrick.resetPosition()
+
+    return RTC.RTC_OK
+
+
+  def onExecute(self, ec_id):
+    # get sensor data.
+    sensor_   = self._nxtbrick.getSensors()
+    if sensor_:
+      self._d_sens.data = [sensor_[3]]
+      # write sensor data to outport.
+      self._sensOut.write()
+
+    # get position data.
+    position_ = self._nxtbrick.getMotors()
+    if position_:
+      self._d_pos.data = [position_[self._mapping[self._map[0][0]]][9],position_[self._mapping[self._map[0][1]]][9]]
+      # write position data to outport.
+      self._posOut.write()
+
+    return RTC.RTC_OK
+
+
+
+def NXTRTC_callbackInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=nxtrtc_spec)
+  manager.registerFactory(profile,
+                          NXTRTC,
+                          OpenRTM_aist.Delete)
+
+
+def MyModuleInit(manager):
+  NXTRTC_callbackInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("NXTRTC")
+
+
+
+def main():
+  mgr = OpenRTM_aist.Manager.init(len(sys.argv), sys.argv)
+  #mgr = OpenRTM_aist.Manager.init(sys.argv)
+  mgr.setModuleInitProc(MyModuleInit)
+  mgr.activateManager()
+  mgr.runManager()
+
+if __name__ == "__main__":
+  main()
+
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/__init__.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/__init__.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/__init__.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1 @@
+# Empty file

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/gen.bat
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/gen.bat	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/gen.bat	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,8 @@
+python %PYTHONPATH%\OpenRTM_aist\utils\rtc-template\rtc-template.py -bpython^
+ --module-name=NXTRTC --module-desc="NXT sample component"^
+ --module-version=0.1 --module-vendor=AIST --module-category=example^
+ --module-comp-type=DataFlowComponent --module-act-type=SPORADIC^
+ --module-max-inst=10^
+ --inport=vel:TimedFloatSeq^
+ --outport=pos:TimedFloatSeq --outport=sens:TimedFloatSeq^
+ --config="map:string:A,B"

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/rtc.conf
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/rtc.conf	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/NXTRTC/rtc.conf	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,3 @@
+corba.nameservers: localhost
+naming.formats: %n.rtc
+logger.enable: NO

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/SeqIn.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/SeqIn.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/SeqIn.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,159 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+import time
+
+import RTC
+import OpenRTM_aist
+
+seqin_spec = ["implementation_id", "SeqIn",
+              "type_name",         "SequenceInComponent",
+              "description",       "Sequence InPort component",
+              "version",           "1.0",
+              "vendor",            "Shinji Kurihara",
+              "category",          "example",
+              "activity_type",     "DataFlowComponent",
+              "max_instance",      "10",
+              "language",          "Python",
+              "lang_type",         "script",
+              ""]
+
+
+class SeqIn(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+    return
+
+
+  def onInitialize(self):
+    self._octet     = RTC.TimedOctet(RTC.Time(0,0),0)
+    self._short     = RTC.TimedShort(RTC.Time(0,0),0)
+    self._long      = RTC.TimedLong(RTC.Time(0,0),0)
+    self._float     = RTC.TimedFloat(RTC.Time(0,0),0)
+    self._double    = RTC.TimedDouble(RTC.Time(0,0),0)
+    self._octetSeq  = RTC.TimedOctetSeq(RTC.Time(0,0),[])
+    self._shortSeq  = RTC.TimedShortSeq(RTC.Time(0,0),[])
+    self._longSeq   = RTC.TimedLongSeq(RTC.Time(0,0),[])
+    self._floatSeq  = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._doubleSeq = RTC.TimedDoubleSeq(RTC.Time(0,0),[])
+
+    self._octetIn     = OpenRTM_aist.InPort("Octet", self._octet)
+    self._shortIn     = OpenRTM_aist.InPort("Short", self._short)
+    self._longIn      = OpenRTM_aist.InPort("Long", self._long)
+    self._floatIn     = OpenRTM_aist.InPort("Float", self._float)
+    self._doubleIn    = OpenRTM_aist.InPort("Double", self._double)
+    self._octetSeqIn  = OpenRTM_aist.InPort("OctetSeq", self._octetSeq)
+    self._shortSeqIn  = OpenRTM_aist.InPort("ShortSeq", self._shortSeq)
+    self._longSeqIn   = OpenRTM_aist.InPort("LongSeq", self._longSeq)
+    self._floatSeqIn  = OpenRTM_aist.InPort("FloatSeq", self._floatSeq)
+    self._doubleSeqIn = OpenRTM_aist.InPort("DoubleSeq", self._doubleSeq)
+
+
+    # Set InPort buffer
+    self.addInPort("Octet", self._octetIn)
+    self.addInPort("Short", self._shortIn)
+    self.addInPort("Long", self._longIn)
+    self.addInPort("Float", self._floatIn)
+    self.addInPort("Double", self._doubleIn)
+
+    self.addInPort("OctetSeq", self._octetSeqIn)
+    self.addInPort("ShortSeq", self._shortSeqIn)
+    self.addInPort("LongSeq", self._longSeqIn)
+    self.addInPort("FloatSeq", self._floatSeqIn)
+    self.addInPort("DoubleSeq", self._doubleSeqIn)
+    return RTC.RTC_OK
+
+
+  def onExecute(self, ec_id):
+    octet_  = self._octetIn.read()
+    short_  = self._shortIn.read()
+    long_   = self._longIn.read()
+    float_  = self._floatIn.read()
+    double_ = self._doubleIn.read()
+
+    octetSeq_  = self._octetSeqIn.read()
+    shortSeq_  = self._shortSeqIn.read()
+    longSeq_   = self._longSeqIn.read()
+    floatSeq_  = self._floatSeqIn.read()
+    doubleSeq_ = self._doubleSeqIn.read()
+
+    octetSize_  = len(octetSeq_.data)
+    shortSize_  = len(shortSeq_.data)
+    longSize_   = len(longSeq_.data)
+    floatSize_  = len(floatSeq_.data)
+    doubleSize_ = len(doubleSeq_.data)
+
+    octetSeqDisp_ = []
+    for i in range(octetSize_):
+      octetSeqDisp_.append(ord(octetSeq_.data[i]))
+
+    maxsize = max(octetSize_, shortSize_, longSize_, floatSize_, doubleSize_)
+    octetSeqDisp_   = octetSeqDisp_   + ['-'] * (maxsize - octetSize_)
+    shortSeq_.data  = shortSeq_.data  + ['-'] * (maxsize - shortSize_)
+    longSeq_.data   = longSeq_.data   + ['-'] * (maxsize - longSize_)
+    floatSeq_.data  = floatSeq_.data  + ['-'] * (maxsize - floatSize_)
+    doubleSeq_.data = doubleSeq_.data + ['-'] * (maxsize - doubleSize_)
+
+    if 0x20 <= octet_.data < 0x7e :
+      octetDisp_ = chr(octet_.data)
+    else:
+      octetDisp_ = " "
+    print('%3.2s %10.8s %10.8s %10.8s %10.8s %10.8s' \
+        % (' ', 'octet', 'short', 'long', 'float', 'double'))
+    print('%3.2s %7s[%s] %10.8s %10.8s %10.8s %10.8s' \
+        % (' ', octet_.data, octetDisp_, short_.data, long_.data, float_.data, double_.data))
+    print("-----------------------------------------------------------")
+    print("                 Sequence Data                     ")
+    print("-----------------------------------------------------------")
+    for i in range(maxsize):
+      if 0x20 <= octetSeqDisp_[i] < 0x7e :
+        octetDisp_ = chr(octetSeqDisp_[i])
+      else:
+        octetDisp_ = " "
+      print('%3.2s %7s[%s] %10.8s %10.8s %10.8s %10.8s' \
+          % (i, octetSeqDisp_[i], octetDisp_, shortSeq_.data[i], longSeq_.data[i], floatSeq_.data[i], doubleSeq_.data[i]))
+
+    # Moving cursor (^[[nA : n lines upward)
+    print("\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r")
+
+    time.sleep(0.5)
+    return RTC.RTC_OK
+
+
+def SeqInInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=seqin_spec)
+  manager.registerFactory(profile,
+                          SeqIn,
+                          OpenRTM_aist.Delete)
+
+
+def MyModuleInit(manager):
+  SeqInInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("SeqIn")
+
+
+def main():
+  # Initialize manager
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+
+  # Set module initialization proceduer
+  # This procedure will be invoked in activateManager() function.
+  mgr.setModuleInitProc(MyModuleInit)
+
+  # Activate manager and register to naming service
+  mgr.activateManager()
+
+  # run the manager in blocking mode
+  # runManager(False) is the default
+  mgr.runManager()
+
+  # If you want to run the manager in non-blocking mode, do like this
+  # mgr.runManager(True)
+
+if __name__ == "__main__":
+  main()
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/SeqOut.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/SeqOut.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/SeqOut.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,161 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+
+import RTC
+import OpenRTM_aist
+
+import random
+import time
+
+seqout_spec = ["implementation_id", "SeqOut",
+               "type_name",         "SequenceOutComponent",
+               "description",       "Sequence OutPort component",
+               "version",           "1.0",
+               "vendor",            "Shinji Kurihara",
+               "category",          "example",
+               "activity_type",     "DataFlowComponent",
+               "max_instance",      "10",
+               "language",          "Python",
+               "lang_type",         "script",
+               ""]
+
+
+
+class SeqOut(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+    return
+    
+  def onInitialize(self):
+    self._octet     = RTC.TimedOctet(RTC.Time(0,0),0)
+    self._short     = RTC.TimedShort(RTC.Time(0,0),0)
+    self._long      = RTC.TimedLong(RTC.Time(0,0),0)
+    self._float     = RTC.TimedFloat(RTC.Time(0,0),0)
+    self._double    = RTC.TimedDouble(RTC.Time(0,0),0)
+    self._octetSeq  = RTC.TimedOctetSeq(RTC.Time(0,0),[])
+    self._shortSeq  = RTC.TimedShortSeq(RTC.Time(0,0),[])
+    self._longSeq   = RTC.TimedLongSeq(RTC.Time(0,0),[])
+    self._floatSeq  = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._doubleSeq = RTC.TimedDoubleSeq(RTC.Time(0,0),[])
+
+    self._octetOut     = OpenRTM_aist.OutPort("Octet", self._octet)
+    self._shortOut     = OpenRTM_aist.OutPort("Short", self._short)
+    self._longOut      = OpenRTM_aist.OutPort("Long", self._long)
+    self._floatOut     = OpenRTM_aist.OutPort("Float", self._float)
+    self._doubleOut    = OpenRTM_aist.OutPort("Double", self._double)
+    self._octetSeqOut  = OpenRTM_aist.OutPort("OctetSeq", self._octetSeq)
+    self._shortSeqOut  = OpenRTM_aist.OutPort("ShortSeq", self._shortSeq)
+    self._longSeqOut   = OpenRTM_aist.OutPort("LongSeq", self._longSeq)
+    self._floatSeqOut  = OpenRTM_aist.OutPort("FloatSeq", self._floatSeq)
+    self._doubleSeqOut = OpenRTM_aist.OutPort("DoubleSeq", self._doubleSeq)
+
+
+    # Set OutPort buffer
+    self.addOutPort("Octet", self._octetOut)
+    self.addOutPort("Short", self._shortOut)
+    self.addOutPort("Long", self._longOut)
+    self.addOutPort("Float", self._floatOut)
+    self.addOutPort("Double", self._doubleOut)
+
+    self.addOutPort("OctetSeq", self._octetSeqOut)
+    self.addOutPort("ShortSeq", self._shortSeqOut)
+    self.addOutPort("LongSeq", self._longSeqOut)
+    self.addOutPort("FloatSeq", self._floatSeqOut)
+    self.addOutPort("DoubleSeq", self._doubleSeqOut)
+    return RTC.RTC_OK
+
+
+  def onExecute(self, ec_id):
+    octetSeq  = ""
+    shortSeq  = []
+    longSeq   = []
+    floatSeq  = []
+    doubleSeq = []
+
+    self._octet.data = int(random.uniform(0x41, 0x4a))
+    self._short.data = int(random.uniform(0, 10))
+    self._long.data = int(random.uniform(0, 10))
+    self._float.data = float(random.uniform(0.0, 10.0))
+    self._double.data = float(random.uniform(0.0, 10.0))
+
+    print('%3.2s   %10.8s %10.8s %10.8s %10.8s %10.8s' \
+        % (' ', 'octet', 'short', 'long', 'float', 'double'))
+    print('%3.2s   %7s[%s] %10.8s %10.8s %10.8s %10.8s' \
+        % (' ', self._octet.data, chr(self._octet.data), self._short.data, self._long.data, self._float.data, self._double.data))
+    print("-------------------------------------------------------------")
+    print("                 Sequence Data                     ")
+    print("-------------------------------------------------------------")
+    for i in range(10):
+      octetSeq = octetSeq + chr(int(random.uniform(0x41, 0x4a)))
+      shortSeq.append(int(random.uniform(0, 10)))
+      longSeq.append(int(random.uniform(0, 10)))
+      floatSeq.append(float(random.uniform(0.0, 10.0)))
+      doubleSeq.append(float(random.uniform(0.0, 10.0)))
+      print('%3.2s : %7s[%s] %10.8s %10.8s %10.8s %10.8s' \
+          % (str(i), ord(octetSeq[i]), octetSeq[i], shortSeq[i], longSeq[i], floatSeq[i], doubleSeq[i]))
+
+    # Moving cursor (^[[nA : n lines upward)
+    print("\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r")
+        
+    self._octetSeq.data = octetSeq
+    self._shortSeq.data = shortSeq
+    self._longSeq.data = longSeq
+    self._floatSeq.data = floatSeq
+    self._doubleSeq.data = doubleSeq
+
+    self._octetOut.write()
+    self._shortOut.write()
+    self._longOut.write()
+    self._floatOut.write()
+    self._doubleOut.write()
+    self._octetSeqOut.write()
+    self._shortSeqOut.write()
+    self._longSeqOut.write()
+    self._floatSeqOut.write()
+    self._doubleSeqOut.write()
+
+    time.sleep(1)
+
+    return RTC.RTC_OK
+
+
+def SeqOutInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=seqout_spec)
+  manager.registerFactory(profile,
+                          SeqOut,
+                          OpenRTM_aist.Delete)
+  return
+
+
+def MyModuleInit(manager):
+  SeqOutInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("SeqOut")
+
+  print("Component created")
+
+
+def main():
+  # Initialize manager
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+
+  # Set module initialization proceduer
+  # This procedure will be invoked in activateManager() function.
+  mgr.setModuleInitProc(MyModuleInit)
+
+  # Activate manager and register to naming service
+  mgr.activateManager()
+
+  # run the manager in blocking mode
+  # runManager(False) is the default
+  mgr.runManager()
+
+  # If you want to run the manager in non-blocking mode, do like this
+  # mgr.runManager(True)
+
+if __name__ == "__main__":
+  main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/__init__.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/__init__.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/__init__.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1 @@
+# Empty file

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/gen.bat
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/gen.bat	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/gen.bat	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,35 @@
+python %PYTHONPATH%\OpenRTM_aist\utils\rtc-template\rtc-template.py -bpython^
+    --module-name=SeqIn --module-type="SequenceInComponent"^
+    --module-desc="Sequence InPort component"^
+    --module-version=1.0 --module-vendor="Noriaki Ando, AIST"^
+    --module-category=example^
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC^
+    --module-max-inst=10^
+    --inport=Octet:TimedOctet^
+    --inport=Short:TimedShort^
+    --inport=Long:TimedLong^
+    --inport=Float:TimedFloat^
+    --inport=Double:TimedDouble^
+    --inport=OctetSeq:TimedOctetSeq^
+    --inport=ShortSeq:TimedShortSeq^
+    --inport=LongSeq:TimedLongSeq^
+    --inport=FloatSeq:TimedFloatSeq^
+    --inport=DoubleSeq:TimedDoubleSeq
+
+python C:\Python24\Lib\site-packages\OpenRTM_aist\utils\rtc-template\rtc-template.py -bpython^
+    --module-name=SeqOut --module-type="SequenceOutComponent"^
+    --module-desc="Sequence OutPort component"^
+    --module-version=1.0 --module-vendor="Noriaki Ando, AIST"^
+    --module-category=example^
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC^
+    --module-max-inst=10^
+    --outport=Octet:TimedOctet^
+    --outport=Short:TimedShort^
+    --outport=Long:TimedLong^
+    --outport=Float:TimedFloat^
+    --outport=Double:TimedDouble^
+    --outport=OctetSeq:TimedOctetSeq^
+    --outport=ShortSeq:TimedShortSeq^
+    --outport=LongSeq:TimedLongSeq^
+    --outport=FloatSeq:TimedFloatSeq^
+    --outport=DoubleSeq:TimedDoubleSeq

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/gen.sh
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/gen.sh	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/gen.sh	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+python ${PYTHONPATH}/OpenRTM_aist/utils/rtc-template/rtc-template.py -bpython \
+    --module-name=SeqIn --module-type='SequenceInComponent' \
+    --module-desc='Sequence InPort component' \
+    --module-version=1.0 --module-vendor='Noriaki Ando, AIST' \
+    --module-category=example \
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC \
+    --module-max-inst=10 \
+    --inport=Octet:TimedOctet \
+    --inport=Short:TimedShort \
+    --inport=Long:TimedLong \
+    --inport=Float:TimedFloat \
+    --inport=Double:TimedDouble \
+    --inport=OctetSeq:TimedOctetSeq \
+    --inport=ShortSeq:TimedShortSeq \
+    --inport=LongSeq:TimedLongSeq \
+    --inport=FloatSeq:TimedFloatSeq \
+    --inport=DoubleSeq:TimedDoubleSeq
+
+python ${PYTHONPATH}/OpenRTM_aist/utils/rtc-template/rtc-template.py -bpython \
+    --module-name=SeqOut --module-type='SequenceOutComponent' \
+    --module-desc='Sequence OutPort component' \
+    --module-version=1.0 --module-vendor='Noriaki Ando, AIST' \
+    --module-category=example \
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC \
+    --module-max-inst=10 \
+    --outport=Octet:TimedOctet \
+    --outport=Short:TimedShort \
+    --outport=Long:TimedLong \
+    --outport=Float:TimedFloat \
+    --outport=Double:TimedDouble \
+    --outport=OctetSeq:TimedOctetSeq \
+    --outport=ShortSeq:TimedShortSeq \
+    --outport=LongSeq:TimedLongSeq \
+    --outport=FloatSeq:TimedFloatSeq \
+    --outport=DoubleSeq:TimedDoubleSeq

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/rtc.conf
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/rtc.conf	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SeqIO/rtc.conf	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,3 @@
+corba.nameservers: localhost
+naming.formats: %n.rtc
+logger.enable: NO

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/Connector.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/Connector.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/Connector.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,138 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+
+from omniORB import CORBA
+from optparse import OptionParser, OptionError
+
+import RTC
+import OpenRTM_aist
+
+def usage():
+  print("usage: ConnectorComp [options]")
+  print("  --flush         ")
+  print(": Set subscription type Flush")
+  print("  --new           ")
+  print(": Set subscription type New")
+  print("  --periodic [Hz] ")
+  print(": Set subscription type Periodic \n")
+  print("exsample:")
+  print("  ConnectorComp --flush")
+  print("  ConnectorComp --new")
+  print("  ConnectorComp --new --policy ALL")
+  print("  ConnectorComp --new --policy SKIP --skip 100")
+  print("  ConnectorComp --periodic 10")
+  print("  ConnectorComp --periodic 10 --policy FIFO")
+  print("  ConnectorComp --periodic 10 --policy NEW \n")
+
+def main():
+
+  # initialization of ORB
+  orb = CORBA.ORB_init(sys.argv)
+
+  # get NamingService
+  naming = OpenRTM_aist.CorbaNaming(orb, "localhost")
+    
+  conin = OpenRTM_aist.CorbaConsumer()
+  conout = OpenRTM_aist.CorbaConsumer()
+
+  # find ConsoleIn0 component
+  conin.setObject(naming.resolve("ConsoleIn0.rtc"))
+
+  # get ports
+  inobj = conin.getObject()._narrow(RTC.RTObject)
+  pin = inobj.get_ports()
+  pin[0].disconnect_all()
+
+
+  # find ConsoleOut0 component
+  conout.setObject(naming.resolve("ConsoleOut0.rtc"))
+
+  # get ports
+  outobj = conout.getObject()._narrow(RTC.RTObject)
+  pout = outobj.get_ports()
+  pout[0].disconnect_all()
+
+
+  # subscription type
+  subs_type = "flush"
+  period = "1.0"
+  push_policy = "new"
+  skip_count = "0"
+
+  for arg in sys.argv[1:]:
+    if arg == "--flush":
+      subs_type = "flush"
+      break
+
+    elif arg == "--new":
+      subs_type = "new"
+      if len(sys.argv) > 2:
+        push_policy = OpenRTM_aist.normalize([sys.argv[3]])
+      if push_policy == "skip":
+        skip_count = sys.argv[5]
+      break
+
+    elif arg == "--periodic":
+      subs_type = "periodic"
+      period = sys.argv[2]
+      if len(sys.argv) > 3:
+        push_policy = OpenRTM_aist.normalize([sys.argv[4]])
+      if push_policy == "skip":
+        skip_count = sys.argv[6]
+      break
+
+    # elif sbus_type == "periodic" and type(arg) == float:
+    #    period = srt(arg)
+    #    break
+
+    else:
+      usage()
+            
+  print("Subscription Type: ", subs_type)
+  print("Period: ", period, " [Hz]")
+  print("push policy: ", push_policy)
+  print("skip count: ", skip_count)
+
+  # connect ports
+  conprof = RTC.ConnectorProfile("connector0", "", [pin[0],pout[0]], [])
+  OpenRTM_aist.CORBA_SeqUtil.push_back(conprof.properties,
+                                       OpenRTM_aist.NVUtil.newNV("dataport.interface_type",
+                                                                 "corba_cdr"))
+
+  OpenRTM_aist.CORBA_SeqUtil.push_back(conprof.properties,
+                                       OpenRTM_aist.NVUtil.newNV("dataport.dataflow_type",
+                                                                 "push"))
+
+  OpenRTM_aist.CORBA_SeqUtil.push_back(conprof.properties,
+                                       OpenRTM_aist.NVUtil.newNV("dataport.subscription_type",
+                                                                 subs_type))
+
+  if subs_type == "periodic":
+    OpenRTM_aist.CORBA_SeqUtil.push_back(conprof.properties,
+                                         OpenRTM_aist.NVUtil.newNV("dataport.publisher.push_rate",
+                                                                       period))
+  OpenRTM_aist.CORBA_SeqUtil.push_back(conprof.properties,
+                                       OpenRTM_aist.NVUtil.newNV("dataport.publisher.push_policy",
+                                                                 push_policy))
+  if push_policy == "skip":
+    OpenRTM_aist.CORBA_SeqUtil.push_back(conprof.properties,
+                                         OpenRTM_aist.NVUtil.newNV("dataport.publisher.skip_count",
+                                                                   skip_count))
+
+
+  ret,conprof = pin[0].connect(conprof)
+    
+  # activate ConsoleIn0
+  eclistin = inobj.get_owned_contexts()
+  eclistin[0].activate_component(inobj)
+
+  # activate ConsoleOut0
+  eclistout = outobj.get_owned_contexts()
+  eclistout[0].activate_component(outobj)
+
+
+if __name__ == "__main__":
+  main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/ConsoleIn.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/ConsoleIn.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/ConsoleIn.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,135 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+
+import RTC
+import OpenRTM_aist
+
+consolein_spec = ["implementation_id", "ConsoleIn",
+                  "type_name",         "ConsoleIn",
+                  "description",       "Console input component",
+                  "version",           "1.0",
+                  "vendor",            "Shinji Kurihara",
+                  "category",          "example",
+                  "activity_type",     "DataFlowComponent",
+                  "max_instance",      "10",
+                  "language",          "Python",
+                  "lang_type",         "script",
+                  ""]
+
+
+class DataListener(OpenRTM_aist.ConnectorDataListenerT):
+  def __init__(self, name):
+    self._name = name
+    
+  def __del__(self):
+    print("dtor of ", self._name)
+
+  def __call__(self, info, cdrdata):
+    data = OpenRTM_aist.ConnectorDataListenerT.__call__(self, info, cdrdata, RTC.TimedLong(RTC.Time(0,0),0))
+    print("------------------------------")
+    print("Listener:       ", self._name)
+    print("Profile::name:  ", info.name)
+    print("Profile::id:    ", info.id)
+    print("Data:           ", data.data)
+    print("------------------------------")
+    
+class ConnListener(OpenRTM_aist.ConnectorListener):
+  def __init__(self, name):
+    self._name = name
+
+  def __del__(self):
+    print("dtor of ", self._name)
+
+  def __call__(self, info):
+    print("------------------------------")
+    print("Listener:       ", self._name)
+    print("Profile::name:  ", info.name)
+    print("Profile::id:    ", info.id)
+    print("------------------------------")
+
+
+class ConsoleIn(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+    return
+
+  def onInitialize(self):
+    self._data = RTC.TimedLong(RTC.Time(0,0),0)
+    self._outport = OpenRTM_aist.OutPort("out", self._data)
+    # Set OutPort buffer
+    self.addOutPort("out", self._outport)
+    self._outport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_BUFFER_WRITE,
+                                           DataListener("ON_BUFFER_WRITE"))
+    self._outport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_BUFFER_FULL, 
+                                           DataListener("ON_BUFFER_FULL"))
+    self._outport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_BUFFER_WRITE_TIMEOUT, 
+                                           DataListener("ON_BUFFER_WRITE_TIMEOUT"))
+    self._outport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_BUFFER_OVERWRITE, 
+                                           DataListener("ON_BUFFER_OVERWRITE"))
+    self._outport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_BUFFER_READ, 
+                                           DataListener("ON_BUFFER_READ"))
+    self._outport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_SEND, 
+                                           DataListener("ON_SEND"))
+    self._outport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_RECEIVED,
+                                           DataListener("ON_RECEIVED"))
+    self._outport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_RECEIVER_FULL, 
+                                           DataListener("ON_RECEIVER_FULL"))
+    self._outport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_RECEIVER_TIMEOUT, 
+                                           DataListener("ON_RECEIVER_TIMEOUT"))
+    self._outport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_RECEIVER_ERROR,
+                                           DataListener("ON_RECEIVER_ERROR"))
+
+    self._outport.addConnectorListener(OpenRTM_aist.ConnectorListenerType.ON_CONNECT,
+                                       ConnListener("ON_CONNECT"))
+    self._outport.addConnectorListener(OpenRTM_aist.ConnectorListenerType.ON_DISCONNECT,
+                                       ConnListener("ON_DISCONNECT"))
+
+    return RTC.RTC_OK
+
+        
+  def onExecute(self, ec_id):
+    print("> ",end="")
+    self._data.data = int(input())
+    
+    OpenRTM_aist.setTimestamp(self._data)
+    print("Sending to subscriber: ", self._data.data)
+    self._outport.write()
+    return RTC.RTC_OK
+
+
+def ConsoleInInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=consolein_spec)
+  manager.registerFactory(profile,
+                          ConsoleIn,
+                          OpenRTM_aist.Delete)
+
+
+def MyModuleInit(manager):
+  ConsoleInInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("ConsoleIn")
+
+def main():
+  # Initialize manager
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+
+  # Set module initialization proceduer
+  # This procedure will be invoked in activateManager() function.
+  mgr.setModuleInitProc(MyModuleInit)
+
+  # Activate manager and register to naming service
+  mgr.activateManager()
+
+  # run the manager in blocking mode
+  # runManager(False) is the default
+  mgr.runManager()
+
+  # If you want to run the manager in non-blocking mode, do like this
+  # mgr.runManager(True)
+
+if __name__ == "__main__":
+  main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/ConsoleOut.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/ConsoleOut.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/ConsoleOut.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,149 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+import time
+
+import RTC
+import OpenRTM_aist
+
+consoleout_spec = ["implementation_id", "ConsoleOut",
+                   "type_name",         "ConsoleOut",
+                   "description",       "Console output component",
+                   "version",           "1.0",
+                   "vendor",            "Shinji Kurihara",
+                   "category",          "example",
+                   "activity_type",     "DataFlowComponent",
+                   "max_instance",      "10",
+                   "language",          "Python",
+                   "lang_type",         "script",
+                   ""]
+
+
+class DataListener(OpenRTM_aist.ConnectorDataListenerT):
+  def __init__(self, name):
+    self._name = name
+
+  def __del__(self):
+    print("dtor of ", self._name)
+
+  def __call__(self, info, cdrdata):
+    data = OpenRTM_aist.ConnectorDataListenerT.__call__(self, info, cdrdata, RTC.TimedLong(RTC.Time(0,0),0))
+    print("------------------------------")
+    print("Listener:       ", self._name)
+    print("Profile::name:  ", info.name)
+    print("Profile::id:    ", info.id)
+    print("Data:           ", data.data)
+    print("------------------------------")
+
+
+class ConnListener(OpenRTM_aist.ConnectorListener):
+  def __init__(self, name):
+    self._name = name
+
+  def __del__(self):
+    print("dtor of ", self._name)
+
+  def __call__(self, info):
+    print("------------------------------")
+    print("Listener:       ", self._name)
+    print("Profile::name:  ", info.name)
+    print("Profile::id:    ", info.id)
+    print("------------------------------")
+
+
+
+class ConsoleOut(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+    return
+
+  def onInitialize(self):
+    self._data = RTC.TimedLong(RTC.Time(0,0),0)
+    self._inport = OpenRTM_aist.InPort("in", self._data)
+    # Set InPort buffer
+    self.addInPort("in", self._inport)
+
+    self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_BUFFER_WRITE,
+                                          DataListener("ON_BUFFER_WRITE"))
+
+
+    self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_BUFFER_FULL, 
+                                          DataListener("ON_BUFFER_FULL"))
+
+    self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_BUFFER_WRITE_TIMEOUT, 
+                                          DataListener("ON_BUFFER_WRITE_TIMEOUT"))
+
+    self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_BUFFER_OVERWRITE, 
+                                          DataListener("ON_BUFFER_OVERWRITE"))
+
+    self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_BUFFER_READ, 
+                                          DataListener("ON_BUFFER_READ"))
+
+    self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_SEND, 
+                                          DataListener("ON_SEND"))
+
+    self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_RECEIVED,
+                                          DataListener("ON_RECEIVED"))
+
+    self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_RECEIVER_FULL, 
+                                          DataListener("ON_RECEIVER_FULL"))
+
+    self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_RECEIVER_TIMEOUT, 
+                                          DataListener("ON_RECEIVER_TIMEOUT"))
+
+    self._inport.addConnectorDataListener(OpenRTM_aist.ConnectorDataListenerType.ON_RECEIVER_ERROR,
+                                          DataListener("ON_RECEIVER_ERROR"))
+
+    self._inport.addConnectorListener(OpenRTM_aist.ConnectorListenerType.ON_CONNECT,
+                                      ConnListener("ON_CONNECT"))
+    self._inport.addConnectorListener(OpenRTM_aist.ConnectorListenerType.ON_DISCONNECT,
+                                      ConnListener("ON_DISCONNECT"))
+
+    return RTC.RTC_OK
+
+  def onExecute(self, ec_id):
+
+    if self._inport.isNew():
+      data = self._inport.read()
+      print("Received: ", data)
+      print("Received: ", data.data)
+      print("TimeStamp: ", data.tm.sec, "[s] ", data.tm.nsec, "[ns]")
+
+    return RTC.RTC_OK
+
+
+def ConsoleOutInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=consoleout_spec)
+  manager.registerFactory(profile,
+                          ConsoleOut,
+                          OpenRTM_aist.Delete)
+
+def MyModuleInit(manager):
+  ConsoleOutInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("ConsoleOut")
+
+
+def main():
+  # Initialize manager
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+
+  # Set module initialization proceduer
+  # This procedure will be invoked in activateManager() function.
+  mgr.setModuleInitProc(MyModuleInit)
+
+  # Activate manager and register to naming service
+  mgr.activateManager()
+
+  # run the manager in blocking mode
+  # runManager(False) is the default
+  mgr.runManager()
+
+  # If you want to run the manager in non-blocking mode, do like this
+  # mgr.runManager(True)
+
+if __name__ == "__main__":
+  main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/__init__.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/__init__.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/__init__.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1 @@
+# Empty file

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/gen.bat
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/gen.bat	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/gen.bat	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,13 @@
+python %PYTHONPATH%\OpenRTM_aist\utils\rtc-template\rtc-template.py -bpython^
+ --module-name=ConsoleIn --module-desc="Sample component"^
+ --module-version=0.1 --module-vendor=S.Kurihara --module-category=Generic^
+ --module-comp-type=DataFlowComponent --module-act-type=SPORADIC^
+ --module-max-inst=10^
+ --outport=Ref:TimedFloat
+
+python %PYTHONPATH%\OpenRTM_aist\utils\rtc-template\rtc-template.py -bpython^
+ --module-name=ConsoleOut --module-desc="Sample component"^
+ --module-version=0.1 --module-vendor=S.Kurihara --module-category=Generic^
+ --module-comp-type=DataFlowComponent --module-act-type=SPORADIC^
+ --module-max-inst=10^
+ --inport=Ref:TimedFloat

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/gen.sh
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/gen.sh	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/gen.sh	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+python ${PYTHONPATH}/OpenRTM_aist/utils/rtc-template/rtc-template.py -bpython \
+    --module-name=ConsoleIn --module-type='DataFlowComponent' \
+    --module-desc='Console input component' \
+    --module-version=1.0 --module-vendor='Noriaki Ando, AIST' \
+    --module-category=example \
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC \
+    --module-max-inst=10 --outport=out:TimedLong
+
+python ${PYTHONPATH}/OpenRTM_aist/utils/rtc-template/rtc-template.py -bpython \
+    --module-name=ConsoleOut --module-type='DataFlowComponent' \
+    --module-desc='Console output component' \
+    --module-version=1.0 --module-vendor='Noriaki Ando, AIST' \
+    --module-category=example \
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC \
+    --module-max-inst=10 --inport=in:TimedLong
+
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/rtc.conf
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/rtc.conf	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/rtc.conf	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,6 @@
+corba.nameservers: localhost
+naming.formats: %n.rtc
+logger.enable: NO
+logger.log_level: VERBOSE
+#logger.file_name: rtc%p.log,    STDOUT
+#manager.naming_formats: %n.mgr

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/run.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/run.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleIO/run.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,71 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+#
+# @file run.py
+# @brief ExtTrigger example startup script
+# @date $Date: 2007/10/26 $
+#
+# Copyright (c) 2003-2007 Noriaki Ando <n-ando at aist.go.jp> and Shinji Kurihara
+#          Task-intelligence Research Group,
+#          Intelligent System Research Institute,
+#          National Institute of Industrial Science (AIST), Japan
+#          All rights reserved.
+#
+
+import sys,os,platform
+import time
+import commands
+
+nsport="2809"
+sysinfo = platform.uname()
+hostname= sysinfo[1]
+plat=sys.platform
+
+def main():
+  if plat == "win32":
+    os.system("start \"\" \"%RTM_ROOT%\\bin\\rtm-naming.bat\"")
+    os.system("start python ConsoleIn.py")
+    os.system("start python Consoleout.py")
+    time.sleep(5)
+    os.system("python Connector.py")
+
+  else:
+    status,term=commands.getstatusoutput("which xterm")
+    term += " -e"
+    if status != 0:
+      status,term=commands.getstatusoutput("which kterm")
+      term += " -e"
+
+    if status != 0:
+      status,term=commands.getstatusoutput("which uxterm")
+      term += " -e"
+      
+    if status != 0:
+      status,term=commands.getstatusoutput("which gnome-terminal")
+      term += " -x"
+
+    if status != 0:
+      print("No terminal program (kterm/xterm/gnome-terminal) exists.")
+      sys.exit(0)
+
+    path = None
+    for p in sys.path:
+      if os.path.exists(os.path.join(p,"OpenRTM_aist")):
+        path = os.path.join(p,"OpenRTM_aist","utils","rtm-naming")
+        break
+    if path is None:
+      print("rtm-naming directory not exist.")
+      sys.exit(0)
+
+    os.system('python %s/rtm-naming.py &'%path)
+    os.system('%s python ConsoleIn.py &'%term)
+    os.system('%s python ConsoleOut.py &'%term)
+    time.sleep(3)
+    os.system("python Connector.py")
+
+  return
+
+if __name__ == "__main__":
+  main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/Connector.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/Connector.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/Connector.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,64 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+
+from omniORB import CORBA
+
+import RTC
+import OpenRTM_aist
+
+def usage():
+    print "usage: ConnectorComp [options]"
+    print " python MyServiceProvider.py  "
+    print " python MyServiceConsumer.py  "
+    print " python Connector.py  "
+
+
+def main():
+
+    # initialization of ORB
+    orb = CORBA.ORB_init(sys.argv)
+
+    # get NamingService
+    naming = OpenRTM_aist.CorbaNaming(orb, "localhost")
+    
+    consumer = OpenRTM_aist.CorbaConsumer()
+    provider = OpenRTM_aist.CorbaConsumer()
+
+    # find MyServiceConsumer0 component
+    consumer.setObject(naming.resolve("MyServiceConsumer0.rtc"))
+
+    # get ports
+    consobj = consumer.getObject()._narrow(RTC.RTObject)
+    pcons = consobj.get_ports()
+    pcons[0].disconnect_all()
+
+
+    # find MyServiceProvider0 component
+    provider.setObject(naming.resolve("MyServiceProvider0.rtc"))
+
+    # get ports
+    provobj = provider.getObject()._narrow(RTC.RTObject)
+    prov = provobj.get_ports()
+    prov[0].disconnect_all()
+
+
+    # connect ports
+    conprof = RTC.ConnectorProfile("connector0", "", [pcons[0],prov[0]], [])
+
+    ret = pcons[0].connect(conprof)
+    
+    # activate ConsoleIn0
+    eclistin = consobj.get_owned_contexts()
+    eclistin[0].activate_component(consobj)
+
+    # activate ConsoleOut0
+    eclistout = provobj.get_owned_contexts()
+    eclistout[0].activate_component(provobj)
+
+
+
+if __name__ == "__main__":
+	main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/MyService.idl
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/MyService.idl	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/MyService.idl	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,12 @@
+module SimpleService {
+  typedef sequence<string> EchoList;
+  typedef sequence<float> ValueList;
+  interface MyService
+  {
+	string echo(in string msg);
+	EchoList get_echo_history();
+	void set_value(in float value);
+	float get_value();
+	ValueList get_value_history();
+  };
+};

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/MyServiceConsumer.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/MyServiceConsumer.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/MyServiceConsumer.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,172 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+import string
+
+import RTC
+import SimpleService
+import OpenRTM_aist
+from omniORB import CORBA
+
+myserviceconsumer_spec = ["implementation_id", "MyServiceConsumer",
+                          "type_name",         "MyServiceConsumer",
+                          "description",       "MyService Consumer Sample component",
+                          "version",           "1.0",
+                          "vendor",            "Shinji Kurihara",
+                          "category",          "example",
+                          "activity_type",     "DataFlowComponent",
+                          "max_instance",      "10",
+                          "language",          "Python",
+                          "lang_type",         "script",
+                          ""]
+
+class echo_functor:
+  def __init__(self, msg, result):
+    self._msg = msg
+    self._result = result
+    return
+
+  def __call__(self, obj):
+    try:
+      if CORBA.is_nil(obj):
+        print("No service connected.")
+      else:
+        self._result[0] = obj.echo(self._msg)
+    except:
+      pass
+
+
+class MyServiceConsumer(OpenRTM_aist.DataFlowComponentBase):
+  # constructor
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+
+    self._async_echo = None
+    self._result = [None]
+    return
+
+  def onInitialize(self):
+    # initialization of CORBA Port
+    self._myServicePort = OpenRTM_aist.CorbaPort("MyService")
+
+    # initialization of Consumer
+    self._myservice0 = OpenRTM_aist.CorbaConsumer(interfaceType=SimpleService.MyService)
+        
+    # Set service consumers to Ports
+    self._myServicePort.registerConsumer("myservice0", "MyService", self._myservice0)
+
+    # Set CORBA Service Ports
+    self.addPort(self._myServicePort)
+
+    return RTC.RTC_OK
+
+  # The execution action that is invoked periodically
+  def onExecute(self, ec_id):
+    print("\n")
+    print("Command list: ")
+    print(" echo [msg]       : echo message.")
+    print(" set_value [value]: set value.")
+    print(" get_value        : get current value.")
+    print(" get_echo_history : get input messsage history.")
+    print(" get_value_history: get input value history.")
+    print("> ",end="")
+    args = str(input())
+
+    
+
+    argv = str.split(args)
+    argv[-1] = argv[-1].rstrip("\n")
+
+    if self._async_echo and self._async_echo.finished():
+      print("echo() finished: ", self._result[0])
+      self._async_echo = None
+
+    if argv[0] == "echo" and len(argv) > 1:
+      if not self._async_echo:
+        retmsg = ""
+        func = echo_functor(argv[1],self._result)
+        self._async_echo = OpenRTM_aist.Async_tInvoker(self._myservice0._ptr(),
+                                                               func)
+        self._async_echo.invoke()
+      else:
+        print("echo() still invoking")
+
+      return RTC.RTC_OK
+
+    if argv[0] == "set_value" and len(argv) > 1:
+      val = float(argv[1])
+      self._myservice0._ptr().set_value(val)
+      print("Set remote value: ", val)
+      return RTC.RTC_OK
+      
+    if argv[0] == "get_value":
+      retval = self._myservice0._ptr().get_value()
+      print("Current remote value: ", retval)
+      return RTC.RTC_OK;
+      
+    if argv[0] == "get_echo_history":
+      OpenRTM_aist.CORBA_SeqUtil.for_each(self._myservice0._ptr().get_echo_history(),
+                                          self.seq_print())
+      return RTC.RTC_OK
+      
+    if argv[0] == "get_value_history":
+      OpenRTM_aist.CORBA_SeqUtil.for_each(self._myservice0._ptr().get_value_history(),
+                                          self.seq_print())
+      return RTC.RTC_OK
+      
+    print("Invalid command or argument(s).")
+
+    return RTC.RTC_OK
+
+
+  # functor class to print sequence data
+  class seq_print:
+    def __init__(self):
+      self._cnt = 0
+      return
+
+    def __call__(self, val):
+      print(self._cnt, ": ", val)
+      self._cnt += 1
+      return
+
+
+def MyServiceConsumerInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=myserviceconsumer_spec)
+  manager.registerFactory(profile,
+                          MyServiceConsumer,
+                          OpenRTM_aist.Delete)
+
+
+def MyModuleInit(manager):
+  MyServiceConsumerInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("MyServiceConsumer")
+  return
+
+
+def main():
+  # Initialize manager
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+
+  # Set module initialization proceduer
+  # This procedure will be invoked in activateManager() function.
+  mgr.setModuleInitProc(MyModuleInit)
+
+  # Activate manager and register to naming service
+  mgr.activateManager()
+
+  # run the manager in blocking mode
+  # runManager(False) is the default
+  mgr.runManager()
+
+  # If you want to run the manager in non-blocking mode, do like this
+  # mgr.runManager(True)
+  return
+
+
+if __name__ == "__main__":
+  main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/MyServiceProvider.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/MyServiceProvider.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/MyServiceProvider.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,149 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+import string
+import time
+
+import RTC
+import SimpleService, SimpleService__POA
+import OpenRTM_aist
+
+# Module specification
+myserviceprovider_spec = ["implementation_id", "MyServiceProvider",
+                          "type_name",         "MyServiceProvider",
+                          "description",       "MyService Provider Sample component",
+                          "version",           "1.0",
+                          "vendor",            "Shinji Kurihara",
+                          "category",          "example",
+                          "activity_type",     "DataFlowComponent",
+                          "max_instance",      "10",
+                          "language",          "Python",
+                          "lang_type",         "script",
+                          ""]
+
+# functor class to print sequence data
+class seq_print:
+  def __init__(self):
+    self._cnt = 0
+    return
+
+  def __call__(self, val):
+    print(self._cnt, ": ", val)
+    self._cnt += 1
+    return
+
+
+# Class implementing IDL interface MyService(MyService.idl)
+class MyServiceSVC_impl(SimpleService__POA.MyService):
+  def __init__(self):
+    self._echoList = []
+    self._valueList = []
+    self._value = 0
+    return
+
+  def __del__(self):
+    pass
+
+  def echo(self, msg):
+    OpenRTM_aist.CORBA_SeqUtil.push_back(self._echoList, msg)
+    print("MyService::echo() was called.")
+    for i in range(10):
+      print("Message: ", msg)
+      time.sleep(1)
+    print("MyService::echo() was finished.")
+    return msg
+
+  def get_echo_history(self):
+    print("MyService::get_echo_history() was called.")
+    OpenRTM_aist.CORBA_SeqUtil.for_each(self._echoList, seq_print())
+    return self._echoList
+
+  def set_value(self, value):
+    OpenRTM_aist.CORBA_SeqUtil.push_back(self._valueList, value)
+    self._value = value
+    print("MyService::set_value() was called.")
+    print("Current value: ", self._value)
+    return
+
+  def get_value(self):
+    print("MyService::get_value() was called.")
+    print("Current value: ", self._value)
+    return float(self._value)
+
+  def get_value_history(self):
+    print("MyService::get_value_history() was called.")
+    OpenRTM_aist.CORBA_SeqUtil.for_each(self._valueList, seq_print())
+
+    return self._valueList
+
+
+
+class MyServiceProvider(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+
+    return
+        
+
+  def onInitialize(self):
+    # initialization of CORBA Port
+    self._myServicePort = OpenRTM_aist.CorbaPort("MyService")
+
+    # initialization of Provider
+    self._myservice0 = MyServiceSVC_impl()
+
+    # Set service providers to Ports
+    self._myServicePort.registerProvider("myservice0", "MyService", self._myservice0)
+
+    # Set CORBA Service Ports
+    self.addPort(self._myServicePort)
+
+    return RTC.RTC_OK
+
+
+def MyServiceProviderInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=myserviceprovider_spec)
+  manager.registerFactory(profile,
+                          MyServiceProvider,
+                          OpenRTM_aist.Delete)
+  return
+
+
+def MyModuleInit(manager):
+  MyServiceProviderInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("MyServiceProvider")
+
+  """
+  rtobj = manager.getPOA().servant_to_reference(comp)._narrow(RTC.RTObject)
+
+  ecs = rtobj.get_execution_context_services()
+  ecs[0].activate_component(rtobj)
+  """
+  return
+
+
+def main():
+  # Initialize manager
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+
+  # Set module initialization proceduer
+  # This procedure will be invoked in activateManager() function.
+  mgr.setModuleInitProc(MyModuleInit)
+
+  # Activate manager and register to naming service
+  mgr.activateManager()
+
+  # run the manager in blocking mode
+  # runManager(False) is the default
+  mgr.runManager()
+
+  # If you want to run the manager in non-blocking mode, do like this
+  # mgr.runManager(True)
+
+
+if __name__ == "__main__":
+  main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/__init__.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/__init__.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/__init__.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1 @@
+# Empty file

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/gen.bat
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/gen.bat	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/gen.bat	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,17 @@
+python %PYTHONPATH%\OpenRTM_aist\utils\rtc-template\rtc-template.py -bpython^
+    --module-name=MyServiceProvider --module-type="MyServiceProvider"^
+    --module-desc="MyService Provider Sample component"^
+    --module-version=0.1 --module-vendor=AIST --module-category=Generic^
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC^
+    --module-max-inst=10^
+    --service=MyService:myservice0:MyService^
+    --service-idl=MyService.idl
+
+python %PYTHONPATH%\OpenRTM_aist\utils\rtc-template\rtc-template.py -bpython^
+    --module-name=MyServiceConsumer --module-type="MyServiceConsumer"^
+    --module-desc="MyService Consumer Sample component"^
+    --module-version=0.1 --module-vendor=AIST --module-category=Generic^
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC^
+    --module-max-inst=10^
+    --consumer=MyService:myservice0:MyService^
+    --consumer-idl=MyService.idl

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/gen.sh
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/gen.sh	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/gen.sh	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+python ${PYTHONPATH}/OpenRTM_aist/utils/rtc-template/rtc-template.py -bpython \
+    --module-name=MyServiceProvider --module-type="MyServiceProvider" \
+    --module-desc="MyService Provider Sample component" \
+    --module-version=0.1 --module-vendor=AIST --module-category=Generic \
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC \
+    --module-max-inst=10 \
+    --service=MyService:myservice0:MyService \
+    --service-idl=MyService.idl
+
+python ${PYTHONPATH}/OpenRTM_aist/utils/rtc-template/rtc-template.py -bpython \
+    --module-name=MyServiceConsumer --module-type="MyServiceConsumer" \
+    --module-desc="MyService Consumer Sample component" \
+    --module-version=0.1 --module-vendor=AIST --module-category=Generic \
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC \
+    --module-max-inst=10 \
+    --consumer=MyService:myservice0:MyService \
+    --consumer-idl=MyService.idl

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/rtc.conf
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/rtc.conf	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/rtc.conf	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,3 @@
+corba.nameservers: localhost
+naming.formats: %n.rtc
+logger.enable: NO

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/run.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/run.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/SimpleService/run.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,70 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+#
+# @file run.py
+# @brief ExtTrigger example startup script
+# @date $Date: 2007/10/26 $
+#
+# Copyright (c) 2003-2007 Noriaki Ando <n-ando at aist.go.jp> and Shinji Kurihara
+#          Task-intelligence Research Group,
+#          Intelligent System Research Institute,
+#          National Institute of Industrial Science (AIST), Japan
+#          All rights reserved.
+#
+
+import sys,os,platform
+import time
+import commands
+
+nsport="2809"
+sysinfo = platform.uname()
+hostname= sysinfo[1]
+plat=sys.platform
+
+if plat == "win32":
+    os.system("rd /S /Q SimpleService")
+    os.system("rd /S /Q SimpleService__POA")
+    os.system("omniidl.exe -bpython MyService.idl")
+    os.system("start \"\" \"%RTM_ROOT%\\bin\\rtm-naming.bat\"")
+    os.system("start python MyServiceConsumer.py")
+    os.system("start python MyServiceProvider.py")
+    time.sleep(5)
+    os.system("python Connector.py")
+
+else:
+    os.system('rm -rf SimpleService*')
+    os.system('omniidl -bpython MyService.idl')
+    status,term=commands.getstatusoutput("which xterm")
+    term += " -e"
+    if status != 0:
+        status,term=commands.getstatusoutput("which kterm")
+        term += " -e"
+
+    if status != 0:
+        status,term=commands.getstatusoutput("which uxterm")
+        term += " -e"
+
+    if status != 0:
+        status,term=commands.getstatusoutput("which gnome-terminal")
+        term += " -x"
+
+    if status != 0:
+        print("No terminal program (kterm/xterm/gnome-terminal) exists.")
+        sys.exit(0)
+
+    path = None
+    for p in sys.path:
+        if os.path.exists(os.path.join(p,"OpenRTM_aist")):
+            path = os.path.join(p,"OpenRTM_aist","utils","rtm-naming")
+            break
+    if path is None:
+        print("rtm-naming directory not exist.")
+        sys.exit(0)
+
+    os.system('python %s/rtm-naming.py &'%path)
+    os.system('%s python MyServiceConsumer.py &'%term)
+    os.system('%s python MyServiceProvider.py &'%term)
+    time.sleep(3)
+    os.system("python Connector.py")

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/Connector.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/Connector.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/Connector.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,72 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+
+from omniORB import CORBA
+
+import RTC
+import OpenRTM_aist
+
+
+def main():
+
+    # subscription type
+    subs_type = "Flush"
+
+    # initialization of ORB
+    orb = CORBA.ORB_init(sys.argv)
+
+    # get NamingService
+    naming = OpenRTM_aist.CorbaNaming(orb, "localhost")
+    
+    sl  = OpenRTM_aist.CorbaConsumer()
+    tkm = OpenRTM_aist.CorbaConsumer()
+
+    # find TkMotorComp0 component
+    tkm.setObject(naming.resolve("TkMotorComp0.rtc"))
+
+    # get ports
+    inobj = tkm.getObject()._narrow(RTC.RTObject)
+    pin = inobj.get_ports()
+    pin[0].disconnect_all()
+
+
+    # find SliderComp0 component
+    sl.setObject(naming.resolve("SliderComp0.rtc"))
+
+    # get ports
+    outobj = sl.getObject()._narrow(RTC.RTObject)
+    pout = outobj.get_ports()
+    pout[0].disconnect_all()
+
+
+    # connect ports
+    conprof = RTC.ConnectorProfile("connector0", "", [pin[0],pout[0]], [])
+    OpenRTM_aist.CORBA_SeqUtil.push_back(conprof.properties,
+                                    OpenRTM_aist.NVUtil.newNV("dataport.interface_type",
+                                                         "corba_cdr"))
+
+    OpenRTM_aist.CORBA_SeqUtil.push_back(conprof.properties,
+                                    OpenRTM_aist.NVUtil.newNV("dataport.dataflow_type",
+                                                         "push"))
+
+    OpenRTM_aist.CORBA_SeqUtil.push_back(conprof.properties,
+                                    OpenRTM_aist.NVUtil.newNV("dataport.subscription_type",
+                                                         subs_type))
+
+    ret = pin[0].connect(conprof)
+    
+    # activate TkMotorComp0
+    eclistin = inobj.get_owned_contexts()
+    eclistin[0].activate_component(inobj)
+
+    # activate SliderComp0
+    eclistout = outobj.get_owned_contexts()
+    eclistout[0].activate_component(outobj)
+
+
+
+if __name__ == "__main__":
+	main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/SliderComp.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/SliderComp.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/SliderComp.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,105 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+import time
+sys.path.append(".")
+
+import RTC
+import OpenRTM_aist
+
+import slider
+
+
+channels = (
+  ("motor0", -360, 360, 0.1, 200),
+  ("motor1", -360, 360, 0.1, 200),
+  ("motor2", -360, 360, 0.1, 200),
+  ("motor3", -360, 360, 0.1, 200),
+  ("motor4", -360, 360, 0.1, 200),
+  ("motor5", -360, 360, 0.1, 200))
+
+mod_spec = ["implementation_id", "SliderComp", 
+            "type_name", "SliderComp", 
+            "description", "slider component", 
+            "version", "1.0", 
+            "vendor", "Noriaki Ando and Shinji Kurihara", 
+            "category", "Generic", 
+            "activity_type", "DataFlowComponent", 
+            "max_instance", "10", 
+            "language", "Python", 
+            "lang_type""SCRIPT",
+            ""]
+
+sl = slider.SliderMulti(channels)
+# thread.start_new_thread(sl.mainloop, ())
+
+class SliderComp(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+    return
+        
+
+  def onInitialize(self):
+    self._sl_data = RTC.TimedFloatSeq(RTC.Time(0,0), [])
+    self._slOut = OpenRTM_aist.OutPort("slider", self._sl_data)
+
+    self.addOutPort("slider", self._slOut)
+    return RTC.RTC_OK
+
+  def onActivated(self, ec_id):
+    print(sl.get())
+    time.sleep(1)
+    return RTC.RTC_OK
+
+
+  def onExecute(self, ec_id):
+    self._sl_data.data = sl.get()
+    self._slOut.write()
+    time.sleep(0.01)
+    return RTC.RTC_OK
+
+
+  def onShutdown(self, ec_id):
+    sl.quit()
+    return RTC.RTC_OK
+
+
+
+def SliderCompInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=mod_spec)
+  manager.registerFactory(profile,
+                          SliderComp,
+                          OpenRTM_aist.Delete)
+
+def MyModuleInit(manager):
+  SliderCompInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("SliderComp")
+
+  print("Componet created")
+
+
+def main():
+  # Initialize manager
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+
+  # Set module initialization proceduer
+  # This procedure will be invoked in activateManager() function.
+  mgr.setModuleInitProc(MyModuleInit)
+
+  # Activate manager and register to naming service
+  mgr.activateManager()
+
+  # run the manager in blocking mode
+  # runManager(False) is the default
+  #mgr.runManager()
+
+  # If you want to run the manager in non-blocking mode, do like this
+  mgr.runManager(True)
+  sl.mainloop()
+
+if __name__ == "__main__":
+  main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/TkMotorComp.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/TkMotorComp.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/TkMotorComp.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,113 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+sys.path.append(".")
+
+import RTC
+import OpenRTM_aist
+
+import tkmotor
+import time
+
+
+mod_spec = ["implementation_id", "TkMotorComp", 
+            "type_name", "TkMotorComp", 
+            "description", "Tk Motor component (velocity control)", 
+            "version", "1.0", 
+            "vendor", "Noriaki Ando and Shinji Kurihara", 
+            "category", "Generic", 
+            "activity_type", "DataFlowComponent", 
+            "max_instance", "10", 
+            "language", "Python", 
+            "lang_type""SCRIPT",
+            ""]
+
+
+tkm = tkmotor.TkMotor(6, 40)
+#thread.start_new_thread(tkm.mainloop, ())
+
+class TkMotorComp(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+    self._cnt = 0
+    self._num = 6
+    return
+
+
+  def onInitialize(self):
+    self._tk_data = RTC.TimedFloatSeq(RTC.Time(0,0), [])
+    self._tkIn = OpenRTM_aist.InPort("vel", self._tk_data)
+
+    self.addInPort("vel", self._tkIn)
+    return RTC.RTC_OK
+
+  def onActivated(self, ec_id):
+    val = [self._cnt] * self._num
+    tkm.set_angle(val)
+    time.sleep(0.01)
+    self._cnt += 1
+    self._v = [0] * 6
+    return RTC.RTC_OK
+
+
+  def onExecute(self, ec_id):
+    try:
+      indata = self._tkIn.read()
+      val = indata.data
+      print(val)
+      if len(val) == 6:
+        for i in range(6):
+          self._v[i] += val[i] / 2
+        tkm.set_angle(self._v)
+    except:
+      print("Exception cought in onExecute()")
+
+    time.sleep(0.01)
+    return RTC.RTC_OK
+
+
+  def onShutdown(self, ec_id):
+    tkm.quit()
+    return RTC.RTC_OK
+
+
+
+def TkMotorCompInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=mod_spec)
+  manager.registerFactory(profile,
+                          TkMotorComp,
+                          OpenRTM_aist.Delete)
+
+
+def MyModuleInit(manager):
+  TkMotorCompInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("TkMotorComp")
+
+  print("Componet created")
+
+
+def main():
+  # Initialize manager
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+
+  # Set module initialization proceduer
+  # This procedure will be invoked in activateManager() function.
+  mgr.setModuleInitProc(MyModuleInit)
+
+  # Activate manager and register to naming service
+  mgr.activateManager()
+
+  # run the manager in blocking mode
+  # runManager(False) is the default
+  #mgr.runManager()
+
+  # If you want to run the manager in non-blocking mode, do like this
+  mgr.runManager(True)
+  tkm.mainloop()
+
+if __name__ == "__main__":
+  main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/TkMotorPosComp.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/TkMotorPosComp.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/TkMotorPosComp.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,113 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+sys.path.append(".")
+
+import RTC
+import OpenRTM_aist
+
+import tkmotor
+import time
+
+
+mod_spec = ["implementation_id", "TkMotorPosComp", 
+            "type_name", "TkMotorPosComp", 
+            "description", "Tk Motor component (position control)", 
+            "version", "1.0", 
+            "vendor", "Noriaki Ando and Shinji Kurihara", 
+            "category", "Generic", 
+            "activity_type", "DataFlowComponent", 
+            "max_instance", "10", 
+            "language", "Python", 
+            "lang_type""SCRIPT",
+            ""]
+
+
+tkm = tkmotor.TkMotor(6, 40)
+#thread.start_new_thread(tkm.mainloop, ())
+
+class TkMotorPosComp(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+    self._cnt = 0
+    self._num = 6
+    return
+
+
+  def onInitialize(self):
+    self._tk_data = RTC.TimedFloatSeq(RTC.Time(0,0), [])
+    self._tkIn = OpenRTM_aist.InPort("pos", self._tk_data)
+
+    self.addInPort("pos", self._tkIn)
+    return RTC.RTC_OK
+
+
+  def onActivated(self, ec_id):
+    val = [self._cnt] * self._num
+    tkm.set_angle(val)
+    time.sleep(0.01)
+    self._cnt += 1
+    self._v = [0] * 6
+    return RTC.RTC_OK
+
+
+  def onExecute(self, ec_id):
+    try:
+      indata = self._tkIn.read()
+      val = indata.data
+      print(val)
+      if len(val) == 6:
+        for i in range(6):
+          self._v[i] = val[i] * 10
+        tkm.set_angle(self._v)
+    except:
+      print("Exception cought in onExecute()")
+
+    time.sleep(0.01)
+    return RTC.RTC_OK
+
+
+  def onShutdown(self, ec_id):
+    tkm.quit()
+    return RTC.RTC_OK
+
+
+
+def TkMotorPosCompInit(manager):
+  profile = OpenRTM_aist.Properties(defaults_str=mod_spec)
+  manager.registerFactory(profile,
+                          TkMotorPosComp,
+                          OpenRTM_aist.Delete)
+
+def MyModuleInit(manager):
+  TkMotorPosCompInit(manager)
+
+  # Create a component
+  comp = manager.createComponent("TkMotorPosComp")
+
+  print("Componet created")
+
+
+def main():
+  # Initialize manager
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+
+  # Set module initialization proceduer
+  # This procedure will be invoked in activateManager() function.
+  mgr.setModuleInitProc(MyModuleInit)
+
+  # Activate manager and register to naming service
+  mgr.activateManager()
+
+  # run the manager in blocking mode
+  # runManager(False) is the default
+  #mgr.runManager()
+
+  # If you want to run the manager in non-blocking mode, do like this
+  mgr.runManager(True)
+  tkm.mainloop()
+
+if __name__ == "__main__":
+  main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/__init__.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/__init__.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/__init__.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1 @@
+# Empty file

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/rtc.conf
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/rtc.conf	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/rtc.conf	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,3 @@
+corba.nameservers: localhost
+naming.formats: %n.rtc
+logger.enable: NO

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/run.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/run.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/run.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,65 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+#
+# @file run.py
+# @brief ExtTrigger example startup script
+# @date $Date: 2007/10/26 $
+#
+# Copyright (c) 2003-2007 Noriaki Ando <n-ando at aist.go.jp> and Shinji Kurihara
+#          Task-intelligence Research Group,
+#          Intelligent System Research Institute,
+#          National Institute of Industrial Science (AIST), Japan
+#          All rights reserved.
+#
+
+import sys,os,platform
+import time
+import commands
+
+nsport="2809"
+sysinfo = platform.uname()
+hostname= sysinfo[1]
+plat=sys.platform
+
+if plat == "win32":
+    os.system("start \"\" \"%RTM_ROOT%\\bin\\rtm-naming.bat\"")
+    os.system("start python SliderComp.py")
+    os.system("start python TkMotorComp.py")
+    time.sleep(5)
+    os.system("python Connector.py")
+
+else:
+    status,term=commands.getstatusoutput("which xterm")
+    term += " -e"
+    if status != 0:
+        status,term=commands.getstatusoutput("which kterm")
+        term += " -e"
+
+    if status != 0:
+        status,term=commands.getstatusoutput("which uxterm")
+        term += " -e"
+
+    if status != 0:
+        status,term=commands.getstatusoutput("which gnome-terminal")
+        term += " -x"
+
+    if status != 0:
+        print("No terminal program (kterm/xterm/gnome-terminal) exists.")
+        exit
+
+    path = None
+    for p in sys.path:
+        if os.path.exists(os.path.join(p,"OpenRTM_aist")):
+            path = os.path.join(p,"OpenRTM_aist","utils","rtm-naming")
+            break
+    if path is None:
+        print("rtm-naming directory not exist.")
+        sys.exit(0)
+
+    os.system('python %s/rtm-naming.py &'%path)
+    os.system('%s python SliderComp.py &'%term)
+    os.system('%s python TkMotorComp.py &'%term)
+    time.sleep(3)
+    os.system("python Connector.py")

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/slider.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/slider.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/slider.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+from Tkinter import *
+#import thread
+import dummy_threading
+import time
+
+class SliderMulti(Frame):
+	def __init__(self, channels, master=None):
+		Frame.__init__(self, master)
+		self.init(channels)
+		self.pack()
+
+
+	def init(self, channels):
+		self._channels = channels
+		self.var = [] * len(self._channels)
+		self.scales = []
+		
+		i = 0
+		for channel in self._channels:
+			self.var.append(DoubleVar(0))
+			self.scales.append(
+				Scale(self, label=channel[0], variable=self.var[i],
+					  to=channel[1], orient=VERTICAL))
+			self.scales[i]["from"] = channel[2]
+			self.scales[i]["resolution"] = channel[3]
+			self.scales[i]["length"] = channel[4]
+			self.scales[i].pack(side=LEFT)
+			i = i + 1
+
+	def get(self):
+		val = []
+		for s in self.scales:
+			val.append(s.get())
+
+		return val
+
+	def set(self, value):
+		i = 0
+		for v in value:
+			self.scales[i].set(v)
+			i = i + 1
+		return
+
+
+
+
+def test ():
+	channels = (("angle", 0, 360, 0.1, 200), ("velocity", -100, 100, 0.1, 200))
+	slider = SliderMulti(channels)
+	sth = dummy_threading.Thread(target=slider.mainloop, args=())
+	sth.start()
+#	thread.start_new_thread(slider.mainloop, ())
+
+	while (1):
+		print(slider.get())
+		time.sleep(0.5)
+#		slider.update()
+
+if  __name__ == '__main__': test()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/tkmotor.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/tkmotor.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Slider_and_Motor/tkmotor.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,92 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+from Tkinter import *
+import thread
+import time
+import math
+
+class TkMotor(Frame):
+	def __init__(self, num, radius, master=None):
+		Frame.__init__(self, master)
+		self.num = num
+		self.r = radius
+		self.init()
+		self.pack()
+
+
+
+	def init(self):
+		self.space = 4
+		canwidth = self.r * self.space * self.num
+		canheight = self.r * self.space
+		self.can = Canvas(self, bg="white",
+						  width=canwidth, height=canheight)
+		self.can.pack()
+		self.circ = []
+		self.line = []
+		self.x = []
+		self.y = []
+		self.x1 = []
+		self.y1 = []
+		self.x2 = []
+		self.y2 = []
+		self.sx1 = []
+		self.sy1 = []
+		self.sx2 = []
+		self.sy2 = []
+		
+		for i in xrange(self.num):
+			self.x.append(self.r * self.space / 2 * (i+0.5) * 2)
+			self.y.append(self.r * self.space / 2)
+			self.x1.append(self.x[i] - self.r)
+			self.y1.append(self.y[i] - self.r)
+			self.x2.append(self.x[i] + self.r)
+			self.y2.append(self.y[i] + self.r)
+			self.sx1.append(self.x[i] - self.r * 0.1)
+			self.sy1.append(self.y[i] - self.r * 0.1)
+			self.sx2.append(self.x[i] + self.r * 0.1)
+			self.sy2.append(self.y[i] + self.r * 0.1)
+			self.circ.append(self.can.create_oval(self.x1[i], self.y1[i],
+												  self.x2[i], self.y2[i],
+												  outline="#aaaaaa",
+												  fill="#dddddd"))
+			self.circ.append(self.can.create_oval(self.sx1[i], self.sy1[i],
+												  self.sx2[i], self.sy2[i],
+												  outline="#000000",
+												  fill="#000000"))
+			self.line.append(self.can.create_line(self.x[i], self.y[i],
+												  self.x[i],
+												  self.y[i] - self.r,
+												  fill="#700040", width=5))
+
+		
+	def set_angle(self, angle):
+		if len(angle) != self.num: return
+		i = 0
+		for a in angle:
+			a = a * math.pi / 180
+			self.can.delete(self.line[i])
+			self.line[i] = self.can.create_line(self.x[i], self.y[i],
+								 self.x[i] + self.r * math.cos(a),
+								 self.y[i] + self.r * math.sin(a),
+								  fill="#700040", width=5)
+			i = i + 1
+
+
+
+def test ():
+	m = TkMotor(6, 40, Toplevel())
+	n = TkMotor(6, 40, Toplevel())
+	thread.start_new_thread(m.mainloop, ())
+	thread.start_new_thread(n.mainloop, ())
+	cnt = 0
+	while(1):
+		angle = [cnt % 360, - cnt % 360, cnt % 360, - cnt % 360, cnt % 360, - cnt % 360]
+		m.set_angle(angle)
+		time.sleep(0.001)
+		cnt = cnt + 1
+		
+
+if  __name__ == '__main__': test()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/AIO.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/AIO.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/AIO.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Hardware interface.AIO:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T10:49:12.710+09:00" rtc:creationDate="2009-08-25T10:49:12.710+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Access to a device that provides direct control over and reading of calibrated or raw voltage levels." rtc:category="Hardware interface" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="AIO"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="inputVoltages" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedDoubleSeq" rtc:name="InputVoltages" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="Volts." rtcDoc:semantics="Calibrated voltage levels to set the channels of the device to." rtcDoc:number="Variable (should correspond to the value returned by NumChannels())." rtcDoc:type="TimedDoubleSeq" rtcDoc:description="Set the levels of the analogue I/O device."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="rawInputVoltages" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedDoubleSeq" rtc:name="RawInputVoltages" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="Volts." rtcDoc:semantics="Raw voltage levels to set the channels of the device to." rtcDoc:number="Variable (should correspond to the value returned by NumChannels())." rtcDoc:type="TimedDoubleSeq" rtcDoc:description="Set the raw levels of the analogue I/O device."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="outputVoltages" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedDoubleSeq" rtc:name="OutputVoltages" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="Volts." rtcDoc:semantics="Calibrated voltage levels as read by the device." rtcDoc:number="Variable (should correspond to the value returned by NumChannels())." rtcDoc:type="TimedDoubleSeq" rtcDoc:description="Get the levels of the analogue I/O device."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="rawOutputVoltages" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedDoubleSeq" rtc:name="RawOutputVoltages" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="Volts." rtcDoc:semantics="Raw voltage levels as read by the device." rtcDoc:number="Variable (should correspond to the value returned by NumChannels())." rtcDoc:type="TimedDoubleSeq" rtcDoc:description="Get the raw levels of the analogue I/O device."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="aioServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="AIO" rtc:idlFile="AIO.idl" rtc:varname="" rtc:instanceName="aioInterface" rtc:direction="Provided" rtc:name="aio">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to access callbacks for an AIO device."/>
+        </rtc:ServiceInterface>
+        <rtcDoc:Doc rtcDoc:ifdescription="AIO interface." rtcDoc:description="Interface to AIO device callbacks."/>
+    </rtc:ServicePorts>
+    <rtc:Language>
+        <rtc:Cxx rtc:arch="" rtc:os="etc"/>
+    </rtc:Language>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/ActArray.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/ActArray.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/ActArray.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Hardware controller.ActArray:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T12:47:25.559+09:00" rtc:creationDate="2009-08-25T12:47:25.559+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Low-level control of an array of actuators, allowing each individual actuator's position to be controlled." rtc:category="Hardware controller" rtc:componentKind="DataFlowComponent" rtc:activityType="EVENT_DRIVEN" rtc:componentType="STATIC" rtc:name="ActArray"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="actuatorPos" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="ActArrayActuatorPos" rtc:name="ActuatorPos" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="Metres or radians." rtcDoc:semantics="The position of a single actuator." rtcDoc:number="1" rtcDoc:type="ActArrayActuatorPos" rtcDoc:description="Individual actuator position control."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="actuatorSpeed" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="ActArrayActuatorSpeed" rtc:name="ActuatorSpeed" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="m/s or rad/s" rtcDoc:semantics="The speed of a single actuator." rtcDoc:number="1" rtcDoc:type="ActArrayActuatorSpeed" rtcDoc:description="Individual actuator speed control."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="actuatorCurrent" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="ActArrayActuatorCurrent" rtc:name="ActuatorCurrent" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="Amps" rtcDoc:semantics="The current of a single actuator." rtcDoc:number="1" rtcDoc:type="ActArrayActuatorCurrent" rtcDoc:description="Individual actuator current control."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="positions" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedDoubleSeq" rtc:name="Positions" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="Metres or radians." rtcDoc:semantics="The position of each actuator in the array." rtcDoc:number="Variable." rtcDoc:type="TimedDoubleSeq" rtcDoc:description="Whole-array position control."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="speeds" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedDoubleSeq" rtc:name="Speeds" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="m/s or rad/s" rtcDoc:semantics="The speed of each actuator in the array." rtcDoc:number="Variable" rtcDoc:type="TimedDoubleSeq" rtcDoc:description="Whole array speed control."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="currents" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedDoubleSeq" rtc:name="Currents" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="Amps" rtcDoc:semantics="The current of each actuator in the array." rtcDoc:number="Variable." rtcDoc:type="TimedDoubleSeq" rtcDoc:description="Whole-array current control."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="state" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="ActArrayState" rtc:name="State" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="1" rtcDoc:type="ActArrayState" rtcDoc:description="Status of the actuators in the array."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="actarrayServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="ActArray" rtc:idlFile="ActArray.idl" rtc:varname="" rtc:instanceName="actarray" rtc:direction="Provided" rtc:name="actarray">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to access callbacks for an ActArray device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Bumper.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Bumper.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Bumper.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Sensor.Bumper:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T14:19:20.221+09:00" rtc:creationDate="2009-08-25T14:19:20.221+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Interface for a bump sensor device, which may contain one or more individual sensing elements (bumpers)." rtc:category="Sensor" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="Bumper"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="bumpers" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedBooleanSeq" rtc:name="Bumpers" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="True if a sensor is on, false if it is off." rtcDoc:number="Variable." rtcDoc:type="TimedBooleanSeq" rtcDoc:description="Bump sensor values."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="bumperServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="Bumper" rtc:idlFile="Bumper.idl" rtc:varname="" rtc:instanceName="bumper" rtc:direction="Provided" rtc:name="bumper">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to access callbacks for a Bumper device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Camera.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Camera.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Camera.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Sensor.Camera:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T14:23:39.692+09:00" rtc:creationDate="2009-08-25T14:23:39.692+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Interface to a device that produces images." rtc:category="Sensor" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="Camera"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="image" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="CameraImage" rtc:name="Image" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="Image data, including meta-data." rtcDoc:number="1" rtcDoc:type="CameraImage" rtcDoc:description="Latest image data from the camera device."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="cameraServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="Camera" rtc:idlFile="Camera.idl" rtc:varname="" rtc:instanceName="camera" rtc:direction="Provided" rtc:name="camera">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to access callbacks for a Camera device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/CarlikeControl.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/CarlikeControl.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/CarlikeControl.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Hardware controller.CarlikeControl:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T16:02:36.452+09:00" rtc:creationDate="2009-08-25T16:02:36.452+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Control of a non-holonomic robot with car-like steering, where the forward speed and the steering angle are the control inputs." rtc:category="Hardware controller" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="CarlikeControl"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="controls" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedCarlike" rtc:name="Controls" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedCarlike" rtcDoc:description="Speed and steering control."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="status" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedCarlike" rtc:name="Status" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedCarlike" rtcDoc:description="Current speed and steering angle."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="carlikeControlServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="CarlikeControl" rtc:idlFile="Position.idl" rtc:varname="" rtc:instanceName="carlikeControlServices" rtc:direction="Provided" rtc:name="carlikeControlServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by a CarlikeControl device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/DIO.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/DIO.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/DIO.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Hardware Interface.DIO:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T14:27:40.510+09:00" rtc:creationDate="2009-08-25T14:27:40.510+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Access to a device that controls and reads digital values." rtc:category="Hardware Interface" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="DIO"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="bits" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedULong" rtc:name="Bits" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="Each bit of the unsigned long corresponds to a channel of the device." rtcDoc:number="1" rtcDoc:type="TimedULong" rtcDoc:description="Set the bits of the digital I/O device high and low."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="bits" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedULong" rtc:name="Bits" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="Each bit of the unsigned long corresponds to a channel of the device." rtcDoc:number="1" rtcDoc:type="TimedULong" rtcDoc:description="Get the bits of the digital I/O device."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="dioServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="DIO" rtc:idlFile="DIO.idl" rtc:varname="" rtc:instanceName="dio" rtc:direction="Provided" rtc:name="dio">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks of a DIO device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/FeatureMap.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/FeatureMap.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/FeatureMap.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Software algorithm.FeatureMap:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T15:26:05.601+09:00" rtc:creationDate="2009-08-25T15:26:05.601+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="A map based on detected features in 2D space." rtc:category="Software algorithm" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="FeatureMap"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="features" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="Features" rtc:name="Features" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="List of features that make up the map." rtcDoc:number="1" rtcDoc:type="Features" rtcDoc:description="Features in the map."/>
+    </rtc:DataPorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Fiducial.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Fiducial.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Fiducial.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Sensor.Fiducial:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T14:31:32.615+09:00" rtc:creationDate="2009-08-25T14:31:32.615+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Interface to a device that detects markers in the environment (visual markers, laser barcodes, etc)." rtc:category="Sensor" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="Fiducial"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="fiducials" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="Fiducials" rtc:name="Fiducials" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="List of detected fiducial markers, including ID and estimated position." rtcDoc:number="1" rtcDoc:type="Fiducials" rtcDoc:description="Detected fiducial markers."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="fiducialServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="Fiducial" rtc:idlFile="Fiducial.idl" rtc:varname="" rtc:instanceName="fiducial" rtc:direction="Provided" rtc:name="fiducial">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks of a fiducial finder device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/GPS.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/GPS.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/GPS.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Sensor.GPS:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T14:38:58.105+09:00" rtc:creationDate="2009-08-25T14:38:58.105+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Interface to a standard GPS device." rtc:category="Sensor" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="GPS"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="gpsData" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="GPSData" rtc:name="GPSData" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="1" rtcDoc:type="GPSData" rtcDoc:description="Latest GPS data, including position information."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="gpsServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="GPS" rtc:idlFile="GPS.idl" rtc:varname="" rtc:instanceName="gps" rtc:direction="Provided" rtc:name="gps">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by a GPS device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Gripper.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Gripper.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Gripper.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Hardware controller.Gripper:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T14:40:33.358+09:00" rtc:creationDate="2009-08-25T14:40:33.358+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Interface to a robotic gripper, such as a multi-fingered hand or the gripper on Pioneer robots." rtc:category="Hardware controller" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="Gripper"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="state" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="GripperState" rtc:name="State" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="1" rtcDoc:type="GripperState" rtcDoc:description="Status of the gripper."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="breakBeams" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedBoolean" rtc:name="Breakbeams" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="Each value represents a single breakbeam. True for obstructed, false for clear." rtcDoc:number="Variable." rtcDoc:type="TimedBoolean" rtcDoc:description="Status of any breakbeams in the gripper indicating the position of an object within the gripper."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="force" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedDouble" rtc:name="Force" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="Newtons." rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedDouble" rtcDoc:description="Force detected by any force sensors in the gripper."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="left" rtc:name="gripperServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="Gripper" rtc:idlFile="Gripper.idl" rtc:varname="" rtc:instanceName="gripper" rtc:direction="Provided" rtc:name="gripper">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to callbacks provided by a Gripper device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/HeadingControl2D.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/HeadingControl2D.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/HeadingControl2D.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Hardware controller.HeadingControl2D:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T16:05:16.479+09:00" rtc:creationDate="2009-08-25T16:05:16.479+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Control of a robot capable of moving at a given speed in any direction in a plane." rtc:category="Hardware controller" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="HeadingControl2D"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="controls" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedSpeedHeading2D" rtc:name="Controls" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedSpeedHeading2D" rtcDoc:description="Speed to move at and heading to move towards."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="status" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedSpeedHeading2D" rtc:name="Status" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedSpeedHeading2D" rtcDoc:description="Current speed and heading."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="headingControl2DServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="HeadingControl2D" rtc:idlFile="Position.idl" rtc:varname="" rtc:instanceName="headingControl2DServices" rtc:direction="Provided" rtc:name="headingControl2DServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by a HeadingControl2D device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/HeadingControl3D.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/HeadingControl3D.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/HeadingControl3D.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Hardware controller.HeadingControl3D:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T16:05:16.479+09:00" rtc:creationDate="2009-08-25T16:05:16.479+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Control of a robot capable of moving at a given speed in any direction in 3D space." rtc:category="Hardware controller" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="HeadingControl3D"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="controls" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedSpeedHeading3D" rtc:name="Controls" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedSpeedHeading3D" rtcDoc:description="Speed to move at and heading to move towards."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="status" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedSpeedHeading3D" rtc:name="Status" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedSpeedHeading3D" rtcDoc:description="Current speed and heading."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="headingControl3DServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="HeadingControl3D" rtc:idlFile="Position.idl" rtc:varname="" rtc:instanceName="headingControl3DServices" rtc:direction="Provided" rtc:name="headingControl3DServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by a HeadingControl3D device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/IMU.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/IMU.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/IMU.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Sensor.IMU:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T14:46:44.462+09:00" rtc:creationDate="2009-08-25T14:46:44.462+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Interface to an Inertial Measurement Unit." rtc:category="Sensor" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="IMU"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="acceleration" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedAcceleration3D" rtc:name="Acceleration" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="Metres per second squared." rtcDoc:semantics="" rtcDoc:number="1" rtcDoc:type="TimedAcceleration3D" rtcDoc:description="Measured acceleration values along the x, y and z axes."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="angVel" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedAngularVelocity3D" rtc:name="AngularVelocity" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="Radians per second." rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedAngularVelocity3D" rtcDoc:description="Velocities around the x, y and z axes."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="left" rtc:name="imuServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="IMU" rtc:idlFile="IMU.idl" rtc:varname="" rtc:instanceName="imuServices" rtc:direction="Provided" rtc:name="imuServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by an IMU device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/INS.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/INS.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/INS.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Sensor.INS:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T14:54:14.908+09:00" rtc:creationDate="2009-08-25T14:54:14.908+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Interface to an Inertial Navigation System device." rtc:category="Sensor" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="INS"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="data" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="INSData" rtc:name="Data" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="INSData" rtcDoc:description="Position information from the INS."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="insServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="INS" rtc:idlFile="INS.idl" rtc:varname="" rtc:instanceName="insServices" rtc:direction="Provided" rtc:name="insServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by an INS device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Joystick.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Joystick.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Joystick.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Human input.Joystick:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T14:56:24.481+09:00" rtc:creationDate="2009-08-25T14:56:24.481+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Access a joystick control device." rtc:category="Human input" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="Joystick"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="axes" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedFloatSeq" rtc:name="Axes" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="Axes values normalised to between -1 and 1, with 0 as the centre." rtcDoc:number="Variable." rtcDoc:type="TimedFloatSeq" rtcDoc:description="Values of the joystick axes."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="buttons" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedBooleanSeq" rtc:name="Buttons" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="True if a button is pressed, false otherwise." rtcDoc:number="Variable" rtcDoc:type="TimedBooleanSeq" rtcDoc:description="Joystick button values."/>
+    </rtc:DataPorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Limb.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Limb.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Limb.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Hardware controller.Limb:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T15:05:10.666+09:00" rtc:creationDate="2009-08-25T15:05:10.666+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Control over the pose of the end-effector of a robotic limb, such as an arm." rtc:category="Hardware controller" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="Limb"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="oap" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="OAP" rtc:name="OAP" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="Metres" rtcDoc:semantics="Pose in (Orientation, Approach, Position) format." rtcDoc:number="1" rtcDoc:type="OAP" rtcDoc:description="Full pose control of the end-effector."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="p" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="Vector3D" rtc:name="P" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="Metres." rtcDoc:semantics="" rtcDoc:number="1" rtcDoc:type="Vector3D" rtcDoc:description="Position control of the end-effector, allowing the orientation to be freely chosen by the underlying driver."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="state" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="LimbState" rtc:name="State" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="1" rtcDoc:type="LimbState" rtcDoc:description="Current state of the end-effector."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="limbServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="Limb" rtc:idlFile="Limb.idl" rtc:varname="" rtc:instanceName="limbServices" rtc:direction="Provided" rtc:name="limbServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by a Limb device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Localise2D.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Localise2D.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Localise2D.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Software algorithm.Localise2D:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T15:19:09.235+09:00" rtc:creationDate="2009-08-25T15:19:09.235+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Provides an interface to a 2D localisation service." rtc:category="Software algorithm" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="Localise2D"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="hypotheses" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="Hypotheses2D" rtc:name="Hypotheses" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="1" rtcDoc:type="Hypotheses2D" rtcDoc:description="Latest localisation hypotheses."/>
+    </rtc:DataPorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Localise3D.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Localise3D.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Localise3D.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Software algorithm.Localise3D:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T15:19:09.235+09:00" rtc:creationDate="2009-08-25T15:19:09.235+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Provides an interface to a 3D localisation service." rtc:category="Software algorithm" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="Localise3D"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="hypotheses" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="Hypotheses3D" rtc:name="Hypotheses" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="1" rtcDoc:type="Hypotheses3D" rtcDoc:description="Latest localisation hypotheses."/>
+    </rtc:DataPorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Multicamera.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Multicamera.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Multicamera.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Sensor.Multicamera:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T15:30:21.230+09:00" rtc:creationDate="2009-08-25T15:30:21.230+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="An interface to a device that produces multiple images at once, such as a stereo camera pair." rtc:category="Sensor" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="Multicamera"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="images" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="MultiCameraImageList" rtc:name="Images" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="One image per camera device." rtcDoc:number="1" rtcDoc:type="MultiCameraImageList" rtcDoc:description="Sequence of images returned from the cameras that make up this device."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="multicameraServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="Multicamera" rtc:idlFile="Multicamera.idl" rtc:varname="" rtc:instanceName="multicameraServices" rtc:direction="Provided" rtc:name="multicameraServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by a Multicamera device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/OccupancyGridMap.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/OccupancyGridMap.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/OccupancyGridMap.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Software algorithm.OccupancyGridMap:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T15:24:16.378+09:00" rtc:creationDate="2009-08-25T15:24:16.378+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="A map based on an occupancy grid." rtc:category="Software algorithm" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="OccupancyGridMap"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="left" rtc:name="ogmapServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="OGMap" rtc:idlFile="Map.idl" rtc:varname="" rtc:instanceName="ogMapServices" rtc:direction="Provided" rtc:name="ogMapServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by an OccupancyGridMap implementation."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Odometry2D.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Odometry2D.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Odometry2D.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Sensor.Odometry2D:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T15:50:21.717+09:00" rtc:creationDate="2009-08-25T15:50:21.717+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="A device that provides 2D odometry data." rtc:category="Sensor" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="Odometry2D"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="odometry" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedPose2D" rtc:name="Odometry" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="1" rtcDoc:type="TimedPose2D" rtcDoc:description="Latest odometry data."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="odometry2DServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="Odometry2D" rtc:idlFile="Position.idl" rtc:varname="" rtc:instanceName="odometry2DServices" rtc:direction="Provided" rtc:name="odometry2DServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by an Odometry2D device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Odometry3D.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Odometry3D.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Odometry3D.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Sensor.Odometry3D:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T15:50:21.717+09:00" rtc:creationDate="2009-08-25T15:50:21.717+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="A device that provides 3D odometry data." rtc:category="Sensor" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="Odometry3D"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="odometry" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedPose3D" rtc:name="Odometry" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="1" rtcDoc:type="TimedPose3D" rtcDoc:description="Latest odometry data."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="odometry3DServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="Odometry3D" rtc:idlFile="Position.idl" rtc:varname="" rtc:instanceName="odometry3DServices" rtc:direction="Provided" rtc:name="odometry3DServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by an Odometry3D device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PanTilt.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PanTilt.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PanTilt.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Hardware controller.PanTilt:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T15:34:30.021+09:00" rtc:creationDate="2009-08-25T15:34:30.021+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Interface to a pan-tilt device." rtc:category="Hardware controller" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="PanTilt"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="position" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="PanTiltAngles" rtc:name="Position" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="1" rtcDoc:type="PanTiltAngles" rtcDoc:description="Control of the pan and tilt of the pan-tilt unit."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="state" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="PanTiltState" rtc:name="State" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="1" rtcDoc:type="PanTiltState" rtcDoc:description="Status of the pan-tilt unit."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="pantiltServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="PanTilt" rtc:idlFile="PanTilt.idl" rtc:varname="" rtc:instanceName="pantiltServices" rtc:direction="Provided" rtc:name="pantiltServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by a PanTilt device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PathFollower2D.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PathFollower2D.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PathFollower2D.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Software algorithm.PathFollower2D:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T15:42:35.583+09:00" rtc:creationDate="2009-08-25T15:42:35.583+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Follows a provided 2D path, attempting to meet speed and time constraints as it travels between each waypoint." rtc:category="Software algorithm" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="PathFollower2D"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="path" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="Path2D" rtc:name="Path" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="Sequence of waypoints that make up the path." rtcDoc:number="1" rtcDoc:type="Path2D" rtcDoc:description="Current path being followed."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="complete" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedBoolean" rtc:name="Complete" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="True when the path has been completed." rtcDoc:number="" rtcDoc:type="TimedBoolean" rtcDoc:description="Signals that the final waypoint has been reached."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="pathFollower2DServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="PathFollower2D" rtc:idlFile="Paths.idl" rtc:varname="" rtc:instanceName="pathFollower2DServices" rtc:direction="Provided" rtc:name="pathFollower2DServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by a PathFollower2D implementation."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PathFollower3D.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PathFollower3D.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PathFollower3D.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Software algorithm.PathFollower3D:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T15:42:35.583+09:00" rtc:creationDate="2009-08-25T15:42:35.583+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Follows a provided 3D path, attempting to meet speed and time constraints as it travels between each waypoint." rtc:category="Software algorithm" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="PathFollower3D"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="path" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="Path3D" rtc:name="Path" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="Sequence of waypoints that make up the path." rtcDoc:number="1" rtcDoc:type="Path3D" rtcDoc:description="Current path being followed."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="complete" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedBoolean" rtc:name="Complete" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="True when the path has been completed." rtcDoc:number="" rtcDoc:type="TimedBoolean" rtcDoc:description="Signals that the final waypoint has been reached."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="pathFollower3DServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="PathFollower3D" rtc:idlFile="Paths.idl" rtc:varname="" rtc:instanceName="pathFollower3DServices" rtc:direction="Provided" rtc:name="pathFollower3DServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by a PathFollower3D implementation."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PathPlanner2D.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PathPlanner2D.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PathPlanner2D.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Software algorithm.PathPlanner2D:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T15:38:22.844+09:00" rtc:creationDate="2009-08-25T15:38:22.844+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Plans a path in two-dimensional space, using a coarse path consisting of at least a start waypoint and an end waypoint as a base." rtc:category="Software algorithm" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="PathPlanner2D"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="path" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="Path2D" rtc:name="Path" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="Sequence of waypoints that make up the path." rtcDoc:number="1" rtcDoc:type="Path2D" rtcDoc:description="Most recent path created by the planner."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="pathPlanner2DServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="PathPlanner2D" rtc:idlFile="Paths.idl" rtc:varname="" rtc:instanceName="pathPlanner2DServices" rtc:direction="Provided" rtc:name="pathPlanner2DServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by a PathPlanner2D implementation."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PathPlanner3D.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PathPlanner3D.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PathPlanner3D.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Software algorithm.PathPlanner3D:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T15:38:22.844+09:00" rtc:creationDate="2009-08-25T15:38:22.844+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Plans a path in three-dimensional space, using a coarse path consisting of at least a start waypoint and an end waypoint as a base." rtc:category="Software algorithm" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="PathPlanner3D"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="path" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="Path3D" rtc:name="Path" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="Sequence of waypoints that make up the path." rtcDoc:number="1" rtcDoc:type="Path3D" rtcDoc:description="Most recent path created by the planner."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="pathPlanner3DServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="PathPlanner3D" rtc:idlFile="Paths.idl" rtc:varname="" rtc:instanceName="pathPlanner3DServices" rtc:direction="Provided" rtc:name="pathPlanner3DServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by a PathPlanner2D implementation."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PointCloud.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PointCloud.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PointCloud.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Sensor.PointCloud:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T15:47:15.638+09:00" rtc:creationDate="2009-08-25T15:47:15.638+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="A device that produces a cloud of points, possibly with colour information attached." rtc:category="Sensor" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="PointCloud"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="cloud" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="PointCloudData" rtc:name="Cloud" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="Sequence of points that make up the cloud." rtcDoc:number="1" rtcDoc:type="PointCloudData" rtcDoc:description="Points in the cloud."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="pointCloudServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="PointCloudServices" rtc:idlFile="PointCloud.idl" rtc:varname="" rtc:instanceName="pointCloudServices" rtc:direction="Provided" rtc:name="pointCloudServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by a PointCloud device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PoseControl2D.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PoseControl2D.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PoseControl2D.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Hardware controller.PoseControl2D:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T15:56:38.271+09:00" rtc:creationDate="2009-08-25T15:56:38.271+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Control of a robot capable of moving to a specified pose in two dimensions." rtc:category="Hardware controller" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="PoseControl2D"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="targetPose" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedPose2D" rtc:name="TargetPose" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedPose2D" rtcDoc:description="A pose to move to."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="targetPoseVel" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedPoseVel2D" rtc:name="TargetPoseVel" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedPoseVel2D" rtcDoc:description="A pose to move to and the velocity to travel at."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="pose" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedPose2D" rtc:name="Pose" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedPose2D" rtcDoc:description="Current pose of the robot."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="velocities" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedVelocity2D" rtc:name="Velocities" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedVelocity2D" rtcDoc:description="Current velocities."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="poseControl2DServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="PoseControl2D" rtc:idlFile="Position.idl" rtc:varname="" rtc:instanceName="poseControl2DServices" rtc:direction="Provided" rtc:name="poseControl2DServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by a PoseControl2D device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PoseControl3D.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PoseControl3D.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/PoseControl3D.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Hardware controller.PoseControl3D:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T15:56:38.271+09:00" rtc:creationDate="2009-08-25T15:56:38.271+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Control of a robot capable of moving to a specified pose in three dimensions." rtc:category="Hardware controller" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="PoseControl3D"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="targetPose" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedPose3D" rtc:name="TargetPose" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedPose3D" rtcDoc:description="A pose to move to."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="targetPoseVel" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedPoseVel3D" rtc:name="TargetPoseVel" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedPoseVel3D" rtcDoc:description="A pose to move to and the velocity to travel at."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="pose" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedPose3D" rtc:name="Pose" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedPose3D" rtcDoc:description="Current pose of the robot."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="velocities" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedVelocity3D" rtc:name="Velocities" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedVelocity3D" rtcDoc:description="Current velocities."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="poseControl3DServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="PoseControl3D" rtc:idlFile="Position.idl" rtc:varname="" rtc:instanceName="poseControl3DServices" rtc:direction="Provided" rtc:name="poseControl3DServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by a PoseControl3D device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Power.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Power.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Power.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Hardware interface.Power:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T16:10:13.819+09:00" rtc:creationDate="2009-08-25T16:10:13.819+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Interface to a power supply." rtc:category="Hardware interface" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="Power"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="voltage" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedFloat" rtc:name="Voltage" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="Volts" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedFloat" rtcDoc:description="Voltage level of the power supply."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="percent" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedFloat" rtc:name="Percent" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedFloat" rtcDoc:description="Percentage of full capacity remaining."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="current" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedFloat" rtc:name="Current" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="Amps" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedFloat" rtcDoc:description="Current energy consumption (if negative) or aquisition (if positive)."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="timeLeft" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedFloat" rtc:name="TimeLeft" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="Seconds" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedFloat" rtcDoc:description="Estimated time of power remaining."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="charging" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedBoolean" rtc:name="Charging" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="True if charging, false otherwise." rtcDoc:number="" rtcDoc:type="TimedBoolean" rtcDoc:description="If the device is receiving energy."/>
+    </rtc:DataPorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/RFID.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/RFID.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/RFID.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Sensor.RFID:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T16:23:42.645+09:00" rtc:creationDate="2009-08-25T16:23:42.645+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Access to an RFID device that can detect tags in the environment and, optionally, read and write data on those tags." rtc:category="Sensor" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="RFID"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="guids" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedStringSeq" rtc:name="GUIDs" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="One string per detected GUID." rtcDoc:number="Variable." rtcDoc:type="TimedStringSeq" rtcDoc:description="List of the GUIDs currently detected."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="rfidServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="RFID" rtc:idlFile="RFID.idl" rtc:varname="" rtc:instanceName="rfidServices" rtc:direction="Provided" rtc:name="rfidServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by an RFID device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Ranger.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Ranger.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/Ranger.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Sensor.Ranger:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T16:13:13.806+09:00" rtc:creationDate="2009-08-25T16:13:13.806+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Interface to a range sensing device." rtc:category="Sensor" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="Ranger"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="ranges" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="RangeData" rtc:name="Ranges" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="Ranges" rtcDoc:description="Range data with meta-information."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="intensities" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="IntensityData" rtc:name="Intensities" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="IntensityData" rtcDoc:description="Intensity data with meta-information."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="rangerServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="Ranger" rtc:idlFile="Ranger.idl" rtc:varname="" rtc:instanceName="rangerServices" rtc:direction="Provided" rtc:name="rangerServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by a Ranger device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/VelocityControl2D.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/VelocityControl2D.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/VelocityControl2D.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Hardware controller.VelocityControl2D:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T15:53:07.499+09:00" rtc:creationDate="2009-08-25T15:53:07.499+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Velocity control of a planar robot capable of moving along its x axis and adjusting its heading, and possibly capable of moving along its y axis." rtc:category="Hardware controller" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="VelocityControl2D"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="velocities" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedVelocity2D" rtc:name="Velocities" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedVelocity2D" rtcDoc:description="Velocities to move at."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="currentVelocities" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedVelocity2D" rtc:name="CurrentVelocities" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedVelocity2D" rtcDoc:description="Current velocities."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="velocityControl2DServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="VelocityControl2D" rtc:idlFile="Position.idl" rtc:varname="" rtc:instanceName="velocityControl2DServices" rtc:direction="Provided" rtc:name="velocityControl2DServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by a VelocityControl2D device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/VelocityControl3D.xml
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/VelocityControl3D.xml	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/VelocityControl3D.xml	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rtc:RtcProfile rtc:version="0.1" rtc:id="RTC:AIST.Hardware controller.VelocityControl3D:1.0.0" xmlns:rtcExt="http://www.openrtp.org/namespaces/rtc_ext" xmlns:rtcDoc="http://www.openrtp.org/namespaces/rtc_doc" xmlns:rtc="http://www.openrtp.org/namespaces/rtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <rtc:BasicInfo xsi:type="rtcExt:basic_info_ext" rtc:updateDate="2009-08-25T15:53:07.499+09:00" rtc:creationDate="2009-08-25T15:53:07.499+09:00" rtc:version="1.0.0" rtc:vendor="AIST" rtc:maxInstances="1" rtc:executionType="PeriodicExecutionContext" rtc:executionRate="1.0" rtc:description="Velocity control of a robot capable of moving along any of its three axes, as well as adjust its angle around any of its three axes." rtc:category="Hardware controller" rtc:componentKind="DataFlowComponent" rtc:activityType="PERIODIC" rtc:componentType="STATIC" rtc:name="VelocityControl3D"/>
+    <rtc:Actions>
+        <rtc:OnInitialize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnFinalize xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStartup xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnShutdown xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnActivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnDeactivated xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnAborting xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnError xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnReset xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnExecute xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnStateUpdate xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+        <rtc:OnRateChanged xsi:type="rtcDoc:action_status_doc" rtc:implemented="false"/>
+    </rtc:Actions>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="left" rtcExt:varname="velocities" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedVelocity3D" rtc:name="Velocities" rtc:portType="DataInPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedVelocity3D" rtcDoc:description="Velocities to move at."/>
+    </rtc:DataPorts>
+    <rtc:DataPorts xsi:type="rtcExt:dataport_ext" rtcExt:position="right" rtcExt:varname="currentVelocities" rtc:subscriprionType="" rtc:dataflowType="" rtc:interfaceType="" rtc:idlFile="" rtc:type="TimedVelocity3D" rtc:name="CurrentVelocities" rtc:portType="DataOutPort">
+        <rtcDoc:Doc rtcDoc:operation="" rtcDoc:occerrence="" rtcDoc:unit="" rtcDoc:semantics="" rtcDoc:number="" rtcDoc:type="TimedVelocity3D" rtcDoc:description="Current velocities."/>
+    </rtc:DataPorts>
+    <rtc:ServicePorts xsi:type="rtcExt:serviceport_ext" rtcExt:position="top" rtc:name="velocityControl3DServices">
+        <rtc:ServiceInterface xsi:type="rtcDoc:serviceinterface_doc" rtc:path="~/include/rtm/idl" rtc:type="VelocityControl3D" rtc:idlFile="Position.idl" rtc:varname="" rtc:instanceName="velocityControl3DServices" rtc:direction="Provided" rtc:name="velocityControl3DServices">
+            <rtcDoc:Doc rtcDoc:docPostCondition="" rtcDoc:docPreCondition="" rtcDoc:docException="" rtcDoc:docReturn="" rtcDoc:docArgument="" rtcDoc:description="Interface to the callbacks provided by a VelocityControl3D device."/>
+        </rtc:ServiceInterface>
+    </rtc:ServicePorts>
+</rtc:RtcProfile>

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/__init__.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/__init__.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/Templates/__init__.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1 @@
+# Empty file

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/TkJoyStickComp.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/TkJoyStickComp.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/TkJoyStickComp.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,128 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+import sys
+import time
+sys.path.append(".")
+
+# Import RTM module
+import RTC
+import OpenRTM_aist
+
+# for convert()
+import math
+
+# This module's spesification
+# <rtc-template block="module_spec">
+tkjoystick_spec = ["implementation_id", "TkJoyStick", 
+                   "type_name",         "TkJoyStick", 
+                   "description",       "Sample component for MobileRobotCanvas component", 
+                   "version",           "1.0", 
+                   "vendor",            "Noriaki Ando and Shinji Kurihara", 
+                   "category",          "example", 
+                   "activity_type",     "DataFlowComponent", 
+                   "max_instance",      "10", 
+                   "language",          "Python", 
+                   "lang_type",         "SCRIPT",
+                   ""]
+# </rtc-template>
+
+import tkjoystick
+
+class Position:
+  def __init__(self, x = 0.0, y = 0.0, r = 0.0, th = 0.0):
+    self.x = x
+    self.y = y
+    self.r = r
+    self.th = th
+
+position = Position()
+#tkJoyCanvas = tkjoystick.TkJoystick()
+
+
+class TkJoyStick(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+
+    self._k = 1.0
+    self.x = 0.0
+    self.y = 0.0
+
+     
+  def onInitialize(self):
+    self._d_pos = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._posOut = OpenRTM_aist.OutPort("pos", self._d_pos)
+    self._d_vel = RTC.TimedFloatSeq(RTC.Time(0,0),[])
+    self._velOut = OpenRTM_aist.OutPort("vel", self._d_vel)
+    
+    # Set OutPort buffers
+    self.addOutPort("pos",self._posOut)
+    self.addOutPort("vel",self._velOut)
+    
+    return RTC.RTC_OK
+
+
+  def onShutdown(self, ec_id):
+    return RTC.RTC_OK
+
+
+  def onExecute(self, ec_id):
+    self._d_pos.data = [self.x, self.y]
+    self._d_vel.data = self.convert(self.x, self.y)
+    self._posOut.write()
+    self._velOut.write()
+    
+    return RTC.RTC_OK
+
+  """
+   \brief Converting from canvas data to MobileRobotCanvas data
+  """
+  def convert(self, x, y):
+    _th = math.atan2(y,x)
+    _v = self._k * math.hypot(x, y)
+    _vl = _v * math.cos(_th - (math.pi/4.0))
+    _vr = _v * math.sin(_th - (math.pi/4.0))
+    print(x, y, _vl, _vr)
+    return [_vl, _vr]
+
+  def set_pos(self, pos, pol):
+    self.x = pos[0]
+    self.y = pos[1]
+    self.r = pol[0]
+    self.th = pol[1]
+
+
+
+#def MyModuleInit(manager):
+#    profile = OpenRTM_aist.Properties(defaults_str=tkjoystick_spec)
+#    manager.registerFactory(profile,
+#                            TkJoyStick,
+#                            OpenRTM_aist.Delete)
+#
+#    # Create a component
+#    comp = manager.createComponent("TkJoyStick")
+
+
+
+def main():
+  tkJoyCanvas = tkjoystick.TkJoystick()
+  tkJoyCanvas.master.title("TkJoystick")
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+  mgr.activateManager()
+
+  # Register component
+  profile = OpenRTM_aist.Properties(defaults_str=tkjoystick_spec)
+  mgr.registerFactory(profile,
+                      TkJoyStick,
+                      OpenRTM_aist.Delete)
+  # Create a component
+  comp = mgr.createComponent("TkJoyStick")
+
+  tkJoyCanvas.set_on_update(comp.set_pos)
+  mgr.runManager(True)
+  tkJoyCanvas.mainloop()
+
+if __name__ == "__main__":
+  main()
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/__init__.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/__init__.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/__init__.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1 @@
+# Empty file

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/gen.sh
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/gen.sh	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/gen.sh	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+python ${PYTHONPATH}/OpenRTM_aist/utils/rtc-template/rtc-template.py -bpython \
+    --module-name=TkJoyStick --module-type='DataFlowComponent' \
+    --module-desc='Sample component for MobileRobotCanvas component' \
+    --module-version=1.0 --module-vendor='Noriaki Ando and Shinji Kurihara' \
+    --module-category=example \
+    --module-comp-type=DataFlowComponent --module-act-type=SPORADIC \
+    --module-max-inst=10 \
+    --outport=pos:TimedFloatSeq \
+    --outport=vel:TimedFloatSeq
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/rtc.conf
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/rtc.conf	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/rtc.conf	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,3 @@
+corba.nameservers: localhost
+naming.formats: %n.rtc
+logger.enable: NO

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/tkjoystick.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/tkjoystick.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkJoyStick/tkjoystick.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,541 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+
+#
+# @brief tk joystick
+# @date $Date$
+# @author Norkai Ando <n-ando at aist.go.jp>
+#
+# Copyright (C) 2007
+#     Noriaki Ando
+#     Task-intelligence Research Group,
+#     Intelligent Systems Research Institute,
+#     National Institute of
+#         Advanced Industrial Science and Technology (AIST), Japan
+#     All rights reserved.
+#
+# $Id$
+#
+
+# $Log$
+#
+
+from Tkinter import *
+import time
+import math
+import mutex
+import sys
+
+class ToggleItem:
+    def __init__(self):
+        self.active = True
+
+    def activate(self):
+        self.active = True
+        self.draw()
+
+    def deactivate(self):
+        self.active = False
+        self.delete()
+
+    def toggle(self):
+        if self.active:
+            self.deactivate()
+        else:
+            self.activate()
+
+
+class CanvasText(ToggleItem):
+    def __init__(self, canvas, text, x, y):
+        ToggleItem.__init__(self)
+        self.canvas = canvas
+        self.id = self.canvas.create_text(x, y, text=text)
+        self.text = text
+        self.x = x
+        self.y = y
+        self.draw_text(x, y, text)
+
+    def draw(self):
+        if self.active == False: return
+        self.delete()
+        self.id = self.canvas.create_text(self.x, self.y, text=self.text)
+
+    def draw_text(self, x, y, text):
+        self.x = x
+        self.y = y
+        self.text = text
+        self.draw()
+
+    def delete(self):
+        self.canvas.delete(self.id)
+
+
+class CanvasAxis(ToggleItem):
+    def __init__(self, canvas, width, height):
+        ToggleItem.__init__(self)
+        self.x0 = width/2
+        self.y0 = height/2
+        self.width = width
+        self.height = height
+        self.canvas = canvas
+        self.id = [None] * 4
+        self.draw()
+
+    def draw(self):
+        if self.active == False: return
+        self.delete()
+        self.id[0] = self.canvas.create_line(0, self.height/2, 
+                                             self.width, self.height/2)
+        self.id[1] = self.canvas.create_text(self.width - 10,
+                                             self.height/2 + 10,
+                                             text="x")
+        self.id[2] = self.canvas.create_line(self.width/2, 0, 
+                                             self.width/2, self.height)
+        self.id[3] = self.canvas.create_text(self.width/2 + 10,
+                                             + 10, text="y")
+        return
+
+    def delete(self):
+        for i in self.id:
+            self.canvas.delete(i)
+
+class CanvasCircle(ToggleItem):
+    def __init__(self, canvas, x, y, width, height, pitch):
+        ToggleItem.__init__(self)
+        self.canvas = canvas
+        self.x = x
+        self.y = y
+        self.width = width
+        self.height = height
+        self.pitch = pitch
+        self.id = []
+        self.draw()
+
+    def draw(self):
+        if self.active == False: return
+        self.delete()
+        if self.pitch == 0:
+            circnum = 0
+        else:
+            circnum = max(self.width, self.height) / self.pitch
+        circrange = range(int(circnum))
+        circrange.reverse()
+        for i in circrange:
+            x0 = self.x - self.pitch * i
+            y0 = self.y - self.pitch * i
+            x1 = self.x + self.pitch * i
+            y1 = self.y + self.pitch * i
+            if i % 2 == 0:
+                color = "#dddddd"
+            else:
+                color = "#eeeeee"
+            id = self.canvas.create_oval(x0, y0, x1, y1, fill=color,
+                                              outline="#ffffff")
+            self.id.append(id)
+        id = self.id
+        id.reverse()
+        for i in id:
+            self.canvas.tag_lower(i)
+
+    def delete(self):
+        for c in self.id:
+            self.canvas.delete(c)
+
+    def set_pitch(self, pitch):
+        self.pitch = pitch
+        self.draw()
+
+class CanvasLine(ToggleItem):
+    def __init__(self, canvas, x0, y0, x1, y1, color, width):
+        ToggleItem.__init__(self)
+        self.canvas = canvas
+        self.x0 = x0
+        self.y0 = y0
+        self.x1 = y1
+        self.y1 = y1
+        self.color = color
+        self.width = width
+        self.id = self.canvas.create_line(self.x0, self.y0, self.x1, self.y1,
+                                          fill=self.color, width=self.width)
+        self.draw()
+
+    def draw(self):
+        if self.active == False: return
+        self.delete()
+        self.id = self.canvas.create_line(self.x0, self.y0, self.x1, self.y1,
+                                          fill=self.color, width=self.width)
+    def draw_line(self, x0, y0, x1, y1):
+        self.x0 = x0
+        self.y0 = y0
+        self.x1 = x1
+        self.y1 = y1
+        self.draw()
+
+    def delete(self):
+        self.canvas.delete(self.id)
+
+class Stick:
+    def __init__(self, canvas, x, y, r, **key):
+        self.canvas = canvas
+        # Joystick ID
+        self.key = key
+        self.id = self.canvas.create_oval(x-r, y-r, x+r, y+r, **key)
+        # ID of the line from center to joystick handle
+        self.line = None
+        # (x,y) text ID
+        self.xy_text = None
+        # (r,th) text ID
+        self.pol_text = None
+
+        # Offset from display coordinate system to joystick coordinate
+        # system
+        self.offsetx = x
+        self.offsety = y
+
+        # Position of the joystick in the display joystick coordinate
+        # system
+        self.x = 0
+        self.y = 0
+
+        # Position of the jpystick in the jpystick coordinate system
+        self.pos_x = 0
+        self.pos_y = 0
+
+        self.coffx = 0
+        self.coffy = 0
+
+        # Binding to joystick
+        self.make_binds()
+
+    def set_on_drag_start(self, func):
+        self.on_drag_start = func
+
+    def set_on_dragging(self, func):
+        self.on_dragging = func
+
+    def set_on_drag_end(self, func):
+        self.on_drag_end = func
+
+    def make_binds(self):
+        self.canvas.tag_bind(self.id, '<1>', self.drag_start)
+        self.canvas.tag_bind(self.id, '<Button1-Motion>', self.dragging)
+        self.canvas.tag_bind(self.id, '<Button1-ButtonRelease>', self.drag_end)
+        
+    def drag_start(self, event):
+        # Calculate offset on the clocked position
+        x1 = event.x - self.offsetx
+        y1 = event.y - self.offsety
+        self.coffx = x1 - self.x
+        self.coffy = y1 - self.y
+
+        self.calc_pol(self.pos_x, self.pos_y)
+#        self.draw_text()
+
+        # Callback
+        if self.on_drag_start != None:
+            self.on_drag_start((self.pos_x, self.pos_y), (self.r, self.th))
+        
+    def dragging(self, event):
+        # Moving length of drag
+        x1 = event.x - self.offsetx
+        y1 = event.y - self.offsety
+        dx = (x1 - self.x) - self.coffx
+        dy = (y1 - self.y) - self.coffy
+
+        # Moving circle
+        self.canvas.move(self.id, dx, dy)
+        self.canvas.tag_raise(self.id)
+        # Calculate joystick position
+        self.x = x1 - self.coffx
+        self.y = y1 - self.coffy
+        self.pos_x = self.x
+        self.pos_y = -self.y 
+        self.calc_pol(self.pos_x, self.pos_y)
+
+        # Callback
+        if self.on_dragging != None:
+            self.on_dragging((self.pos_x, self.pos_y), (self.r, self.th))
+
+    def drag_end(self, event):
+        x1 = event.x - self.offsetx
+        y1 = event.y - self.offsety
+        # Moving length to return back
+        dx = x1 - self.coffx
+        dy = y1 - self.coffy
+        self.canvas.move(self.id, -dx, -dy)
+        self.x = 0
+        self.y = 0
+        self.pos_x = 0
+        self.pos_y = 0
+        self.calc_pol(self.pos_x, self.pos_y)
+        # Callback
+        if self.on_drag_end != None:
+            self.on_drag_end((self.pos_x, self.pos_y), (self.r, self.th))
+
+    def calc_pol(self, x, y):
+        r = math.hypot(x, y)
+        if r == 0:
+            th = 720.0
+        elif y >= 0.0:
+            th = math.acos((x * 1.0) / (r * 1.0)) * 180.0 / math.pi
+        elif y < 0.0:
+            th = math.acos((x * 1.0) / (r * 1.0)) * -180.0 / math.pi
+        self.r = r
+        self.th = th
+        return (r, th)
+
+    def get_pos(self):
+        return self.pos_x, self.pos_y, self.r, self.th
+
+
+class TkJoystick(Frame):
+    def __init__(self, r=10, width=300, height=300, master=None):
+        Frame.__init__(self, master)
+
+        self.pos_x = 0.0
+        self.pos_y = 0.0
+        self.pol_r = 0.0
+        self.pol_th = 0.0
+
+        self.stick_r = r
+
+        self.width = width
+        self.height = height
+
+        self.wd = 160
+
+        self.x0 = width/2
+        self.y0 = height/2
+
+        self.xentry = ""
+        self.yentry = ""
+        self.rentry = ""
+        self.thentry = ""
+
+        # scale variable
+        self.scale_var = DoubleVar()
+        self.scale_var.set(1.0)
+
+        # checkbutton variables
+        self.vline_check = StringVar()
+        self.vline_check.set("on")
+        self.axis_check = StringVar()
+        self.axis_check.set("on")
+        self.circ_check = StringVar()
+        self.circ_check.set("on")
+        self.xy_check = StringVar()
+        self.xy_check.set("on")
+        self.pol_check = StringVar()
+        self.pol_check.set("on")
+
+        # x-y entry variables
+        self.xentry = StringVar()
+        self.xentry.set("0.0")
+        self.yentry = StringVar()
+        self.yentry.set("0.0")
+
+        # polarpos entry variables
+        self.rentry = StringVar()
+        self.rentry.set("0.0")
+        self.thentry = StringVar()
+        self.thentry.set("0.0")
+
+        # text position
+        self.xytext_x = self.width - 50
+        self.xytext_y = self.height - 25
+        self.poltext_x = self.width - 60
+        self.poltext_y = self.height - 10
+
+        # vector line
+        self.vline_color = "#aaaaaa"
+        self.vline_width = 2
+        self.default_pitch = 50
+
+        # callback function
+        self.on_update = None
+
+        self.init()
+        self.pack()
+
+
+    def init(self):
+        self.canvas = Canvas(self, bg="white", \
+                                 width = self.width, height = self.height)
+        self.canvas.pack(side=LEFT)
+
+        # coaxial pattern
+        self.can_circle = CanvasCircle(self.canvas, 
+                                   self.x0, self.y0,
+                                   self.width, self.height, pitch=50)
+
+        # axis
+        self.can_axis = CanvasAxis(self.canvas, self.width, self.height)
+
+        # x-y text
+        text = 'x: %4d, y: %4d' % (0, 0)
+        self.can_xytext = CanvasText(self.canvas, text,
+                                     self.xytext_x, self.xytext_y)
+
+        # polar position text
+        text = 'r: %4.2f, th: NaN' % (0.0)
+        self.can_poltext = CanvasText(self.canvas, text,
+                                      self.poltext_x, self.poltext_y)
+                           
+        self.can_vline = CanvasLine(self.canvas, self.x0, self.y0,
+                                    self.x0, self.y0,
+                                    self.vline_color, self.vline_width)
+
+        # joystick circle
+        self.stick = Stick(self.canvas, self.width/2, self.height/2,
+                           self.stick_r,
+                           fill="#999999", width=1)
+        self.stick.set_on_drag_start(self.on_pos_update)
+        self.stick.set_on_dragging(self.on_pos_update)
+        self.stick.set_on_drag_end(self.on_pos_update)
+
+
+        # right side widgets
+        self.frame = Frame(self, height=self.height, width=self.wd)
+        self.frame.pack(side=LEFT, fill=Y, padx=3, pady=3)
+        self.create_scale(self.frame).pack(side=TOP, fill=Y)
+        self.create_checkbutton(self.frame).pack(side=TOP, fill=Y)
+        self.create_pollabel(self.frame).pack(side=BOTTOM, fill=Y)
+        self.create_xylabel(self.frame).pack(side=BOTTOM, fill=Y)
+        return
+
+    def create_scale(self, frame):
+        f = Frame(frame, bd=2, relief=GROOVE)
+        dummy = Frame(f, width=self.wd)
+        dummy.pack(side=TOP)
+        sl = Scale(f, from_=0, to=10, resolution=0.01,
+                   label="Scale Factor", command=self.on_scale,
+                   variable=self.scale_var, orient=HORIZONTAL)
+        bt = Button(f, text="Reset Scale", command=self.reset_scale)
+        sl.pack(side=TOP, fill=X)
+        bt.pack(side=TOP, fill=X)
+        return f
+
+    def on_scale(self, val):
+        v =  float(val)
+        if v == 0.0:
+            pitch = 0
+        else:
+            pitch = self.default_pitch/v
+        self.can_circle.set_pitch(pitch)
+
+    def create_checkbutton(self, frame):
+        f = Frame(frame, bd=2, relief=GROOVE)
+        dummy = Frame(f, width=self.wd)
+        dummy.pack(side=TOP)
+        vec = Checkbutton(f, text="Vector Line",
+                           onvalue="on", offvalue="off",
+                           justify=LEFT, anchor=W,
+                           variable=self.vline_check,
+                           command=self.can_vline.toggle)
+        axis = Checkbutton(f, text="Axis",
+                           onvalue="on", offvalue="off",
+                           justify=LEFT, anchor=W,
+                           variable=self.axis_check,
+                           command=self.can_axis.toggle)
+        circ = Checkbutton(f, text="Background",
+                           onvalue="on", offvalue="off",
+                           justify=LEFT, anchor=W,
+                           variable=self.circ_check,
+                           command=self.can_circle.toggle)
+        xy   = Checkbutton(f, text="X-Y position", 
+                           onvalue="on", offvalue="off",
+                           justify=LEFT, anchor=W,
+                           variable=self.xy_check,
+                           command=self.can_xytext.toggle)
+        pol  = Checkbutton(f, text="Polar postion",
+                           onvalue="on", offvalue="off",
+                           justify=LEFT, anchor=W,
+                           variable=self.pol_check,
+                           command=self.can_poltext.toggle)
+        for w in [vec, axis, circ, xy, pol]:
+            w.pack(side=TOP, anchor=W, fill=X)
+        return f
+
+    def create_xylabel(self, frame):
+        f = Frame(frame)
+        dummy = Frame(f, width=self.wd)
+        dummy.pack(side=TOP)
+        xl = Label(f, text="x: ", width=3)
+        xe = Entry(f, width=7, textvariable=self.xentry,
+                   justify=RIGHT, relief=GROOVE)
+        yl = Label(f, text="y: ", width=3)
+        ye = Entry(f, width=7, textvariable=self.yentry,
+                   justify=RIGHT, relief=GROOVE)
+
+        for w in [ye, yl, xe, xl]:
+            w.pack(side=RIGHT, fill=X)
+        return f
+
+    def create_pollabel(self, frame):
+        f = Frame(frame, width=self.wd)
+        dummy = Frame(f, width=self.wd)
+        dummy.pack(side=TOP)
+        rl = Label(f, text="r: ", width=3)
+        re = Entry(f, width=7, textvariable=self.rentry,
+                   justify=RIGHT, relief=GROOVE)
+        thl = Label(f, text="th:", width=3)
+        the = Entry(f, width=7, textvariable=self.thentry,
+                    justify=RIGHT, relief=GROOVE)
+        for w in [the, thl, re, rl]:
+            w.pack(side=RIGHT, fill=X)
+        return f
+
+    def reset_scale(self):
+        self.scale_var.set(1.)
+        pitch = self.default_pitch/1.0
+        self.can_circle.set_pitch(pitch)
+        
+    def get_pos(self):
+        return self.pos_x, self.pos_y, self.pol_r, self.pol_th
+
+    def on_pos_update(self, pos, pol):
+        self.pos_x = pos[0] * self.scale_var.get()
+        self.pos_y = pos[1] * self.scale_var.get()
+        self.pol_r = pol[0] * self.scale_var.get()
+        self.pol_th = pol[1]
+
+        xt = '%4d' % (self.pos_x)
+        yt = '%4d' % (self.pos_y)
+        rt = '%5.2f' % (self.pol_r)
+        if pol[1] > 360: tht = 'NaN'
+        else: tht = '%5.2f' % self.pol_th
+
+        self.xentry.set(xt)
+        self.yentry.set(yt)
+        self.rentry.set(rt)
+        self.thentry.set(tht)
+
+        text = 'x: %4d, y: %4d' % (pos[0], pos[1])
+        self.can_xytext.draw_text(self.xytext_x, self.xytext_y, text)
+        if pol[1] > 360:
+            text = 'r: %5.2f, th: NaN' % (pol[0])
+        else:
+            text = 'r: %5.2f, th: %5.2f' % (pol[0], pol[1])
+        self.can_poltext.draw_text(self.poltext_x, self.poltext_y, text)
+
+        self.can_vline.draw_line(self.x0, self.y0,
+                                 self.x0 + pos[0],
+                                 self.y0 - pos[1])
+
+        if self.on_update != None:
+            self.on_update((self.pos_x, self.pos_y),
+                           (self.pol_r, self.pol_th))
+
+    def set_on_update(self, func):
+        self.on_update = func
+
+def test ():
+    m = TkJoystick()
+
+    while 1:
+        m.update()
+        print(m.get_pos())
+
+
+if  __name__ == '__main__': test()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkLRFViewer/TkLRFViewer.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkLRFViewer/TkLRFViewer.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkLRFViewer/TkLRFViewer.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,712 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# -*- Python -*-
+#
+# @brief LRFViewer component
+# @date $Date$
+# @author Norkai Ando <n-ando at aist.go.jp>
+#
+# Copyright (C) 2008
+#     Noriaki Ando
+#     Task-intelligence Research Group,
+#     Intelligent Systems Research Institute,
+#     National Institute of
+#         Advanced Industrial Science and Technology (AIST), Japan
+#     All rights reserved.
+#
+# $Id$
+#
+
+# $Log$
+#
+
+from Tix import *
+import time
+import math
+
+# Import RTM module
+import RTC
+import OpenRTM_aist
+# This module's spesification
+# <rtc-template block="module_spec">
+lrfviewer_spec = ["implementation_id",     "LRFViewer", 
+                  "type_name",         "LRFViewer", 
+                  "description",       "Laser Range Finder Viewer component", 
+                  "version",           "1.0", 
+                  "vendor",            "Noriaki Ando, AIST", 
+                  "category",          "example", 
+                  "activity_type",     "DataFlowComponent", 
+                  "max_instance",      "1", 
+                  "language",          "Python", 
+                  "lang_type",         "SCRIPT",
+                  ""]
+# </rtc-template>
+
+
+#------------------------------------------------------------
+# LRFViewer component
+#
+#------------------------------------------------------------
+class LRFViewer(OpenRTM_aist.DataFlowComponentBase):
+  def __init__(self, manager):
+    OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
+
+    self.range_data = []
+    self.start_point = 0
+    self.end_point   = 768
+    self.angular_res = 0.0
+    return
+
+  def onInitialize(self):
+    _pose3D = RTC.Pose3D(RTC.Point3D(0.0, 0.0, 0.0),
+                         RTC.Orientation3D(0.0, 0.0, 0.0))
+    _size3D = RTC.Size3D(0.0, 0.0, 0.0)
+    _geometry3D = RTC.Geometry3D(_pose3D, _size3D)
+    _rangerConfig = RTC.RangerConfig(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
+    self._d_rangeData = RTC.RangeData(RTC.Time(0,0),
+                                      [],
+                                      RTC.RangerGeometry(_geometry3D, []),
+                                      _rangerConfig)
+
+    self._rangeDataIn = OpenRTM_aist.InPort("range_data", self._d_rangeData)
+    self.addInPort("range_data",  self._rangeDataIn)
+
+    return RTC.RTC_OK
+
+  def onShutdown(self, ec_id):
+    return RTC.RTC_OK
+
+  def onDeactivated(self, ec_id):
+    self.range_data = []
+    self.start_point = 0
+    self.end_point = 768
+    return RTC.RTC_OK
+
+  def onExecute(self, ec_id):
+    if self._rangeDataIn.isNew():
+      _rangeData = self._rangeDataIn.read()
+      self.range_data = _rangeData.ranges
+      self.start_point = _rangeData.config.minAngle
+      self.end_point = _rangeData.config.maxAngle
+      self.angular_res = _rangeData.config.angularRes
+    time.sleep(0.01)
+    return RTC.RTC_OK
+
+  def get_range_data(self):
+    return self.range_data
+
+  def get_start_point(self):
+    return self.start_point
+
+  def get_end_point(self):
+    return self.end_point
+
+  def get_angular_res(self):
+    return self.angular_res
+
+
+class ToggleItem:
+  def __init__(self):
+    self.active = True
+    return
+
+  def __del__(self):
+    self.delete()
+    return
+
+  def activate(self):
+    self.active = True
+    self.draw()
+    return
+
+  def deactivate(self):
+    self.active = False
+    self.delete()
+    return
+
+  def toggle(self):
+    if self.active:
+      self.deactivate()
+    else:
+      self.activate()
+    return
+
+
+class CanvasText(ToggleItem):
+  def __init__(self, canvas, text, x, y):
+    ToggleItem.__init__(self)
+    self.canvas = canvas
+    self.id = self.canvas.create_text(x, y, text=text)
+    self.text = text
+    self.x = x
+    self.y = y
+    self.draw_text(x, y, text)
+    return
+
+  def draw(self):
+    if self.active == False: return
+    self.delete()
+    self.id = self.canvas.create_text(self.x, self.y, text=self.text)
+    return
+
+  def draw_text(self, x, y, text):
+    self.x = x
+    self.y = y
+    self.text = text
+    self.draw()
+    return
+
+  def delete(self):
+    self.canvas.delete(self.id)
+    return
+
+class CanvasGrid(ToggleItem):
+  def __init__(self, canvas, x0, y0, width, height, pitch, color, linewd):
+    ToggleItem.__init__(self)
+    self.canvas = canvas
+    self.x0 = x0
+    self.y0 = y0
+    self.width = width
+    self.height = height
+    self.pitch = pitch
+    self.color = color
+    self.linewd = linewd
+    self.idx = []
+    self.idy = []
+
+    self.draw()
+    return
+
+  def draw(self):
+    if self.active == False: return
+    self.delete()
+    
+    x_start = int(self.x0 % self.pitch)
+    x_num   = int((self.width - x_start) / self.pitch) + 1
+    for x in range(x_num):
+      x0 = x_start + self.pitch * x
+      id = self.canvas.create_line(x0, 0, x0, self.height,
+                                   fill=self.color, width=self.linewd)
+      self.idx.append(id)
+
+    y_start = int(self.y0 % self.pitch)
+    y_num   = int((self.height - y_start) / self.pitch) + 1
+    for y in range(y_num):
+      y0 = y_start + self.pitch * y
+      id = self.canvas.create_line(0, y0, self.width, y0,
+                                   fill=self.color, width=self.linewd)
+      self.idy.append(id)
+
+    for i in self.idx:
+      self.canvas.tag_lower(i)
+    for i in self.idy:
+      self.canvas.tag_lower(i)
+
+    return
+
+  def delete(self):
+    for i in self.idx:
+      self.canvas.delete(i)
+    for i in self.idy:
+      self.canvas.delete(i)
+    return
+
+  def set_pitch(self, pitch):
+    if pitch != 0:
+      self.pitch = pitch
+
+    self.draw()
+    return
+
+
+class CanvasAxis(ToggleItem):
+  def __init__(self, canvas, width, height, color="#ffffff", linewd=1):
+    ToggleItem.__init__(self)
+    self.x0 = width/2
+    self.y0 = height/2
+    self.width = width
+    self.height = height
+    self.color = color
+    self.linewd = linewd
+    self.canvas = canvas
+    self.id = [None] * 4
+    self.draw()
+    return
+
+  def draw(self):
+    if self.active == False: return
+    self.delete()
+    self.id[0] = self.canvas.create_line(0, self.height/2, 
+                                         self.width, self.height/2,
+                                         fill = self.color,
+                                         width = self.linewd)
+    self.id[1] = self.canvas.create_text(self.width - 10,
+                                         self.height/2 + 10,
+                                         text="x",
+                                         fill = self.color,
+                                         font="courier 12")
+    self.id[2] = self.canvas.create_line(self.width/2, 0, 
+                                         self.width/2, self.height,
+                                         fill = self.color,
+                                         width = self.linewd)
+    self.id[3] = self.canvas.create_text(self.width/2 + 10,
+                                         + 10, text="y",
+                                         fill = self.color,
+                                         font="courier 12")
+        
+    return
+
+  def delete(self):
+    for i in self.id:
+      self.canvas.delete(i)
+    return
+
+
+class ScaledObject:
+  def __init__(self, simulator):
+    self.simulator = simulator
+    self.tick = simulator.get_tick()
+    self.canvas = simulator.get_canvas()
+    self.trans = simulator.get_translation()
+    return
+
+  def translate(self, x, y, dx, dy, dth):
+    return self.trans(x, y, dx, dy, dth)
+
+  def get_tick(self):
+    return self.simulator.get_tick()
+
+
+#------------------------------------------------------------
+# LRFrange range data drawing
+#
+#------------------------------------------------------------
+class LRFrange(ScaledObject):
+  def __init__(self, simulator,
+               line_color="#ff0000", fill_color="#ff0000", linewd=1):
+    ScaledObject.__init__(self, simulator)
+    self.fill_color = fill_color
+    self.line_color = line_color
+    self.default_fill_color = fill_color
+    self.default_line_color = line_color
+    self.linewd = linewd
+    self.rdata = []
+    self.pre_data = []
+    self.poly_id = None
+    self.source = None
+
+    # URG parameter
+    self.beg_angle = -45
+    self.end_angle = 225
+    self.angle_per_step = 360.0 / 1024.0
+    self.valid_beg_angle = 44 * 360.0 / 1024.0
+    self.valid_end_angle = self.valid_beg_angle + 725 * self.angle_per_step
+    self.offset_step = 0
+
+    self.threshold = 0.0
+    self.sfilter = 0.0
+    self.tfilter = 0.0
+
+    self.threshold_check = BooleanVar()
+    self.threshold_check.set(True)
+    self.tfilter_check = BooleanVar()
+    self.tfilter_check.set(True)
+    self.sfilter_check = BooleanVar()
+    self.sfilter_check.set(True)
+
+    self.threshold_var = DoubleVar()
+    self.threshold_var.set(self.threshold)
+    self.tfilter_var = DoubleVar()
+    self.tfilter_var.set(self.tfilter)
+    self.sfilter_var = DoubleVar()
+    self.sfilter_var.set(self.sfilter)
+
+    self.update()
+    return
+
+  def create_ctrl(self, frame):
+    self.lrf_fill_check = StringVar()
+    self.lrf_fill_check.set("on")
+    self.lrf_line_check = StringVar()
+    self.lrf_line_check.set("on")
+
+    text = Label(frame, text="LRF range area", anchor=W, justify=LEFT)
+    # "Line" check box
+    line = Checkbutton(frame, text="Line",
+                       onvalue="on", offvalue="off",
+                       justify=LEFT, anchor=W,
+                       variable=self.lrf_line_check,
+                       command=self.line_toggle)
+    # "Fill" check box
+    fill = Checkbutton(frame, text="Fill",
+                       onvalue="on", offvalue="off",
+                       justify=LEFT, anchor=W,
+                       variable=self.lrf_fill_check,
+                       command=self.fill_toggle)
+    # Threshold (check box/scale)
+    thresh = Checkbutton(frame, text="Threshold",
+                         onvalue=True, offvalue=False,
+                         justify=LEFT, anchor=W,
+                         variable=self.threshold_check)
+    thresh_scale = Scale(frame, from_=0, to=100, resolution=0.1,
+                         label="Threshold", command=self.on_threshold,
+                         variable=self.threshold_var, orient=HORIZONTAL)
+    # Time-Filter (check box/scale)
+    tfilter = Checkbutton(frame, text="Filter(Time)",
+                          onvalue=True, offvalue=False,
+                          justify=LEFT, anchor=W,
+                          variable=self.tfilter_check)
+    tfilter_scale = Scale(frame, from_=0, to=1, resolution=0.01,
+                          label="Filter", command=self.on_tfilter,
+                          variable=self.tfilter_var, orient=HORIZONTAL)
+    # Spacial-Filter (check box/scale)
+    sfilter = Checkbutton(frame, text="Filter(Spacial)",
+                          onvalue=True, offvalue=False,
+                          justify=LEFT, anchor=W,
+                          variable=self.sfilter_check)
+    sfilter_scale = Scale(frame, from_=0, to=1, resolution=0.01,
+                          label="Filter", command=self.on_sfilter,
+                          variable=self.sfilter_var, orient=HORIZONTAL)
+
+    for w in [text, line, fill, thresh, thresh_scale,
+              tfilter, tfilter_scale, sfilter, sfilter_scale]:
+      w.pack(side=TOP, anchor=W, fill=X) 
+    return
+
+  def on_threshold(self, var):
+    self.threshold = self.threshold_var.get()
+    return
+
+  def on_sfilter(self, var):
+    self.sfilter = self.sfilter_var.get()
+    return
+
+  def on_tfilter(self, var):
+    self.tfilter = self.tfilter_var.get()
+    return
+
+  def line_toggle(self):
+    if self.lrf_line_check.get() == "on":
+      self.line_color = self.default_line_color
+    else:
+      self.line_color = ""
+    return
+
+  def fill_toggle(self):
+    if self.lrf_fill_check.get() == "on":
+      self.fill_color = self.default_fill_color
+    else:
+      self.fill_color = ""
+    return
+
+  def set_data_source(self, source):
+    self.source = source
+    return
+
+  def set_value(self, data):
+    self.rdata = data
+    return
+
+  def draw(self):
+    self.delete()
+    rpos = []
+    rpos.append(self.translate(0, 0, 0, 0, 0))
+    rpos.append(self.range_to_pos(self.rdata))
+    self.poly_id = self.canvas.create_polygon(rpos,
+                                              width = self.linewd,
+                                              outline = self.line_color,
+                                              fill = self.fill_color,
+                                              smooth = 1,
+                                              splinesteps = 5)
+    return
+
+  def range_to_pos(self, data):
+    pos = []
+    pre_d = 0
+    
+    tfilter = self.tfilter_check.get()
+    sfilter = self.sfilter_check.get()
+    thresh  = self.threshold_check.get()
+
+    # Time-Filter
+    if tfilter and len(data) == len(self.pre_data):
+      for (n, d) in enumerate(data):
+        k_t = self.tfilter
+        data[n] = self.pre_data[n] * k_t + d * (1 - k_t)
+
+    # Spacial Filter
+    for (n, d) in enumerate(data):
+      # Threshold
+      if thresh and d < self.threshold:
+        d = 10000 #pre_d
+
+      if sfilter:
+        k_s = self.sfilter
+        d = pre_d * k_s + d * (1 - k_s)
+      pre_d = d
+            
+      # n: step number
+      # d: length data
+      #deg = (n + self.offset_step) * self.angle_per_step + self.beg_angle
+      #th = deg * math.pi / 180
+      th = (n + self.offset_step) * self.angle_per_step + self.beg_angle
+      x = d * math.cos(th)
+      y = d * math.sin(th)
+      pos.append(self.translate(x, y, 0, 0, 0))
+    self.pre_data = data
+    return pos
+
+  def delete(self):
+    if self.poly_id != None:
+      self.canvas.delete(self.poly_id)
+    return
+
+  def update(self):
+    if self.source != None:
+      rdata = self.source.get_range_data()
+      if len(rdata) != 0:
+        self.rdata = rdata
+
+      res = self.source.get_angular_res()
+      if res:
+        self.angle_per_step = res
+
+      beg_angle = self.source.get_start_point()
+      if beg_angle:
+        self.beg_angle = beg_angle
+
+      end_angle = self.source.get_end_point()
+      if end_angle:
+        self.end_angle = end_angle
+
+    else:
+      pass
+    self.draw()
+
+
+
+#------------------------------------------------------------
+# TkLRFViewer main windows class
+#
+#------------------------------------------------------------
+class TkLRFViewer(Frame):
+  def __init__(self, master=None, width=480, height=480):
+    Frame.__init__(self, master)
+
+    # canvas properties
+    self.width = width
+    self.height = height
+    # zero of canvas
+    self.x0 = width/2
+    self.y0 = height/2
+
+    self.wd = 150
+
+    self.robots = {}
+
+    self.robot = None
+    self.postext = None
+
+    self.scale = 1.0
+    self.scale_var = DoubleVar()
+    self.scale_var.set(self.scale)
+
+    self.grid_pitch = 50
+
+    self.tick = 0.1
+    self.default_tick = 0.1
+    self.tickscale_var = DoubleVar()
+    self.tickscale_var.set(self.tick)
+
+    self.axis_check = StringVar()
+    self.axis_check.set("on")
+    self.grid_check = StringVar()
+    self.grid_check.set("on")
+    self.rnames = {}
+
+
+    self.init()
+    self.pack()
+
+
+    self.after(20, self.on_update)
+    return
+
+  def init(self):
+    self.canvas = Canvas(self, bg="#000000",
+                         width = self.width, height = self.height)
+    self.canvas.pack(side=LEFT)
+
+    self.can_grid = CanvasGrid(self.canvas, self.x0, self.y0,
+                               self.width, self.height, self.grid_pitch,
+                               "#aaaaaa", 1)
+    self.can_axis = CanvasAxis(self.canvas, self.width, self.height,
+                               "#ffffff", 1)
+
+    self.frame = Frame(self)
+    self.frame.pack(side=LEFT)
+
+    # Screen control
+    self.scrctrl_frame = Frame(self.frame, width=self.wd, height=300,
+                               relief=GROOVE, bd=2)
+    self.scrctrl_frame.pack(side=TOP, fill=X)
+    self.create_scale(self.scrctrl_frame)
+    self.create_checkbutton(self.scrctrl_frame)
+
+
+    self.lrfctrl_frame = Frame(self.frame, width=self.wd, height=300,
+                               relief=GROOVE, bd=2)
+    self.lrfctrl_frame.pack(side=TOP, fill=X)
+    self.lrf = LRFrange(self)
+    self.lrf.create_ctrl(self.lrfctrl_frame)
+
+    return
+      
+
+
+  def on_update(self):
+    self.lrf.update()
+    self.after(20, self.on_update)
+    return
+
+  def get_tick(self):
+    return self.tick
+  
+  def get_canvas(self):
+    return self.canvas
+
+  def get_translation(self):
+    return self.real_to_canvas
+
+
+  #------------------------------------------------------------
+  # Scale control set
+  def create_scale(self, frame):
+    dummy = Frame(frame, width=self.wd)
+    dummy.pack(side=TOP)
+    sl = Scale(frame, from_=0, to=10, resolution=0.01,
+               label="Scale Factor", command=self.on_scale,
+               variable=self.scale_var, orient=HORIZONTAL)
+    bt = Button(frame, text="Reset Scale", command=self.reset_scale)
+    sl.pack(side=TOP, fill=X)
+    bt.pack(side=TOP, fill=X)
+    return
+
+  def on_scale(self, val):
+    v =  float(val)
+    if v == 0.0:
+      pitch = 0
+    else:
+      pitch = self.grid_pitch/v
+      self.scale = v
+    self.can_grid.set_pitch(pitch)
+    return
+        
+  def reset_scale(self):
+    self.scale_var.set(1.)
+    pitch = self.grid_pitch/1.0
+    self.scale = 1.0
+    self.can_grid.set_pitch(pitch)
+    return
+
+  def on_tickchange(self, val):
+    v =  self.tickscale_var.get()
+    if v == 0.0:
+      self.tick = 0
+    else:
+      self.tick = v
+    return
+        
+  def reset_tickscale(self):
+    self.tick = self.default_tick
+    self.tickscale_var.set(self.default_tick)
+
+  # end of Scale widget set
+  #------------------------------------------------------------
+
+  #------------------------------------------------------------
+  # Canvas control set
+  def create_checkbutton(self, frame):
+    axis = Checkbutton(frame, text="Axis",
+                       onvalue="on", offvalue="off",
+                       justify=LEFT, anchor=W,
+                       variable=self.axis_check,
+                       command=self.can_axis.toggle)
+    grid = Checkbutton(frame, text="Grid",
+                       onvalue="on", offvalue="off",
+                       justify=LEFT, anchor=W,
+                       variable=self.grid_check,
+                       command=self.can_grid.toggle)
+    for w in [axis, grid]:
+      w.pack(side=TOP, anchor=W, fill=X)
+
+  def on_rname_toggle(self):
+    for r in self.rnames.keys():
+      self.rnames[r].toggle()
+    return
+
+  # end of Canvas control set
+  #------------------------------------------------------------
+
+  #------------------------------------------------------------
+  # 
+  def real_to_canvas(self, x, y, dx, dy, dt):
+    # Simulator coordinate system -> display coordinate system
+    # x, y: original position
+    # dx, dy, dt: translation and rotation vector
+    # translation and rotation
+    x_tmp = (math.cos(dt) * x - math.sin(dt) * y + dx)/self.scale
+    y_tmp = (math.sin(dt) * x + math.cos(dt) * y + dy)/self.scale
+    # align to canvas coordinate system (origin is center and y+ is upward)
+    xo =  x_tmp  + self.x0
+    yo = -y_tmp + self.y0
+    return xo, yo
+
+import threading
+
+class test_data_creator(threading.Thread):
+  def __init__(self, lrf, step = 681):
+    threading.Thread.__init__(self)
+    import time
+    self.lrf = lrf
+    self.step = step
+    self.flag = True
+    return
+
+  def stop(self):
+    self.flag = False
+    return
+
+  def run(self):
+    import random
+    data = [0] * 681
+    pre = 0
+    while self.flag:
+      for i in range(681):
+        if i % 5 == 0:
+          data[i] = pre * 0.9 + random.randint(0, 255) * 0.1
+          pre = data[i]
+        else:
+          data[i] = pre
+          pre = data[i]
+      self.lrf.set_value(data)
+      time.sleep(0.1)
+    
+    return
+
+def main():
+  m = TkLRFViewer(Tk())
+  m.master.title("Laser Range Finder Viewer")
+
+  mgr = OpenRTM_aist.Manager.init(sys.argv)
+  mgr.activateManager()
+  profile = OpenRTM_aist.Properties(defaults_str=lrfviewer_spec)
+  mgr.registerFactory(profile, LRFViewer, OpenRTM_aist.Delete)
+  mgr.runManager(True)
+  lrf_rtc = mgr.createComponent("LRFViewer")
+  m.lrf.set_data_source(lrf_rtc)
+  m.mainloop()
+  mgr.shutdown()
+
+    
+if  __name__ == '__main__': main()

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkLRFViewer/__init__.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkLRFViewer/__init__.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkLRFViewer/__init__.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1 @@
+# Empty file

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkLRFViewer/rtc.conf
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkLRFViewer/rtc.conf	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/TkLRFViewer/rtc.conf	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,3 @@
+corba.nameservers: localhost
+naming.formats: %n.rtc
+logger.enable: NO
\ No newline at end of file

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/__init__.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/__init__.py	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/__init__.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1 @@
+# Empty file

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/component.conf
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/component.conf	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/component.conf	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,265 @@
+#============================================================
+# component profile
+#
+# implementation_id:
+# type_name:
+# description:
+# version:
+# vendor:
+# category:
+# activity_type:
+# max_instance:
+# language:
+# lang_type:
+#
+
+#============================================================
+# execution context options
+#============================================================
+#
+# Periodic type ExecutionContext
+#
+# Other availabilities in OpenRTM-aist
+#
+# - ExtTrigExecutionContext: External triggered EC. It is embedded in
+#                            OpenRTM library.
+# - OpenHRPExecutionContext: External triggred paralell execution
+#                            EC. It is embedded in OpenRTM
+#                            library. This is usually used with
+#                            OpenHRP3.
+# - RTPreemptEC:             Real-time execution context for Linux
+#                            RT-preemptive pathed kernel.
+# - ArtExecutionContext:     Real-time execution context for ARTLinux
+#                            (http://sourceforge.net/projects/art-linux/)
+# exec_cxt.periodic.type: [specify periodic type EC]
+
+#
+# The execution cycle of ExecutionContext
+#
+# exec_cxt.periodic.rate: [Hz]
+
+#
+# Event driven execution context (not implemented yet)
+#
+# exec_cxt.event_driven.type: [specify event driven type EC]
+#
+
+#
+# State transition mode settings YES/NO
+#
+# Default: YES (efault setting is recommended.)
+#
+# Activating, deactivating and resetting of RTC performs state
+# transition. Some execution contexts might execute main logic in
+# different thread. If these flags are set to YES, activation,
+# deactivation and resetting will be performed synchronously. In other
+# words, if these flags are YES,
+# activation/deactivation/resetting-operations must be returned after
+# state transition completed.
+#
+# "sync_transition" will set synchronous transition flags to all other
+# synchronous transition flags sync_activation/deactivation/reset.
+#
+# exec_cxt.sync_transition: YES
+# exec_cxt.sync_activation: YES
+# exec_cxt.sync_deactivation: YES
+# exec_cxt.sync_reset: YES
+
+#
+# Timeout of synchronous state transition [s]
+#
+# Default: 0.5 [s]
+#
+# When synchronous transition flags are set to YES, the following
+# timeout settings are valid. If "transition_timeout" is set, the
+# value will be set to all other timeout of activation/deactivation
+# and resetting
+#
+# exec_cxt.transition_timeout: 0.5
+# exec_cxt.activation_timeout: 0.5
+# exec_cxt.deactivation_timeout: 0.5
+# exec_cxt.reset_timeout: 0.5
+
+#
+# Specifying Execution Contexts
+#
+# Default: No default
+#
+# execution_contexts: None or <EC0>,<EC1>,...
+# <EC?>: ECtype(ECname)
+#
+# RTC can be attached with zero or more Execution
+# Contexts. "execution_contexts" option specifies RTC-specific
+# attached ECs and its name. If the option is not specified, the
+# internal global options or rtc.conf options related to EC will be
+# used. If None is specified, no EC will be created.
+#
+# Availabilities in OpenRTM-aist
+#
+# - ExtTrigExecutionContext: External triggered EC. It is embedded in
+#                            OpenRTM library.
+# - OpenHRPExecutionContext: External triggred paralell execution
+#                            EC. It is embedded in OpenRTM
+#                            library. This is usually used with
+#                            OpenHRP3.
+# - RTPreemptEC:             Real-time execution context for Linux
+#                            RT-preemptive pathed kernel.
+# - ArtExecutionContext:     Real-time execution context for ARTLinux
+#                            (http://sourceforge.net/projects/art-linux/)
+#
+# execution_contexts: PeriodicExecutionContext(pec1000Hz), \
+#                     PeriodicExecutionContext(pec500Hz)
+
+#
+# EC specific configurations
+#
+# Default: No default
+#
+# Each EC can have its own configuration. Individual configuration can
+# be specified by using EC type name or EC instance name. Attached ECs
+# would be specified in execution_context option like <EC type
+# name>(<EC instance name>), ...  EC specific option can be specified
+# as follows.
+#
+# ec.<EC type name>.<option>
+# ec.<EC instance name>.<option>
+#
+# Example:
+# ec.PeriodicExecutionContext.sync_transition: NO
+# ec.pec1000Hz.rate: 1000
+# ec.pec1000Hz.synch_transition: YES
+# ec.pec1000Hz.transition_timeout: 0.5
+# ec.pec500Hz.rate: 500
+# ec.pec500Hz.synch_activation: YES
+# ec.pec500Hz.synch_deactivation: NO
+# ec.pec500Hz.synch_reset: YES
+# ec.pec500Hz.activation_timeout: 0.5
+# ec.pec500Hz.reset_timeout: 0.5
+
+
+#============================================================
+# port configurations
+#
+# port.[port_name].[interface_name].type: [CORBA, Ice, others...]
+# port.[port_name].[interface_name].instance_name: [provider only]
+# port.[port_name].[interface_name].bind_to:       [consumer only]
+#
+
+#============================================================
+# data port configurations
+#
+# port.[port_name].dataport.interface_type: [corba_cdr, raw_tcp, etc..]
+# port.[port_name].dataport.dataflow_type: [push, pull]
+# port.[port_name].dataport.subscription_type: [flash, new, periodic]
+# port.[port_name].dataport.constraint: [constraint_specifier]
+# port.[port_name].dataport.fan_out: [number of connection, InPort only]
+# port.[port_name].dataport.fan_in: [number of connection, InPort only]
+
+# publisher property
+# port.[inport|outport].[port_name].publisher.push_rate: freq.
+# port.[inport|outport].[port_name].publisher.push_policy: [all, new, skip, fifo]
+# port.[inport|outport].[port_name].publisher.skip_count: [skip count]
+
+
+# port.[port_name].dataport.[interface_type].[iface_dependent_options]:
+#
+# CORBA Any type dependent options
+# port.[port_name].dataport.corba_any.inport_ref: read only
+# port.[port_name].dataport.corba_any.outport_ref: read only
+#
+# Raw TCP type dependent options
+# port.[port_name].dataport.raw_tcp.server_addr:
+
+#
+# port.[port_name].constraint: enable
+#
+# connector buffer configurations.
+# port.[inport|outport].[port_name].buffer.length: 8
+# port.[inport|outport].[port_name].buffer.write.full_policy: [overwrite, do_nothing, block]
+# port.[inport|outport].[port_name].buffer.write.timeout: 1.0
+# port.[inport|outport].[port_name].buffer.read.empty_policy: [readback, do_nothing, block]
+# port.[inport|outport].[port_name].buffer.read.timeout: 1.0
+#------------------------------------------------------------
+#
+#
+
+
+#============================================================
+# configuration parameters
+#
+# conf.[configuration_set_name].[parameter_name]:
+# conf.__widget__.[parameter_name]: GUI control type for RTSystemEditor
+# conf.__constraint__.[parameter_name]: Constraints for the value
+#
+#
+
+#------------------------------------------------------------
+# configuration sets
+#
+# conf.[configuration_set_name].[parameter_name]:
+
+#------------------------------------------------------------
+# GUI control option for RTSystemEditor
+#------------------------------------------------------------
+#
+# Available GUI control options [__widget__]:
+#
+# conf.__widget__.[widget_name]:
+#
+# available wdget name:
+# - text:          text box [default].
+# - slider.<step>: Horizontal slider. <step> is step for the slider.
+#                  A range constraints option is required. 
+# - spin:          Spin button. A range constraitns option is required.
+# - radio:         Radio button. An enumeration constraints is required.
+# - checkbox:      Checkbox control. An enumeration constraints is
+#                  required. The parameter has to be able to accept a
+#                  comma separated list.
+# - orderd_list:   Orderd list control.  An enumeration constraint is
+#                  required. The parameter has to be able to accept a
+#                  comma separated list. In this control, Enumerated
+#                  elements can appear one or more times in the given list.
+# examples:
+# conf.__widget__.int_param0: slider.10
+# conf.__widget__.int_param1: spin
+# conf.__widget__.double_param0: slider.10
+# conf.__widget__.double_param1: text
+# conf.__widget__.str_param0: radio
+# conf.__widget__.vector_param0: checkbox
+# conf.__widget__.vector_param1: orderd_list
+
+#
+# Available GUI control constraint options [__constraints__]:
+#
+# conf.__constraints__.[parameter_name]:
+#
+# available constraints:
+# - none:         blank
+# - direct value: 100 (constant value)
+# - range:        <, >, <=, >= can be used.
+# - enumeration:  (enum0, enum1, ...)
+# - array:        <constraints0>, ,constraints1>, ... for only array value
+# - hash:         {key0: value0, key1:, value0, ...}
+#
+# available constraint formats (substitute variable name: "x"):
+# - No constraint              : (blank)
+# - Direct                     : 100 (read only)
+# - 100 or over                : x >= 100
+# - 100 or less                : x <= 100
+# - Over 100                   : x > 100
+# - Less 100                   : x < 0
+# - 100 or over and 200 or less: 100 <= x <= 200
+# - Over 100 and less 200      : 100 < x < 200
+# - Enumeration                : (9600, 19200, 115200)
+# - Array                      : x < 1, x < 10, x > 100
+# - Hash                       : {key0: 100<x<200, key1: x>=100}
+#
+# examples:
+# conf.__constraints__.int_param0: 0<=x<=150
+# conf.__constraints__.int_param1: 0<=x<=1000
+# conf.__constraints__.double_param0: 0<=x<=100
+# conf.__constraints__.double_param1:
+# conf.__constraints__.str_param0: (default,mode0,mode1)
+# conf.__constraints__.vector_param0: (dog,monky,pheasant,cat)
+# conf.__constraints__.vector_param1: (pita,gora,switch)
+

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/rtc.conf.sample
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/rtc.conf.sample	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/rtc.conf.sample	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,460 @@
+#----------------------------------------------------------------------
+#
+# RT-Component manager configuration
+#
+# Copyright (c) 2003-2008 Noriaki Ando <n-ando at aist.go.jp>
+#      Task-intelligence Research Group,
+#      Intelligent Systems Research Institute,
+#      National Institute of
+#          Advanced Industrial Science and Technology (AIST), Japan
+#      All rights reserved.
+#
+# $Id: rtc.conf.sample 2312 2012-02-07 02:55:32Z n-ando $
+# 
+#----------------------------------------------------------------------
+
+#------------------------------------------------------------
+# Configuration version (optional) 
+#
+config.version: 1.0
+
+#------------------------------------------------------------
+# OpenRTM-aist version (optional)
+#
+openrtm.version: 1.0.0
+
+#------------------------------------------------------------
+# The name of manager (default = manager)
+#
+manager.name: manager
+
+#------------------------------------------------------------
+# Master manager
+# - manager.is_master: YES/NO, This process made a master or not.
+# - manager.corba_servant: YES/NO, create manager's corba service or not
+# - corba.master_manager: <host_name>:<port>, master manager's location
+manager.is_master: YES
+manager.corba_servant: YES
+corba.master_manager: localhost:2810
+
+#------------------------------------------------------------
+# Manager auto shutdown options
+# - manager.shutdown_on_nortcs: YES/NO, 
+#   process will be shutdown in case no rtc exists when rtc is deleted.
+# - manager.shutdown_auto:
+#   process will be shutdown in case no rtc exists on periodic check.
+manager.shutdown_on_nortcs: YES
+manager.shutdown_auto: YES
+manager.auto_shutdown_duration: 10.0
+
+#============================================================
+# CORBA configuration
+#============================================================
+#
+# CORBA ORB's arguments
+#
+# ORB specific command line options given to ORB_init().
+# See your ORB documentation.
+#
+# Example:
+#   corba.args: -ORBInitialHost myhost -ORBInitialPort 8888
+#
+#
+corba.args:
+
+#
+# ORB endpoint
+#
+# If you have two or more network interfaces, ORB endpoint address and/or
+# port have to be specified. If hostname or port number is abbreviated,
+# default interface or port number is used. At least one colon ':'
+# is needed when you specify this option.
+#
+# Examples:
+#   corba.endpoint: myhost:      (use myhost and default port)
+#   corba.endpoint: :9876        (use default addr and port 9876)
+#   corba.endpoint: myhost:9876  (use myhost and port 9876)
+#
+corba.endpoint:
+
+#
+# Multiple endpoint options (experimental)
+#
+# Multiple endpoint addresses and ports can be specified using this option.
+#
+# Example:
+#   corba.endpoints: 192.168.1.10:1111, 192.168.10.11:2222
+#   corba.endpoints: 192.168.1.10, 192.168.10.11
+#   corba.endpoints: all
+#
+corba.endpoints:
+
+
+#
+# CORBA name server setting
+#
+# Multiple name servers can be specified separating by comma.
+# If port number is abbreviated, default port number is used.
+# The default port number is depend on ORB implementation.
+#
+# Examples:
+#   corba.nameservers: openrtm.aist.go.jp:9876
+#   corba.nameservers: rtm0.aist.go.jp, rtm1.aist.go.jp, rtm2.aist.go.jp
+#
+corba.nameservers: localhost
+
+#
+# IOR host address replacement by guessed endpoint from routing (experimental)
+#
+# This option replaces a host address with an endpoint that is guessed
+# by route information to nameserver's address. This option may be
+# effective for CORBA implementation that does not supports IOR's
+# multiple profile or alternate IIOP address. However, since other
+# object references that are obtained from RT-Components or other are
+# not modified by this rule, other RTCs that are connected to this RTC
+# have to also support IOR multiple profile feature.  When this option
+# is used, corba.endpoints option should also be specified with
+# multiple endpoints.
+#
+corba.nameservice.replace_endpoint: NO
+
+#
+# IOR alternate IIOP addresses
+#
+# This option adds alternate IIOP addresses into the IOR Profiles.
+# IOR can include additional endpoints for a servant. It is almost
+# same as "corba.endpoints" option, but this option does not create
+# actual endpoint on the ORB. (corba.endpoints try to create actual
+# endpoint, and if it cannot be created, error will be returned.)
+# This option just add alternate IIOP endpoint address information to
+# an IOR.
+#
+# This option can be used when RTCs are located inside of NAT or
+# router.  Generally speaking, RTCs in a private network cannot
+# connect to RTCs in the global network, because global client cannot
+# reach to private servants. However, if route (or NAT) is properly
+# configured for port forwarding, global RTCs can reach to RTCs in
+# private network.
+#
+# A setting example is as follows.
+# 1) Configure your router properly for port-forwarding.
+#    ex. global 2810 port is forwarded to private 2810
+# 2) Set the following options in rtc.conf
+#  corba.nameservers: my.global.nameserver.com <- name server in global network
+#  corba.endpoints: :2810 <- actual port number
+#  corba.additional_ior_addresses: w.x.y.z:2810 <- routers global IP addr/port
+# 3) Launch global RTCs and private RTC, and connect them.
+#
+corba.alternate_iiop_addresses: addr:port
+
+#============================================================
+# Naming configurations
+#============================================================
+#
+# Enable/Disable naming functions
+#
+naming.enable: YES
+
+#
+# Naming Types
+#
+# Now only "corba" is supported.
+#
+naming.type: corba
+
+#
+# Naming format
+#
+# The name format of components that is bound to naming services.
+# The delimiter between names is "/".
+# The delimiter between name and kind is ".".
+#
+# example: (OpenRTM-aist-0.2.0 style)
+#       %h.host_cxt/%M.mgr_cxt/%c.cat_cxt/%m.mod_cxt/%n.rtc
+# This is formatted according to the following replacement rules.
+#
+# %n: The instance name of the component.
+# %t: The type name of the component.
+# %m: The module name of the component.
+# %v: The version of the component.
+# %V: The component vendor.
+# %c: The category of the component.
+# %h: The hostname.
+# %M: The manager name.
+# %p: PID of the manager.
+#
+naming.formats: %h.host/%n.rtc
+
+#
+# Auto update to Naming Server
+#
+naming.update.enable: YES
+#
+# Update interval [s] for auto update
+#
+naming.update.interval: 10.0
+#
+# Rebind references in auto update
+#
+naming.update.rebind: NO
+
+# End of Naming configuration section
+#------------------------------------------------------------
+
+#============================================================
+# Module management
+#============================================================
+#
+# Loadable module search path list
+#
+# Manager searches loadable modules from the specified search path list.
+# Path list elements should be separated by comma.
+# Path delimiter is '/' on UNIX, and '\\' on Windows
+# Valid path examples:
+#   manager.modules.load_path: C:/Program Files/OpenRTM-aist,  \
+#   			       C:\\Program Files\\OpenRTM-aist
+#   manager.modules.load_path: /usr/lib, /usr/local/lib,       \
+#   			       /usr/local/lib/OpenRTM-aist/libs
+#
+manager.modules.load_path: ./
+
+#
+# Preload module list
+#
+# Manager can load loadable modules before starting up.
+# Loadable modules, which is specified only as its file name, is searched
+# in each module load path specified in the "manager.modules.load_path".
+# If the "manager.modules.abs_path_allowed" option is YES, loadable file
+# can be specified as full-path name,
+#
+# Valid settings:
+# manager.modules.preload: ConsoleIn.dll, ConsoleOut.dll
+# manager.modules.preload: ConsoleIn.so, ConsoleOut.so
+# manager.modules.abs_path_allowed: YES
+# manager.modules.preload: /usr/lib/OpenRTM-aist/ConsoleIn.so
+#
+manager.modules.preload:
+
+#
+# Permission flag of absolute module path
+#
+# If this option is "YES", absolute path specification for module is allowed.
+#
+manager.modules.abs_path_allowed: YES
+
+#
+# The following options are not implemented yet. 
+#
+# manager.modules.config_ext:
+# manager.modules.config_path:
+# manager.modules.detect_loadable:
+# manager.modules.init_func_suffix:
+# manager.modules.init_func_prefix:
+# manager.modules.download_allowed:
+# manager.modules.download_dir:
+# manager.modules.download_cleanup:
+#
+
+#
+# Advance component creation
+#
+# This option specifies components' names (module name) creating in advance
+# before starting the manager's event-loop. The components' factories should
+# be registered by manager.module.preload option or statically linked to the
+#  manager.
+#
+# Example:
+# manager.components.precreate: ConsoleIn, ConsoleOut, SeqIn, SeqOut
+#
+manager.components.precreate: 
+
+
+#============================================================
+# Logger configurations
+#============================================================
+#
+# Enable/Disable logger [YES/NO]
+logger.enable: YES
+
+#
+# Log file name (default = ./rtc%p.log)
+#
+# %p: PID
+#
+logger.file_name: ./rtc%p.log
+
+#
+# Log date format (default = %b %d %H:%M:%S)
+#
+# The following strftime(3) like format expression is available.
+# If no prefix is needed, use "No" or "Disable".
+# 
+# %a abbreviated weekday name 
+# %A full weekday name 
+# %b abbreviated month name 
+# %B full month name 
+# %c the standard date and time string 
+# %d day of the month, as a number (1-31) 
+# %H hour, 24 hour format (0-23) 
+# %I hour, 12 hour format (1-12) 
+# %j day of the year, as a number (1-366) 
+# %m month as a number (1-12).
+#    Note: some versions of Microsoft Visual C++ may use values that range
+#    from 0-11. 
+# %M minute as a number (0-59) 
+# %p locale's equivalent of AM or PM 
+# %Q millisecond as a number (0-999) from ver 1.1
+# %q microsecond as a number (0-999) from ver 1.1
+# %S second as a number (0-59) 
+# %U week of the year, sunday as the first day 
+# %w weekday as a decimal (0-6, sunday=0) 
+# %W week of the year, monday as the first day 
+# %x standard date string 
+# %X standard time string 
+# %y year in decimal, without the century (0-99) 
+# %Y year in decimal, with the century 
+# %Z time zone name 
+# %% a percent sign 
+#  
+#
+# logger.date_format: No
+# logger.date_format: Disable
+# logger.date_format: [%Y-%m-%dT%H.%M.%S%Z]     // W3C standard format
+# logger.date_format: [%b %d %H:%M:%S]          // Syslog format
+# logger.date_format: [%a %b %d %Y %H:%M:%S %Z] // RFC2822 format
+# logger.date_format: [%a %b %d %H:%M:%S %Z %Y] // data command format
+# logger.date_format: [%Y-%m-%d %H.%M.%S]
+#
+logger.date_format: %b %d %H:%M:%S
+
+#
+# Log level (default = NORMAL)
+#
+# The following LogLevels are allowed.
+# SILENT, ERROR, WARN, NORMAL, INFO, DEBUG, TRACE, VERBOSE, PARANOID
+#
+#
+# SILENT  : completely silent
+# ERROR   : includes (ERROR)
+# WARN    : includes (ERROR, WARN)
+# INFO    : includes (ERROR, WARN, INFO)
+# NORMAL  : includes (ERROR, WARN, INFO, NORMAL)
+# DEBUG   : includes (ERROR, WARN, INFO, NORMAL, DEBUG)
+# TRACE   : includes (ERROR, WARN, INFO, NORMAL, DEBUG, TRACE)
+# VERBOSE : includes (ERROR, WARN, INFO, NORMAL, DEBUG, TRACE, VERBOSE)
+# PARANOID: includes (ERROR, WARN, INFO, NORMAL, DEBUG, TRACE, VERBOSE, PARA)
+#
+# Warning!!!
+# "TRACE", "VERBOSE", "PARANOID" logging level will create a huge log file!!
+# "PARANOID" log level will tangle the log file.
+#
+logger.log_level: NORMAL
+
+#
+# Logger's clock time
+#
+# logger.clock_type option specifies a type of clock to be used for
+# timestamp of log message. Now these three types are available.
+#
+# - system: system clock [default]
+# - logical: logical clock
+# - adjusted: adjusted clock
+#
+# To use logical time clock, call and set time by the following
+# function in somewhere.
+# coil::ClockManager::instance().getClock("logical").settime()
+#
+logger.clock_type: system
+
+#============================================================
+# Timer configuration
+#============================================================
+#
+# Enable/disable timer function
+#
+timer.enable: YES
+
+#
+# Timer clock tick setting [s]
+#
+timer.tick: 0.1
+
+#============================================================
+# Execution context settings
+#============================================================
+#
+# Periodic type ExecutionContext
+#
+# Other availabilities in OpenRTM-aist
+#
+# - ExtTrigExecutionContext: External triggered EC. It is embedded in
+#                            OpenRTM library.
+# - OpenHRPExecutionContext: External triggred paralell execution
+#                            EC. It is embedded in OpenRTM
+#                            library. This is usually used with
+#                            OpenHRP3.
+# - RTPreemptEC:             Real-time execution context for Linux
+#                            RT-preemptive pathed kernel.
+# - ArtExecutionContext:     Real-time execution context for ARTLinux
+#                            (http://sourceforge.net/projects/art-linux/)
+#
+exec_cxt.periodic.type: PeriodicExecutionContext
+# exec_cxt.event_driven_type: to be implemented
+
+#
+# The execution cycle of ExecutionContext
+#
+exec_cxt.periodic.rate: 1000
+
+#
+# State transition mode settings YES/NO
+#
+# Default: YES (efault setting is recommended.)
+#
+# Activating, deactivating and resetting of RTC makes state
+# transition.  Some execution contexts execute main logic in different
+# thread.  If these flags set to YES, activation, deactivation and
+# resetting will be performed synchronously.  In other words, if these
+# flags are YES, activation/deactivation/resetting-operations must be
+# returned after state transition completed.
+#
+# "synchronous_transition" will set synchronous transition flags to
+# all other synchronous transition flags
+# (synchronous_activation/deactivation/resetting.
+#
+exec_cxt.sync_transition: YES
+exec_cxt.sync_activation: YES
+exec_cxt.sync_deactivation: YES
+exec_cxt.sync_reset: YES
+
+#
+# Timeout of synchronous state transition [s]
+#
+# Default: 1.0 [s]
+#
+# When synchronous transition flags are set to YES, the following
+# timeout settings are valid. If "transition_timeout" is set, the
+# value will be set to all other timeout of activation/deactivation
+# and resetting
+#
+exec_cxt.transition_timeout: 0.5
+exec_cxt.activation_timeout: 0.5
+exec_cxt.deactivation_timeout: 0.5
+exec_cxt.reset_timeout: 0.5
+
+
+
+#============================================================
+# SDO service settings
+#============================================================
+#
+# SDO service provider settings
+#
+sdo.service.provider.available_services: [read only]
+sdo.service.provider.enabled_services: ALL
+sdo.service.provider.providing_services: [read only]
+#
+# SDO service consumer settings
+#
+sdo.service.consumer.available_services: [read only]
+sdo.service.consumer.enabled_services: ALL

Added: trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/rtcd.conf
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/rtcd.conf	                        (rev 0)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/rtcd.conf	2017-05-02 00:49:38 UTC (rev 824)
@@ -0,0 +1,15 @@
+corba.nameservers: localhost
+naming.formats: %h.host_cxt/%n.rtc
+logger.enable: NO
+logger.log_level: PARANOID
+manager.modules.load_path: ../examples/Python/Composite, \
+													 ../examples/Python/ConfigSample, \
+													 ../examples/Python/MobileRobotCanvas, \
+													 ../examples/Python/NXTRTC, \
+													 ../examples/Python/SeqIO, \
+													 ../examples/Python/SimpleIO, \
+													 ../examples/Python/SimpleService, \
+													 ../examples/Python/TkJoyStick, \
+													 ../components/
+#manager.modules.preload: ConfigSample, ConsoleInl, ConsoleOut
+#manager.components.precreate: ConfigSample, ConsoleIn, ConsoleOut

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/gen_base.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/gen_base.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/gen_base.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -64,7 +64,7 @@
 			m = re.search("</rtc-template>", l)
 			if m:
 				in_tag = False
-				if data.has_key(tag_name):
+				if tag_name in data:
 					ret_lines += data[tag_name] + "\n"
 				ret_lines += l + "\n"
 				tag_name = ""
@@ -98,5 +98,5 @@
 		gen_txt = self.replace_tags(taged_txt.split("\n"), tags)
 		f.write(gen_txt)
 		f.close()
-		print "  File \"" + fname + "\"" " was generated."
+		print("  File \"" + fname + "\"" " was generated.")
 		return

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/python_gen.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/python_gen.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/python_gen.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -284,7 +284,7 @@
             break
           f.close()
         except IOError:
-          print "Can't find file:", file
+          print("Can't find file:", file)
     return
 
   def CreateDataPorts(self, dict):
@@ -357,9 +357,9 @@
         sys.stderr.write("Generate error: " \
                            + sidl["impl_py"] + "\n")
         
-      print "  File \"" \
+      print("  File \"" \
           + sidl["impl_py"] \
-          + "\" was generated."
+          + "\" was generated.")
 
     for cons in self.data["consumer_idl"]:
       dup = False

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/rtc-template.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/rtc-template.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/rtc-template.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -242,7 +242,7 @@
   """
   Help message
   """
-  print """
+  print("""
 Usage: rtc-template [OPTIONS]
 
 Options:
@@ -268,13 +268,13 @@
     [--consumer-idl[=IDL_file]]           IDL file name for consumer
     [--idl-include=[path]]                Search path for IDL compile
 
-"""
+""")
 
 def usage_long():
   """
   Help message
   """
-  print """
+  print("""
     --output[=output_file]:
         Specify base name of output file. If 'XXX' is specified,
         Python source codes XXX.py is generated.
@@ -374,7 +374,7 @@
     --consumer=YourSvcPort:yourservice0:YourService \\
     --service-idl=MyService.idl --consumer-idl=YourService.idl
 
-"""
+""")
   return
 
 def usage():
@@ -449,7 +449,7 @@
   for opt, arg in opts:
     if opt.find("--module-") == 0:
       var = opt.replace("--module-","")
-      if prof.has_key(mapping[var]):
+      if mapping[var] in prof:
         prof[mapping[var]] = arg
   # set creationDate
   cDate = time.localtime()
@@ -681,8 +681,8 @@
       tmp["instanceName"] = name
       idlfname = FindIdlFile(opts, type)
       if idlfname == None:
-        print "Error:"
-        print "IDL file not found for a interface: ", type
+        print("Error:")
+        print("IDL file not found for a interface: ", type)
         sys.exit(1)
       tmp["idlFile"] = idlfname
       port["serviceInterface"].append(tmp)
@@ -698,7 +698,7 @@
       fname = arg
       fd = open(fname, "r")
       if fd == None:
-        print "IDL file not found: ", arg
+        print("IDL file not found: ", arg)
         sys.exit(1)
       t = fd.read()
       if None != re.compile(_re_text).search(t):
@@ -715,7 +715,7 @@
       if sif["direction"] == "Provided":
         svcidls[sif["idlFile"]] = ""
       elif sif["direction"] == "Required":
-        if not svcidls.has_key(sif["idlFile"]):
+        if not sif["idlFile"] in svcidls:
           cnsidls[sif["idlFile"]] = ""
   dict["service_idl"] = []
   dict["consumer_idl"] = []
@@ -790,17 +790,17 @@
     for opt in args:
       if opt.find('-b') == 0:
         backend_name = opt.replace("-b", "")
-        if self.backends.has_key(backend_name):
+        if backend_name in self.backends:
           self.opts.append(backend_name)
         else:
-          print "No such backend: ", backend_name
+          print("No such backend: ", backend_name)
           sys.exit(-1)
       elif opt.find('--backend=') == 0:
         backend_name = opt.replace("--backend=", "")
-        if self.backends.has_key(backend_name):
+        if backend_name in self.backends:
           self.opts.append(backend_name)
         else:
-          print "No such backend: ", backend_name
+          print("No such backend: ", backend_name)
           sys.exit(-1)
     return self.opts
 
@@ -812,27 +812,27 @@
 
 
   def usage_available(self):
-    print "The following backends are available."
+    print("The following backends are available.")
     space = 10
     for key in self.backends:
       desc = self.backends[key].mod.description()                     
-      print "    -b" + key + ("." * (space - len(key))) + desc
-    print """
+      print("    -b" + key + ("." * (space - len(key))) + desc)
+    print("""
 Backend [xxx] specific help can be available by the following options.
     -bxxx --help|-h or --backend=xxx --help|-h
-        """
+        """)
     return
 
   def usage(self):
     for be in self.opts:
-      print self.backends[be].mod.usage()                     
-      print ""
+      print(self.backends[be].mod.usage())                     
+      print("")
     return
 
   def usage_short(self):
     for be in self.opts:
-      print self.backends[be].mod.usage_short()
-      print ""
+      print(self.backends[be].mod.usage_short())
+      print("")
     return
 
   def generate_code(self, data, opts):
@@ -866,7 +866,7 @@
   try:
     opts, args = getopt.getopt(sys.argv[1:], "b:ho:v", opt_args_fmt)
   except getopt.GetoptError:
-    print "Error: Invalid option.", getopt.GetoptError
+    print("Error: Invalid option.", getopt.GetoptError)
     usage_short()
     backends.usage_available()
     sys.exit(-1)
@@ -914,7 +914,7 @@
   CreateId(data)
   PickupIDLFiles(data)
 
-  if not data.has_key('fname'):
+  if not 'fname' in data:
     data['fname'] = data['basicInfo']['name']
   backends.generate_code(data, opts)
 

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/uuid.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/uuid.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/uuid.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -1,101 +1,46 @@
-r"""UUID objects (universally unique identifiers) according to RFC 4122.
+#!/usr/bin/env python
+# -*- coding: euc-jp -*-
 
-This module provides immutable UUID objects (class UUID) and the functions
-uuid1(), uuid3(), uuid4(), uuid5() for generating version 1, 3, 4, and 5
-UUIDs as specified in RFC 4122.
+##
+# @file uuid.py
+# @brief 
+# @date $Date: 2006/06/12 $
+# @author Ka-Ping Yee <ping at zesty.ca>
+#
+# Copyright (C) 2008
+#     Task-intelligence Research Group,
+#     Intelligent Systems Research Institute,
+#     National Institute of
+#         Advanced Industrial Science and Technology (AIST), Japan
+#     All rights reserved.
 
-If all you want is a unique ID, you should probably call uuid1() or uuid4().
-Note that uuid1() may compromise privacy since it creates a UUID containing
-the computer's network address.  uuid4() creates a random UUID.
+import sys
 
-Typical usage:
-
-    >>> import uuid
-
-    # make a UUID based on the host ID and current time
-    >>> uuid.uuid1()
-    UUID('a8098c1a-f86e-11da-bd1a-00112444be1e')
-
-    # make a UUID using an MD5 hash of a namespace UUID and a name
-    >>> uuid.uuid3(uuid.NAMESPACE_DNS, 'python.org')
-    UUID('6fa459ea-ee8a-3ca4-894e-db77e160355e')
-
-    # make a random UUID
-    >>> uuid.uuid4()
-    UUID('16fd2706-8baf-433b-82eb-8c7fada847da')
-
-    # make a UUID using a SHA-1 hash of a namespace UUID and a name
-    >>> uuid.uuid5(uuid.NAMESPACE_DNS, 'python.org')
-    UUID('886313e1-3b8a-5372-9b90-0c9aee199e5d')
-
-    # make a UUID from a string of hex digits (braces and hyphens ignored)
-    >>> x = uuid.UUID('{00010203-0405-0607-0809-0a0b0c0d0e0f}')
-
-    # convert a UUID to a string of hex digits in standard form
-    >>> str(x)
-    '00010203-0405-0607-0809-0a0b0c0d0e0f'
-
-    # get the raw 16 bytes of the UUID
-    >>> x.bytes
-    '\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f'
-
-    # make a UUID from a 16-byte string
-    >>> uuid.UUID(bytes=x.bytes)
-    UUID('00010203-0405-0607-0809-0a0b0c0d0e0f')
-
-This module works with Python 2.3 or higher."""
-
-__author__ = 'Ka-Ping Yee <ping at zesty.ca>'
-__date__ = '$Date: 2007-07-20 16:16:21 $'.split()[1].replace('/', '-')
-__version__ = '$Revision: 1.1.2.1 $'.split()[1]
-
 RESERVED_NCS, RFC_4122, RESERVED_MICROSOFT, RESERVED_FUTURE = [
     'reserved for NCS compatibility', 'specified in RFC 4122',
     'reserved for Microsoft compatibility', 'reserved for future definition']
 
-class UUID(object):
-    """Instances of the UUID class represent UUIDs as specified in RFC 4122.
-    UUID objects are immutable, hashable, and usable as dictionary keys.
-    Converting a UUID to a string with str() yields something in the form
-    '12345678-1234-1234-1234-123456789abc'.  The UUID constructor accepts
-    four possible forms: a similar string of hexadecimal digits, or a
-    string of 16 raw bytes as an argument named 'bytes', or a tuple of
-    six integer fields (with 32-bit, 16-bit, 16-bit, 8-bit, 8-bit, and
-    48-bit values respectively) as an argument named 'fields', or a single
-    128-bit integer as an argument named 'int'.
-    
-    UUIDs have these read-only attributes:
 
-        bytes       the UUID as a 16-byte string
+if sys.version_info[0] == 3:
+    long = int
 
-        fields      a tuple of the six integer fields of the UUID,
-                    which are also available as six individual attributes
-                    and two derived attributes:
 
-            time_low                the first 32 bits of the UUID
-            time_mid                the next 16 bits of the UUID
-            time_hi_version         the next 16 bits of the UUID
-            clock_seq_hi_variant    the next 8 bits of the UUID
-            clock_seq_low           the next 8 bits of the UUID
-            node                    the last 48 bits of the UUID
 
-            time                    the 60-bit timestamp
-            clock_seq               the 14-bit sequence number
+##
+# @if jp
+# @class UUID
+# @brief UUID保持クラス
+# 
+# 生成した UUID の情報を保持するためのクラス。
+#
+# @since 0.4.0
+#
+# @else
+#
+# @endif
+class UUID(object):
 
-        hex         the UUID as a 32-character hexadecimal string
-
-        int         the UUID as a 128-bit integer
-
-        urn         the UUID as a URN as specified in RFC 4122
-
-        variant     the UUID variant (one of the constants RESERVED_NCS,
-                    RFC_4122, RESERVED_MICROSOFT, or RESERVED_FUTURE)
-
-        version     the UUID version number (1 through 5, meaningful only
-                    when the variant is RFC_4122)
-    """
-
-    def __init__(self, hex=None, bytes=None, fields=None, int=None,
+    def __init__(self, hex=None, bytes=None, fields=None, int_value=None,
                        version=None):
         r"""Create a UUID from either a string of 32 hexadecimal digits,
         a string of 16 bytes as the 'bytes' argument, a tuple of six
@@ -119,62 +64,63 @@
         overriding bits in the given 'hex', 'bytes', 'fields', or 'int'.
         """
 
-        if [hex, bytes, fields, int].count(None) != 3:
+            
+        if [hex, bytes, fields, int_value].count(None) != 3:
             raise TypeError('need just one of hex, bytes, fields, or int')
-        if hex is not None:
+        if hex:
             hex = hex.replace('urn:', '').replace('uuid:', '')
             hex = hex.strip('{}').replace('-', '')
             if len(hex) != 32:
                 raise ValueError('badly formed hexadecimal UUID string')
-            int = long(hex, 16)
-        if bytes is not None:
+            int_value = long(hex, 16)
+        if bytes:
             if len(bytes) != 16:
                 raise ValueError('bytes is not a 16-char string')
-            int = long(('%02x'*16) % tuple(map(ord, bytes)), 16)
-        if fields is not None:
+            int_value = long(('%02x'*16) % tuple(map(ord, bytes)), 16)
+        if fields:
             if len(fields) != 6:
                 raise ValueError('fields is not a 6-tuple')
             (time_low, time_mid, time_hi_version,
              clock_seq_hi_variant, clock_seq_low, node) = fields
-            if not 0 <= time_low < 1<<32L:
+            if not 0 <= time_low < 1<<32:
                 raise ValueError('field 1 out of range (need a 32-bit value)')
-            if not 0 <= time_mid < 1<<16L:
+            if not 0 <= time_mid < 1<<16:
                 raise ValueError('field 2 out of range (need a 16-bit value)')
-            if not 0 <= time_hi_version < 1<<16L:
+            if not 0 <= time_hi_version < 1<<16:
                 raise ValueError('field 3 out of range (need a 16-bit value)')
-            if not 0 <= clock_seq_hi_variant < 1<<8L:
+            if not 0 <= clock_seq_hi_variant < 1<<8:
                 raise ValueError('field 4 out of range (need an 8-bit value)')
-            if not 0 <= clock_seq_low < 1<<8L:
+            if not 0 <= clock_seq_low < 1<<8:
                 raise ValueError('field 5 out of range (need an 8-bit value)')
-            if not 0 <= node < 1<<48L:
+            if not 0 <= node < 1<<48:
                 raise ValueError('field 6 out of range (need a 48-bit value)')
-            clock_seq = (clock_seq_hi_variant << 8L) | clock_seq_low
-            int = ((time_low << 96L) | (time_mid << 80L) |
-                   (time_hi_version << 64L) | (clock_seq << 48L) | node)
-        if int is not None:
-            if not 0 <= int < 1<<128L:
+            clock_seq = (clock_seq_hi_variant << 8) | clock_seq_low
+            int_value = ((time_low << 96) | (time_mid << 80) |
+                   (time_hi_version << 64) | (clock_seq << 48) | node)
+        if int_value:
+            if not 0 <= int_value < 1<<128:
                 raise ValueError('int is out of range (need a 128-bit value)')
-        if version is not None:
+        if version:
             if not 1 <= version <= 5:
                 raise ValueError('illegal version number')
             # Set the variant to RFC 4122.
-            int &= ~(0xc000 << 48L)
-            int |= 0x8000 << 48L
+            int_value &= ~(0xc000 << 48)
+            int_value |= 0x8000 << 48
             # Set the version number.
-            int &= ~(0xf000 << 64L)
-            int |= version << 76L
-        self.__dict__['int'] = int
+            int_value &= ~(0xf000 << 64)
+            int_value |= version << 76
+        self.__dict__['int_value'] = int_value
 
     def __cmp__(self, other):
         if isinstance(other, UUID):
-            return cmp(self.int, other.int)
+            return cmp(self.int_value, other.int_value)
         return NotImplemented
 
     def __hash__(self):
-        return hash(self.int)
+        return hash(self.int_value)
 
     def __int__(self):
-        return self.int
+        return self.int_value
 
     def __repr__(self):
         return 'UUID(%r)' % str(self)
@@ -183,14 +129,14 @@
         raise TypeError('UUID objects are immutable')
 
     def __str__(self):
-        hex = '%032x' % self.int
+        hex = '%032x' % self.int_value
         return '%s-%s-%s-%s-%s' % (
             hex[:8], hex[8:12], hex[12:16], hex[16:20], hex[20:])
 
     def get_bytes(self):
         bytes = ''
         for shift in range(0, 128, 8):
-            bytes = chr((self.int >> shift) & 0xff) + bytes
+            bytes = chr((self.int_value >> shift) & 0xff) + bytes
         return bytes
 
     bytes = property(get_bytes)
@@ -202,49 +148,49 @@
     fields = property(get_fields)
 
     def get_time_low(self):
-        return self.int >> 96L
+        return self.int_value >> 96
    
     time_low = property(get_time_low)
 
     def get_time_mid(self):
-        return (self.int >> 80L) & 0xffff
+        return (self.int_value >> 80) & 0xffff
 
     time_mid = property(get_time_mid)
 
     def get_time_hi_version(self):
-        return (self.int >> 64L) & 0xffff
+        return (self.int_value >> 64) & 0xffff
     
     time_hi_version = property(get_time_hi_version)
 
     def get_clock_seq_hi_variant(self):
-        return (self.int >> 56L) & 0xff
+        return (self.int_value >> 56) & 0xff
 
     clock_seq_hi_variant = property(get_clock_seq_hi_variant)
     
     def get_clock_seq_low(self):
-        return (self.int >> 48L) & 0xff
+        return (self.int_value >> 48) & 0xff
 
     clock_seq_low = property(get_clock_seq_low)
 
     def get_time(self):
-        return (((self.time_hi_version & 0x0fffL) << 48L) |
-                (self.time_mid << 32L) | self.time_low)
+        return (((self.time_hi_version & 0x0fff) << 48) |
+                (self.time_mid << 32) | self.time_low)
 
     time = property(get_time)
 
     def get_clock_seq(self):
-        return (((self.clock_seq_hi_variant & 0x3fL) << 8L) |
+        return (((self.clock_seq_hi_variant & 0x3f) << 8) |
                 self.clock_seq_low)
 
     clock_seq = property(get_clock_seq)
     
     def get_node(self):
-        return self.int & 0xffffffffffff
+        return self.int_value & 0xffffffffffff
 
     node = property(get_node)
 
     def get_hex(self):
-        return '%032x' % self.int
+        return '%032x' % self.int_value
 
     hex = property(get_hex)
 
@@ -254,11 +200,11 @@
     urn = property(get_urn)
 
     def get_variant(self):
-        if not self.int & (0x8000 << 48L):
+        if not self.int_value & (0x8000 << 48):
             return RESERVED_NCS
-        elif not self.int & (0x4000 << 48L):
+        elif not self.int_value & (0x4000 << 48):
             return RFC_4122
-        elif not self.int & (0x2000 << 48L):
+        elif not self.int_value & (0x2000 << 48):
             return RESERVED_MICROSOFT
         else:
             return RESERVED_FUTURE
@@ -268,7 +214,7 @@
     def get_version(self):
         # The version bits are only meaningful for RFC 4122 UUIDs.
         if self.variant == RFC_4122:
-            return int((self.int >> 76L) & 0xf)
+            return int((self.int_value >> 76) & 0xf)
 
     version = property(get_version)
 
@@ -279,10 +225,10 @@
     pipe = os.popen(os.path.join(dir, 'ifconfig'))
 
     for line in pipe:
-	words = line.lower().split()
-	for i in range(len(words)):
-	    if words[i] in ['hwaddr', 'ether']:
-	       return int(words[i + 1].replace(':', ''), 16)
+      words = line.lower().split()
+      for i in range(len(words)):
+        if words[i] in ['hwaddr', 'ether']:
+          return int(words[i + 1].replace(':', ''), 16)
 
 def _ipconfig_getnode():
     """Get the hardware address on Windows by running ipconfig.exe."""
@@ -331,8 +277,8 @@
             continue
         status._unpack()
         bytes = map(ord, status.adapter_address)
-        return ((bytes[0]<<40L) + (bytes[1]<<32L) + (bytes[2]<<24L) +
-                (bytes[3]<<16L) + (bytes[4]<<8L) + bytes[5])
+        return ((bytes[0]<<40) + (bytes[1]<<32) + (bytes[2]<<24) +
+                (bytes[3]<<16) + (bytes[4]<<8) + bytes[5])
 
 # Thanks to Thomas Heller for ctypes and for his help with its use here.
 
@@ -380,7 +326,7 @@
 def _random_getnode():
     """Get a random node ID, with eighth bit set as suggested by RFC 4122."""
     import random
-    return random.randrange(0, 1<<48L) | 0x010000000000L
+    return random.randrange(0, 1<<48) | 0x010000000000
 
 _node = None
 
@@ -391,7 +337,7 @@
     48-bit number with its eighth bit set to 1 as recommended in RFC 4122."""
 
     global _node
-    if _node is not None:
+    if _node:
         return _node
 
     import sys
@@ -405,7 +351,7 @@
             _node = getter()
         except:
             continue
-        if _node is not None:
+        if _node:
             return _node
 
 def uuid1(node=None, clock_seq=None):
@@ -424,15 +370,15 @@
     nanoseconds = int(time.time() * 1e9)
     # 0x01b21dd213814000 is the number of 100-ns intervals between the
     # UUID epoch 1582-10-15 00:00:00 and the Unix epoch 1970-01-01 00:00:00.
-    timestamp = int(nanoseconds/100) + 0x01b21dd213814000L
+    timestamp = int(nanoseconds/100) + 0x01b21dd213814000
     if clock_seq is None:
         import random
-        clock_seq = random.randrange(1<<14L) # instead of stable storage
-    time_low = timestamp & 0xffffffffL
-    time_mid = (timestamp >> 32L) & 0xffffL
-    time_hi_version = (timestamp >> 48L) & 0x0fffL
-    clock_seq_low = clock_seq & 0xffL
-    clock_seq_hi_variant = (clock_seq >> 8L) & 0x3fL
+        clock_seq = random.randrange(1<<14) # instead of stable storage
+    time_low = timestamp & 0xffffffff
+    time_mid = (timestamp >> 32) & 0xffff
+    time_hi_version = (timestamp >> 48) & 0x0fff
+    clock_seq_low = clock_seq & 0xff
+    clock_seq_hi_variant = (clock_seq >> 8) & 0x3f
     if node is None:
         node = getnode()
     return UUID(fields=(time_low, time_mid, time_hi_version,

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/yat.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/yat.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtc-template/yat.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -275,7 +275,7 @@
         try:
             # split into (TEXT DIRECTIVE BRACKET)* TEXT
             self.__parse()
-        except YATException, e:
+        except YATException as e:
             self.__print_error(e)
             sys.exit(-1)
 
@@ -397,7 +397,7 @@
             self.__write_cmd("self.pop_dict()")
             self.__pop_level()
         except:
-            print args, self.lineno()
+            print(args, self.lineno())
             raise UnmatchedBlock(self.lineno(), "endfor")
         return
 
@@ -450,7 +450,7 @@
         cmd = args[3]
         if len(self.re_number.findall(cmd)) == 1:
             cmd_text = "if %s_index == %s:" % (key, cmd)
-        elif cmdlist.has_key(cmd):
+        elif cmd in cmdlist:
             if cmd == "last":
                 cmd_text = cmdlist[cmd] % (key,key)
             else:
@@ -474,7 +474,7 @@
         cmd = args[3]
         if len(self.re_number.findall(cmd)) == 1:
             cmd_text = "elif %s_index == %s:" % (key, cmd)
-        elif cmdlist.has_key(cmd):
+        elif cmd in cmdlist:
             if cmd == "last":
                 cmd_text = cmdlist[cmd] % (key,key)
             else:
@@ -525,19 +525,19 @@
     #------------------------------------------------------------
 
     def __print_error(self, e):
-        print "Parse Error: line", e.lineno, "in input data"
-        print "  " + ''.join(nesteditem(e.value))
+        print("Parse Error: line", e.lineno, "in input data")
+        print("  " + ''.join(nesteditem(e.value)))
         lines = self.template.split("\n")
         length = len(lines)
-        print "------------------------------------------------------------"
+        print("------------------------------------------------------------")
         for i in range(1,10):
             l = e.lineno - 6 + i
             if l > 0 and l < length:
-                print lines[l]
+                print(lines[l])
                 if i == 5:
                     uline = '~'*len(lines[l])
-                    print uline
-        print "------------------------------------------------------------"
+                    print(uline)
+        print("------------------------------------------------------------")
     
     def del_nl_after_cmd(self):
         # next text index after command
@@ -591,8 +591,8 @@
         self.text = ""
 
     def print_error(self, e):
-        print "\nTemplate Generation Error: line", e.lineno, "in input data"
-        print "  " + ''.join(nesteditem(e.value))
+        print("\nTemplate Generation Error: line", e.lineno, "in input data")
+        print("  " + ''.join(nesteditem(e.value)))
         temp = ""
         for i, s in enumerate(self.token):
             if s != None:
@@ -602,15 +602,15 @@
                     temp += s
         lines = temp.split("\n")
         length = len(lines)
-        print "------------------------------------------------------------"
+        print("------------------------------------------------------------")
         for i in range(1,10):
             l = e.lineno - 6 + i
             if l > 0 and l < length:
-                print lines[l]
+                print(lines[l])
                 if i == 5:
                     uline = '~'*len(lines[l])
-                    print uline
-        print "------------------------------------------------------------"
+                    print(uline)
+        print("------------------------------------------------------------")
         
     def set_index(self, index):
         self.index = index
@@ -663,7 +663,7 @@
         try:
             self.get_value(keytext)
             return True
-        except NotFound, e:
+        except NotFound as e:
             return False
 
     def get_value(self, keytext):
@@ -678,7 +678,7 @@
         length = len(keys)
         d = dict
         for i in range(length):
-            if isinstance(d, DictType) and d.has_key(keys[i]):
+            if isinstance(d, DictType) and keys[i] in d:
                 d = d[keys[i]]
             else:
                 return None
@@ -818,18 +818,18 @@
     if len(dict) == len(template):
         for i in range(len(dict)-1,len(dict)):
             t = Template(template[i])
-            print "-" * 60
-            print "Example:", i
-            print "-" * 60
-            print "Template:\n"
-            print template[i]
-            print "-" * 60
-            print "Dictionary:\n"
-            print yaml.dump(dict[i], default_flow_style=False)
-            print "-" * 60
-            print "Generated Script:\n"
-            print t.get_script()
-            print "-" * 60
-            print "Generated Text:\n"
-            print t.generate(dict[i])
-            print ""
+            print("-" * 60)
+            print("Example:", i)
+            print("-" * 60)
+            print("Template:\n")
+            print(template[i])
+            print("-" * 60)
+            print("Dictionary:\n")
+            print(yaml.dump(dict[i], default_flow_style=False))
+            print("-" * 60)
+            print("Generated Script:\n")
+            print(t.get_script())
+            print("-" * 60)
+            print("Generated Text:\n")
+            print(t.generate(dict[i]))
+            print("")

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtcprof/rtcprof.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtcprof/rtcprof.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtcprof/rtcprof.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -23,8 +23,8 @@
 def main():
 
   if len(sys.argv) != 2:
-    print "usage: "
-    print sys.argv[0], " *.py "
+    print("usage: ")
+    print(sys.argv[0], " *.py ")
     return
 
   # file name with full path
@@ -89,18 +89,18 @@
         
   # loaded component profile have to be one
   if len(profs) == 0:
-    print "Load failed. file name: ", fname
+    print("Load failed. file name: ", fname)
     sys.path = tmp_path
     return OpenRTM_aist.Properties()
 
   if len(profs) > 1:
-    print "One or more modules loaded."
+    print("One or more modules loaded.")
     sys.path = tmp_path
     return OpenRTM_aist.Properties()
 
   keys = profs[0].propertyNames()
   for key in keys:
-    print "%s:%s"%(key,profs[0].getProperty(key))
+    print("%s:%s"%(key,profs[0].getProperty(key)))
 
   sys.path = tmp_path
   return

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtm-naming/rtm-naming.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtm-naming/rtm-naming.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/utils/rtm-naming/rtm-naming.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -72,7 +72,7 @@
 
 
 def usage():
-    print "Usage: python rtm-naming.py port_number"
+    print("Usage: python rtm-naming.py port_number")
 
 
 def omninames(port = "", endpoint = ""):
@@ -100,7 +100,7 @@
     if port == "":
         port = default_port
 
-    print "Starting omniORB omniNames: ", hostname, ":", port
+    print("Starting omniORB omniNames: ", hostname, ":", port)
 
     if sys.platform == "win32":
         omniNames = find_nscmd("omniNames.exe", "OMNI_ROOT")
@@ -108,13 +108,13 @@
         omniNames = find_nscmd("omniNames")
 
     if not omniNames:
-        print "Not found omniNames."
+        print("Not found omniNames.")
         sys.exit()
 
     cmd  = omniNames 
     cmd += " -start " + str(port)
     cmd += " -logdir \"" + str(log_path) + "\""
-    print cmd
+    print(cmd)
     os.system(cmd)
 
 

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/uuid.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/uuid.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/uuid.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -14,11 +14,18 @@
 #         Advanced Industrial Science and Technology (AIST), Japan
 #     All rights reserved.
 
+import sys
 
 RESERVED_NCS, RFC_4122, RESERVED_MICROSOFT, RESERVED_FUTURE = [
     'reserved for NCS compatibility', 'specified in RFC 4122',
     'reserved for Microsoft compatibility', 'reserved for future definition']
 
+
+if sys.version_info[0] == 3:
+    long = int
+
+
+
 ##
 # @if jp
 # @class UUID
@@ -33,7 +40,7 @@
 # @endif
 class UUID(object):
 
-    def __init__(self, hex=None, bytes=None, fields=None, int=None,
+    def __init__(self, hex=None, bytes=None, fields=None, int_value=None,
                        version=None):
         r"""Create a UUID from either a string of 32 hexadecimal digits,
         a string of 16 bytes as the 'bytes' argument, a tuple of six
@@ -57,62 +64,63 @@
         overriding bits in the given 'hex', 'bytes', 'fields', or 'int'.
         """
 
-        if [hex, bytes, fields, int].count(None) != 3:
+            
+        if [hex, bytes, fields, int_value].count(None) != 3:
             raise TypeError('need just one of hex, bytes, fields, or int')
         if hex:
             hex = hex.replace('urn:', '').replace('uuid:', '')
             hex = hex.strip('{}').replace('-', '')
             if len(hex) != 32:
                 raise ValueError('badly formed hexadecimal UUID string')
-            int = long(hex, 16)
+            int_value = long(hex, 16)
         if bytes:
             if len(bytes) != 16:
                 raise ValueError('bytes is not a 16-char string')
-            int = long(('%02x'*16) % tuple(map(ord, bytes)), 16)
+            int_value = long(('%02x'*16) % tuple(map(ord, bytes)), 16)
         if fields:
             if len(fields) != 6:
                 raise ValueError('fields is not a 6-tuple')
             (time_low, time_mid, time_hi_version,
              clock_seq_hi_variant, clock_seq_low, node) = fields
-            if not 0 <= time_low < 1<<32L:
+            if not 0 <= time_low < 1<<32:
                 raise ValueError('field 1 out of range (need a 32-bit value)')
-            if not 0 <= time_mid < 1<<16L:
+            if not 0 <= time_mid < 1<<16:
                 raise ValueError('field 2 out of range (need a 16-bit value)')
-            if not 0 <= time_hi_version < 1<<16L:
+            if not 0 <= time_hi_version < 1<<16:
                 raise ValueError('field 3 out of range (need a 16-bit value)')
-            if not 0 <= clock_seq_hi_variant < 1<<8L:
+            if not 0 <= clock_seq_hi_variant < 1<<8:
                 raise ValueError('field 4 out of range (need an 8-bit value)')
-            if not 0 <= clock_seq_low < 1<<8L:
+            if not 0 <= clock_seq_low < 1<<8:
                 raise ValueError('field 5 out of range (need an 8-bit value)')
-            if not 0 <= node < 1<<48L:
+            if not 0 <= node < 1<<48:
                 raise ValueError('field 6 out of range (need a 48-bit value)')
-            clock_seq = (clock_seq_hi_variant << 8L) | clock_seq_low
-            int = ((time_low << 96L) | (time_mid << 80L) |
-                   (time_hi_version << 64L) | (clock_seq << 48L) | node)
-        if int:
-            if not 0 <= int < 1<<128L:
+            clock_seq = (clock_seq_hi_variant << 8) | clock_seq_low
+            int_value = ((time_low << 96) | (time_mid << 80) |
+                   (time_hi_version << 64) | (clock_seq << 48) | node)
+        if int_value:
+            if not 0 <= int_value < 1<<128:
                 raise ValueError('int is out of range (need a 128-bit value)')
         if version:
             if not 1 <= version <= 5:
                 raise ValueError('illegal version number')
             # Set the variant to RFC 4122.
-            int &= ~(0xc000 << 48L)
-            int |= 0x8000 << 48L
+            int_value &= ~(0xc000 << 48)
+            int_value |= 0x8000 << 48
             # Set the version number.
-            int &= ~(0xf000 << 64L)
-            int |= version << 76L
-        self.__dict__['int'] = int
+            int_value &= ~(0xf000 << 64)
+            int_value |= version << 76
+        self.__dict__['int_value'] = int_value
 
     def __cmp__(self, other):
         if isinstance(other, UUID):
-            return cmp(self.int, other.int)
+            return cmp(self.int_value, other.int_value)
         return NotImplemented
 
     def __hash__(self):
-        return hash(self.int)
+        return hash(self.int_value)
 
     def __int__(self):
-        return self.int
+        return self.int_value
 
     def __repr__(self):
         return 'UUID(%r)' % str(self)
@@ -121,14 +129,14 @@
         raise TypeError('UUID objects are immutable')
 
     def __str__(self):
-        hex = '%032x' % self.int
+        hex = '%032x' % self.int_value
         return '%s-%s-%s-%s-%s' % (
             hex[:8], hex[8:12], hex[12:16], hex[16:20], hex[20:])
 
     def get_bytes(self):
         bytes = ''
         for shift in range(0, 128, 8):
-            bytes = chr((self.int >> shift) & 0xff) + bytes
+            bytes = chr((self.int_value >> shift) & 0xff) + bytes
         return bytes
 
     bytes = property(get_bytes)
@@ -140,49 +148,49 @@
     fields = property(get_fields)
 
     def get_time_low(self):
-        return self.int >> 96L
+        return self.int_value >> 96
    
     time_low = property(get_time_low)
 
     def get_time_mid(self):
-        return (self.int >> 80L) & 0xffff
+        return (self.int_value >> 80) & 0xffff
 
     time_mid = property(get_time_mid)
 
     def get_time_hi_version(self):
-        return (self.int >> 64L) & 0xffff
+        return (self.int_value >> 64) & 0xffff
     
     time_hi_version = property(get_time_hi_version)
 
     def get_clock_seq_hi_variant(self):
-        return (self.int >> 56L) & 0xff
+        return (self.int_value >> 56) & 0xff
 
     clock_seq_hi_variant = property(get_clock_seq_hi_variant)
     
     def get_clock_seq_low(self):
-        return (self.int >> 48L) & 0xff
+        return (self.int_value >> 48) & 0xff
 
     clock_seq_low = property(get_clock_seq_low)
 
     def get_time(self):
-        return (((self.time_hi_version & 0x0fffL) << 48L) |
-                (self.time_mid << 32L) | self.time_low)
+        return (((self.time_hi_version & 0x0fff) << 48) |
+                (self.time_mid << 32) | self.time_low)
 
     time = property(get_time)
 
     def get_clock_seq(self):
-        return (((self.clock_seq_hi_variant & 0x3fL) << 8L) |
+        return (((self.clock_seq_hi_variant & 0x3f) << 8) |
                 self.clock_seq_low)
 
     clock_seq = property(get_clock_seq)
     
     def get_node(self):
-        return self.int & 0xffffffffffff
+        return self.int_value & 0xffffffffffff
 
     node = property(get_node)
 
     def get_hex(self):
-        return '%032x' % self.int
+        return '%032x' % self.int_value
 
     hex = property(get_hex)
 
@@ -192,11 +200,11 @@
     urn = property(get_urn)
 
     def get_variant(self):
-        if not self.int & (0x8000 << 48L):
+        if not self.int_value & (0x8000 << 48):
             return RESERVED_NCS
-        elif not self.int & (0x4000 << 48L):
+        elif not self.int_value & (0x4000 << 48):
             return RFC_4122
-        elif not self.int & (0x2000 << 48L):
+        elif not self.int_value & (0x2000 << 48):
             return RESERVED_MICROSOFT
         else:
             return RESERVED_FUTURE
@@ -206,7 +214,7 @@
     def get_version(self):
         # The version bits are only meaningful for RFC 4122 UUIDs.
         if self.variant == RFC_4122:
-            return int((self.int >> 76L) & 0xf)
+            return int((self.int_value >> 76) & 0xf)
 
     version = property(get_version)
 
@@ -269,8 +277,8 @@
             continue
         status._unpack()
         bytes = map(ord, status.adapter_address)
-        return ((bytes[0]<<40L) + (bytes[1]<<32L) + (bytes[2]<<24L) +
-                (bytes[3]<<16L) + (bytes[4]<<8L) + bytes[5])
+        return ((bytes[0]<<40) + (bytes[1]<<32) + (bytes[2]<<24) +
+                (bytes[3]<<16) + (bytes[4]<<8) + bytes[5])
 
 # Thanks to Thomas Heller for ctypes and for his help with its use here.
 
@@ -318,7 +326,7 @@
 def _random_getnode():
     """Get a random node ID, with eighth bit set as suggested by RFC 4122."""
     import random
-    return random.randrange(0, 1<<48L) | 0x010000000000L
+    return random.randrange(0, 1<<48) | 0x010000000000
 
 _node = None
 
@@ -362,15 +370,15 @@
     nanoseconds = int(time.time() * 1e9)
     # 0x01b21dd213814000 is the number of 100-ns intervals between the
     # UUID epoch 1582-10-15 00:00:00 and the Unix epoch 1970-01-01 00:00:00.
-    timestamp = int(nanoseconds/100) + 0x01b21dd213814000L
+    timestamp = int(nanoseconds/100) + 0x01b21dd213814000
     if clock_seq is None:
         import random
-        clock_seq = random.randrange(1<<14L) # instead of stable storage
-    time_low = timestamp & 0xffffffffL
-    time_mid = (timestamp >> 32L) & 0xffffL
-    time_hi_version = (timestamp >> 48L) & 0x0fffL
-    clock_seq_low = clock_seq & 0xffL
-    clock_seq_hi_variant = (clock_seq >> 8L) & 0x3fL
+        clock_seq = random.randrange(1<<14) # instead of stable storage
+    time_low = timestamp & 0xffffffff
+    time_mid = (timestamp >> 32) & 0xffff
+    time_hi_version = (timestamp >> 48) & 0x0fff
+    clock_seq_low = clock_seq & 0xff
+    clock_seq_hi_variant = (clock_seq >> 8) & 0x3f
     if node is None:
         node = getnode()
     return UUID(fields=(time_low, time_mid, time_hi_version,

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/version.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/version.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/version.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # -*- coding: euc-jp -*-
 
-openrtm_name    = "OpenRTM-aist-1.1.0"
-openrtm_version = "1.1.0"
+openrtm_name    = "OpenRTM-aist-1.2.0"
+openrtm_version = "1.2.0"
 corba_name      = "omniORB"

Modified: trunk/OpenRTM-aist-Python/setup.py
===================================================================
--- trunk/OpenRTM-aist-Python/setup.py	2017-04-28 04:40:36 UTC (rev 823)
+++ trunk/OpenRTM-aist-Python/setup.py	2017-05-02 00:49:38 UTC (rev 824)
@@ -128,7 +128,10 @@
 import os,os.path
 import sys
 import string
-import commands
+if sys.version_info[0] == 2:
+  import commands
+else:
+  import subprocess as commands
 import glob
 import shutil
 from distutils import core
@@ -233,7 +236,10 @@
 #
 # examples
 #
-example_dir           = "OpenRTM_aist/examples"
+if sys.version_info[0] == 2:
+  example_dir           = "OpenRTM_aist/examples"
+else:
+  example_dir           = "OpenRTM_aist/python3_examples"
 target_example_dir    = "share/openrtm-" + pkg_shortver + "/components/python"
 example_match_regex   = ".*\.(py|conf|sh|xml|idl)$"
 example_path          = os.path.normpath(current_dir + "/" + example_dir)
@@ -298,7 +304,7 @@
         subdir = re.sub(subs_path, "", root)
         dir_name = os.path.join(target_path, subdir)
         file_path = os.path.join(root, filename)
-        if not temp_hash.has_key(dir_name):
+        if not dir_name in temp_hash:
           temp_hash[dir_name] = []
         temp_hash[dir_name].append(file_path)
 
@@ -352,7 +358,7 @@
   def coding_name(coding):
     conv = {"euc_jp": "euc-jp",
             "shift_jis": "cp932"}
-    if conv.has_key(coding):
+    if coding in conv:
       return conv[coding]
     return coding
   sub_str = "coding: " + coding_name(char_code)
@@ -363,9 +369,9 @@
       outdata = conv_encoding(line.rstrip('\r\n'), char_code)
       outdata = re.sub("coding: [^ ]*", sub_str, outdata)
       outdata = re.sub("encoding: [^ ]*", sub_str, outdata)
-    except Exception, e:
-      print "Exception cought in " + file_name + ": " + line
-      print e
+    except Exception as e:
+      print("Exception cought in " + file_name + ": " + line)
+      print(e)
       infd.close()
       outfd.close()
       os.remove(temp_fname)
@@ -394,7 +400,8 @@
   cmd += files
   # function to be given dist.util.execute
   def exec_idl_compile(cmd_str):
-    cmdline = string.join(cmd_str)
+    #cmdline = string.join(cmd_str)
+    cmdline = " ".join(cmd_str)
     if os_is() == "win32":
       os.system(cmdline)
       return
@@ -425,7 +432,8 @@
     if os.path.exists(target_dir):
       shutil.rmtree(target_dir)
 
-    cmdline = string.join(cmd)
+    #cmdline = string.join(cmd)
+    cmdline = " ".join(cmd)
     if os_is() == "win32":
       os.system(cmdline)
       return
@@ -643,13 +651,13 @@
         self.doxygen = "doxygen"
 
   def build_doc_common(self, infile, outfile):
-		f_input = open(infile, 'r')
-		src = f_input.read()
-		f_input.close()
-		dst = src.replace("__VERSION__", pkg_version)
-		f_output = open(outfile, 'w')
-		f_output.write(dst)
-		f_output.close()
+    f_input = open(infile, 'r')
+    src = f_input.read()
+    f_input.close()
+    dst = src.replace("__VERSION__", pkg_version)
+    f_output = open(outfile, 'w')
+    f_output.write(dst)
+    f_output.close()
   
   def run(self):
     conf_in_file = os.path.normpath(document_path + "/Doxyfile_en.in")



openrtm-commit メーリングリストの案内