[openrtm-commit:03045] r909 - in branches/RELENG_1_2/OpenRTM-aist-Python: . OpenRTM_aist OpenRTM_aist/examples/AutoTest OpenRTM_aist/examples/Composite OpenRTM_aist/examples/ConfigSample OpenRTM_aist/examples/ExtTrigger OpenRTM_aist/examples/NXTRTC OpenRTM_aist/examples/SeqIO OpenRTM_aist/examples/SimpleIO OpenRTM_aist/examples/SimpleService OpenRTM_aist/examples/Slider_and_Motor OpenRTM_aist/examples/Throughput OpenRTM_aist/examples/TkJoyStick
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 12月 27日 (水) 10:30:22 JST
Author: kawauchi
Date: 2017-12-27 10:30:22 +0900 (Wed, 27 Dec 2017)
New Revision: 909
Removed:
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/python3_examples/
Modified:
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/ModuleManager.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/AutoTestIn.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/AutoTestOut.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/ConnectTest.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/CorbaNaming.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/rtc_handle.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/rtc_handle10_11.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Composite/Controller.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Composite/Motor.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Composite/Sensor.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ConfigSample/ConfigSample.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ExtTrigger/Connector.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ExtTrigger/ConsoleIn.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ExtTrigger/ConsoleOut.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ExtTrigger/run.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTBrick.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTBrick20.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTRTC.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTRTC20.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTRTC20_callback.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTRTC_callback.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SeqIO/SeqIn.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SeqIO/SeqOut.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleIO/Connector.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleIO/ConsoleIn.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleIO/ConsoleOut.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleIO/run.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleService/MyServiceConsumer.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleService/MyServiceProvider.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleService/run.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/SliderComp.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/TkMotorComp.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/TkMotorPosComp.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/run.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/slider.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Throughput/Throughput_py.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/TkJoyStick/TkJoyStickComp.py
branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/TkJoyStick/tkjoystick.py
branches/RELENG_1_2/OpenRTM-aist-Python/setup.py
Log:
[merge] r905, 907 have been merged from trunk.
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/ModuleManager.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/ModuleManager.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/ModuleManager.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -626,7 +626,7 @@
cmd = cmd + " \""+mod_+"\""
try:
- ret = OpenRTM_aist.popen(cmd).split("\r\n")
+ ret = OpenRTM_aist.popen(cmd).split(os.linesep)
count = 0
for r in ret:
pos = r.find(":")
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/AutoTestIn.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/AutoTestIn.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/AutoTestIn.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -7,6 +7,7 @@
# @date $Date$
#
+from __future__ import print_function
import sys
import string
import time
@@ -59,7 +60,7 @@
OpenRTM_aist.CORBA_SeqUtil.push_back(self._echoList, msg)
self.__echo_msg = msg
if self._isNew:
- #print "echo's message was overwritten !!!"
+ #print("echo's message was overwritten !!!")
pass
self._isNew = True
return msg
@@ -139,7 +140,7 @@
if self._InIn.isNew() and self._SeqInIn.isNew() and self._msg:
floatdata = self._InIn.read()
fdata = "%.6f\n" % floatdata.data
- print "fdata:", fdata
+ print("fdata:", fdata)
self._file.write(fdata)
seqfloatdata = self._SeqInIn.read()
@@ -147,7 +148,7 @@
t_sdata = tuple(d for d in seqfloatdata.data)
sdata = "%.6f %.6f %.6f %.6f %.6f\n" % t_sdata
- print "sdata: ", sdata
+ print("sdata: ", sdata)
self._file.write(sdata)
self._file.write(self._msg)
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/AutoTestOut.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/AutoTestOut.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/AutoTestOut.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -9,6 +9,7 @@
"""
+from __future__ import print_function
import sys
import string
import time
@@ -85,7 +86,7 @@
try:
self._file=open('original-data')
except:
- print "Can not open 'original-data' file."
+ print("Can not open 'original-data' file.")
return RTC.RTC_ERROR
return RTC.RTC_OK
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/ConnectTest.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/ConnectTest.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/ConnectTest.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -5,21 +5,21 @@
#
## ConnectTest.py
##
-## åâ³åã³åãÚ妾åãºå¦µåã°è¼§î¸Ôå¥æåâ¹åã
+## コンポーネント接続テスト
##
-from rtc_handle10_11 import *
+from __future__ import print_function
+from rtc_handle 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()
@@ -38,7 +38,7 @@
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åá®ê¢´éð
+#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)
@@ -45,7 +45,7 @@
time.sleep(2)
##--------------------------------------------------------------------
-## åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«åã®å¥õåâ©åã«åã°ç®Ô龩
+## コネクタープロファイルデフォルト定義
g_interface_type1 = "corba_cdr"
g_dataflow_type = "push"
g_subscription_type = "flush"
@@ -54,7 +54,7 @@
g_skip_count = "4"
#g_skip_count = "0"
-## åãÚ妾åã°éʬéï·ëì®ç® ( get_ports()åâ°å£ê )
+## ポート番号指定 ( get_ports()より )
g_port1 = 0
g_port2 = 1
g_port3 = 2
@@ -65,7 +65,7 @@
## RTC.PortService ports[]
## SDOPackage.NameValue properties[]
-## åã®å¦¾åâ¿åãÚ妾åã TimedFloat
+## データポート TimedFloat
g_name1 = "out"
g_connector_id1 = "001"
g_data_type1 = "TimedFloat"
@@ -72,7 +72,7 @@
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
+## データポート TimedFloatSeq
g_name2 = "seqout"
g_connector_id2 = "002"
g_data_type2 = "TimedFloatSeq"
@@ -79,7 +79,7 @@
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"
@@ -87,7 +87,7 @@
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."
@@ -99,14 +99,14 @@
g_test_ng_message = " < received-data >"
g_mess_header = "< "
g_mess_footer = " > "
-# åã¬å¤»åã°éµÀèÛüéæªç®¹
-# èÀ)åâ±åã¼åâ¹1åà1éûÜéÖ° -> "<<< case1 count1 >>> OK."
-# èÀ)åâ±åã¼åâ¹1åà2éûÜéÖ° -> "<<< case1 count2 >>> NG detected."
+# テスト結果内容
+# 例)ケース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
@@ -136,13 +136,13 @@
##--------------------------------------------------------------------
-## éæªë¦ªñö¢ëõ°þ¾Ôç½÷èÁ¡åãÊ夣åâ¤åã«éé´ëÒ¦
+## 内部関数:受信ファイル削除
##
-## (ôÀÊð̲)
-## åáªåá
+## (引数)
+## なし
##--------------------------------------------------------------------
def delete_recv_file():
- ## åãÊ夣åâ¤åã«åá¸çÐçتåáÒå£ëꢴéð
+ ## ファイルが存在する場合
if os.path.isfile(g_diff_recv_file) == True:
os.remove(g_diff_recv_file)
return
@@ -149,11 +149,11 @@
##--------------------------------------------------------------------
-## éæªë¦ªñö¢ëõ°þ¾Ôë¢ç½÷èÁ¡åãÊ夣åâ¤åã«åá®åã®å¦¾åâ¿ì±Èê¼
+## 内部関数:送受信ファイルのデータ比較
##
-## (ôÀÊð̲)
-## åáªåá
-## (ëè»åâ´ç¤) True : èºïç´åà False : 躺æ¸ïç´
+## (引数)
+## なし
+## (戻り値) True : 一致、 False : 不一致
##--------------------------------------------------------------------
def diff_file():
bret = True
@@ -160,17 +160,17 @@
## if connect_direction == 0:
## else:
- ## ñà¢æ¿¡åãÊ夣åâ¤åã«ëü²é¨£éè¤ê°
+ ## 送信ファイル有無判定
if os.path.isfile(g_diff_send_file) == False:
- print "send_file (%s) not found." % send_file
+ 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
+ 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')
@@ -185,7 +185,7 @@
#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')
@@ -194,7 +194,7 @@
#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
@@ -207,26 +207,26 @@
return bret
##--------------------------------------------------------------------
-## åã¬å¤»åã°å¤³åã¼åâ¹íõªéï·åá®éèÚèØ¡éà¤ðªê°
-## 躴å¡ëåâ²ë£íõªåâÄ踱åá£åá¦åá¨å£ë
+## テストケース番号の初期値設定
+## 上から連番を振っている
case_no = 0
-## åâ±åã¼åâ¹ì±¼å¢°åã¬å¤»åã°çÕþëõ°
+## ケース毎のテスト回数
loop_count = 3
-## éïÎæ¿¡éá´activate_componentåá¶å£éñà¢æ¿¡éá´activate_componentåá¾åá§åá®åâ¹åãªåã¼åãÎèÑâñö(î©Äèʲ)
+## 受信側activate_componentから送信側activate_componentまでのスリープ時間(秒数)
sleep_recv_act_time = 1
-## activate_componentåá¶å£édeactivate_componentåá¾åá§åá®åâ¹åãªåã¼åãÎèÑâñö(î©Äèʲ)
+## activate_componentからdeactivate_componentまでのスリープ時間(秒数)
sleep_act_time = 10
-## foråã«åã¼åãÎ墰åâ¹åãªåã¼åãÎèÑâñö(î©Äèʲ)
+## forループのスリープ時間(秒数)
sleep_for_time = 2
-## connectåá¶å£édisconnectåá¾åá§åá®åâ¹åãªåã¼åãÎèÑâñö(î©Äèʲ)
+## connectからdisconnectまでのスリープ時間(秒数)
sleep_connect_time = 2
-# åã¬å¤»åã°éµÀèÛüåãÊ夣åâ¤åã«åá®è¿Øè¯ð
+# テスト結果ファイルの作成
fout = open(g_test_result_file, 'w')
fout.write(g_test_name + '\n')
fout.close()
@@ -235,7 +235,7 @@
time.sleep(1)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÇlush ëö¹éðÂñ¼ÓÐut->in ëî¥î¸Ô妽éè®è̯åã¬å¤»åã2
+## 接続タイプ:flush 方向:out->in 接続・切断テスト2
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -244,35 +244,35 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("flush", "", 0)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_connect_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
+ print(message)
fout.write(message + '\n')
fout.close()
@@ -279,7 +279,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÇlush ëö¹éðÂñ¼ÓÊn->out ëî¥î¸Ô妽éè®è̯åã¬å¤»åã1
+## 接続タイプ:flush 方向:in->out 接続・切断テスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -288,35 +288,35 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("flush", "", 1)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_connect_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
+ print(message)
fout.write(message + '\n')
fout.close()
@@ -323,7 +323,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÇlush ëö¹éðÂñ¼ÓÐut->in Activateåã»Deactivateåã¬å¤»åã1
+## 接続タイプ:flush 方向:out->in Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -332,27 +332,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
-## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+## 1 コネクタープロファイル設定
make_connecter_profile("flush", "", 0)
-## 3 åãÚ妾åã°è¼§î¸
-# åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+## 3 ポート接続
+# データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
-# åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+# データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
-# åâµåã¼åãÆ夻åãÚ妾åã MyService
+# サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -359,11 +359,11 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -370,30 +370,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -405,13 +405,13 @@
time.sleep(sleep_for_time)
-## 6 åãÚ妾åã°ç¯çëö
+## 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
+## 接続タイプ:flush 方向:in->out Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -420,27 +420,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
-## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+## 1 コネクタープロファイル設定
make_connecter_profile("flush", "", 1)
-## 3 åãÚ妾åã°è¼§î¸
-# åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+## 3 ポート接続
+# データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
-# åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+# データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
-# åâµåã¼åãÆ夻åãÚ妾åã MyService
+# サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -447,11 +447,11 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -458,30 +458,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -493,13 +493,13 @@
time.sleep(sleep_for_time)
-## 6 åãÚ妾åã°ç¯çëö
+## 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
+## 接続タイプ:flush 方向:out->in Activate・Deactivateテスト10
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -508,14 +508,14 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("flush", "", 0)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -522,15 +522,15 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
+ print(message)
fout.write(message + '\n')
fout.close()
@@ -537,7 +537,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÇlush ëö¹éðÂñ¼ÓÐut->in ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã1
+## 接続タイプ:flush 方向:out->in 接続・切断・Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -546,27 +546,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("flush", "", 0)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -573,16 +573,16 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -589,30 +589,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -625,7 +625,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÇlush ëö¹éðÂñ¼ÓÊn->out ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã1
+## 接続タイプ:flush 方向:in->out 接続・切断・Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -634,27 +634,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("flush", "", 1)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -661,16 +661,16 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -677,30 +677,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -713,7 +713,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÇlush ëö¹éðÂñ¼ÓÐut->in ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã2
+## 接続タイプ:flush 方向:out->in 接続・切断・Activate・Deactivateテスト2
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -722,27 +722,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("flush", "", 0)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -749,16 +749,16 @@
time.sleep(sleep_act_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -765,30 +765,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -801,7 +801,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÇlush ëö¹éðÂñ¼ÓÊn->out ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã2
+## 接続タイプ:flush 方向:in->out 接続・切断・Activate・Deactivateテスト2
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -810,27 +810,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("flush", "", 1)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -837,16 +837,16 @@
time.sleep(sleep_act_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -853,30 +853,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -890,9 +890,9 @@
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÇlush ëö¹éðÂñ¼ÓÐut->in ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã3
+## 接続タイプ:flush 方向:out->in 接続・切断・Activate・Deactivateテスト3
##--------------------------------------------------------------------
-## ã÷¾è³¨ëä¾ñ¼Ó¢ctivateåâÄç©èåá«ð£¸å¢¥åá¦åá¨å£ëíâºåà¢ç½÷èÁ¡åã®å¦¾åâ¿åá¯ñàÈæ¸åá¶å£éåá®éæªç®¹åá«åáªåâ´å¢ÀåáÒå
+## ●注意:Activateを先に行っている為、受信データは途中からの内容になります。
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
message = g_mess_header + g_test_case + str(case_no) + " "
@@ -900,43 +900,43 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("flush", "", 0)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -943,30 +943,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -979,9 +979,9 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÇlush ëö¹éðÂñ¼ÓÊn->out ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã3
+## 接続タイプ:flush 方向:in->out 接続・切断・Activate・Deactivateテスト3
##--------------------------------------------------------------------
-## ã÷¾è³¨ëä¾ñ¼Ó¢ctivateåâÄç©èåá«ð£¸å¢¥åá¦åá¨å£ëíâºåà¢ç½÷èÁ¡åã®å¦¾åâ¿åá¯ñàÈæ¸åá¶å£éåá®éæªç®¹åá«åáªåâ´å¢ÀåáÒå
+## ●注意:Activateを先に行っている為、受信データは途中からの内容になります。
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
message = g_mess_header + g_test_case + str(case_no) + " "
@@ -989,43 +989,43 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("flush", "", 1)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -1032,30 +1032,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -1068,9 +1068,9 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÇlush ëö¹éðÂñ¼ÓÐut->in ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã4
+## 接続タイプ:flush 方向:out->in 接続・切断・Activate・Deactivateテスト4
##--------------------------------------------------------------------
-## ã÷¾è³¨ëä¾ñ¼Ó¢ctivateåâÄç©èåá«ð£¸å¢¥åá¦åá¨å£ëíâºåà¢ç½÷èÁ¡åã®å¦¾åâ¿åá¯ñàÈæ¸åá¶å£éåá®éæªç®¹åá«åáªåâ´å¢ÀåáÒå
+## ●注意:Activateを先に行っている為、受信データは途中からの内容になります。
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
message = g_mess_header + g_test_case + str(case_no) + " "
@@ -1078,43 +1078,43 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("flush", "", 0)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_act_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -1121,30 +1121,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -1157,9 +1157,9 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÇlush ëö¹éðÂñ¼ÓÊn->out ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã4
+## 接続タイプ:flush 方向:in->out 接続・切断・Activate・Deactivateテスト4
##--------------------------------------------------------------------
-## ã÷¾è³¨ëä¾ñ¼Ó¢ctivateåâÄç©èåá«ð£¸å¢¥åá¦åá¨å£ëíâºåà¢ç½÷èÁ¡åã®å¦¾åâ¿åá¯ñàÈæ¸åá¶å£éåá®éæªç®¹åá«åáªåâ´å¢ÀåáÒå
+## ●注意:Activateを先に行っている為、受信データは途中からの内容になります。
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
message = g_mess_header + g_test_case + str(case_no) + " "
@@ -1167,43 +1167,43 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("flush", "", 1)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_act_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -1210,30 +1210,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -1247,7 +1247,7 @@
##--------------------------------------------------------------------
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÏew ëö¹éðÂñ¼ÓÐut->in åãÚ妬åâ·åã¼þ¾Ó¢LL ëî¥î¸Ô妽éè®è̯åã¬å¤»åã3
+## 接続タイプ:new 方向:out->in ポリシー:ALL 接続・切断テスト3
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -1256,35 +1256,35 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("new", "ALL", 0)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_connect_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
+ print(message)
fout.write(message + '\n')
fout.close()
@@ -1291,7 +1291,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÏew ëö¹éðÂñ¼ÓÐut->in åãÚ妬åâ·åã¼þ¾Ó§IFO ëî¥î¸Ô妽éè®è̯åã¬å¤»åã4
+## 接続タイプ:new 方向:out->in ポリシー:FIFO 接続・切断テスト4
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -1300,35 +1300,35 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("new", "FIFO", 0)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_connect_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
+ print(message)
fout.write(message + '\n')
fout.close()
@@ -1335,7 +1335,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÏew ëö¹éðÂñ¼ÓÐut->in åãÚ妬åâ·åã¼þ¾Ó¯EW ëî¥î¸Ô妽éè®è̯åã¬å¤»åã6
+## 接続タイプ:new 方向:out->in ポリシー:NEW 接続・切断テスト6
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -1344,35 +1344,35 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("new", "NEW", 0)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_connect_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
+ print(message)
fout.write(message + '\n')
fout.close()
@@ -1379,7 +1379,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÏew ëö¹éðÂñ¼ÓÐut->in åãÚ妬åâ·åã¼þ¾Ó´KIP ëî¥î¸Ô妽éè®è̯åã¬å¤»åã5
+## 接続タイプ:new 方向:out->in ポリシー:SKIP 接続・切断テスト5
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -1388,35 +1388,35 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("new", "SKIP", 0)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_connect_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
+ print(message)
fout.write(message + '\n')
fout.close()
@@ -1423,7 +1423,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÏew ëö¹éðÂñ¼ÓÊn->out åãÚ妬åâ·åã¼þ¾Ó¢LL ëî¥î¸Ô妽éè®è̯åã¬å¤»åã3
+## 接続タイプ:new 方向:in->out ポリシー:ALL 接続・切断テスト3
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -1432,35 +1432,35 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("new", "ALL", 1)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_connect_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
+ print(message)
fout.write(message + '\n')
fout.close()
@@ -1467,7 +1467,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÏew ëö¹éðÂñ¼ÓÊn->out åãÚ妬åâ·åã¼þ¾Ó§IFO ëî¥î¸Ô妽éè®è̯åã¬å¤»åã4
+## 接続タイプ:new 方向:in->out ポリシー:FIFO 接続・切断テスト4
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -1476,35 +1476,35 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("new", "FIFO", 1)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_connect_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
+ print(message)
fout.write(message + '\n')
fout.close()
@@ -1511,7 +1511,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÏew ëö¹éðÂñ¼ÓÊn->out åãÚ妬åâ·åã¼þ¾Ó¯EW ëî¥î¸Ô妽éè®è̯åã¬å¤»åã6
+## 接続タイプ:new 方向:in->out ポリシー:NEW 接続・切断テスト6
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -1520,35 +1520,35 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("new", "NEW", 1)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_connect_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
+ print(message)
fout.write(message + '\n')
fout.close()
@@ -1555,7 +1555,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÏew ëö¹éðÂñ¼ÓÊn->out åãÚ妬åâ·åã¼þ¾Ó´KIP ëî¥î¸Ô妽éè®è̯åã¬å¤»åã5
+## 接続タイプ:new 方向:in->out ポリシー:SKIP 接続・切断テスト5
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -1564,35 +1564,35 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("new", "SKIP", 1)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_connect_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
+ print(message)
fout.write(message + '\n')
fout.close()
@@ -1599,7 +1599,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÏew ëö¹éðÂñ¼ÓÐut->in åãÚ妬åâ·åã¼þ¾Ó¢LL Activateåã»Deactivateåã¬å¤»åã2
+## 接続タイプ:new 方向:out->in ポリシー:ALL Activate・Deactivateテスト2
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -1608,27 +1608,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
-## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+## 1 コネクタープロファイル設定
make_connecter_profile("new", "ALL", 0)
-## 3 åãÚ妾åã°è¼§î¸
-# åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+## 3 ポート接続
+# データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
-# åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+# データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
-# åâµåã¼åãÆ夻åãÚ妾åã MyService
+# サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -1635,11 +1635,11 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -1646,30 +1646,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -1681,13 +1681,13 @@
time.sleep(sleep_for_time)
-## 6 åãÚ妾åã°ç¯çëö
+## 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
+## 接続タイプ:new 方向:out->in ポリシー:FIFO Activate・Deactivateテスト3
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -1696,27 +1696,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
-## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+## 1 コネクタープロファイル設定
make_connecter_profile("new", "FIFO", 0)
-## 3 åãÚ妾åã°è¼§î¸
-# åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+## 3 ポート接続
+# データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
-# åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+# データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
-# åâµåã¼åãÆ夻åãÚ妾åã MyService
+# サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -1723,11 +1723,11 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -1734,30 +1734,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -1769,13 +1769,13 @@
time.sleep(sleep_for_time)
-## 6 åãÚ妾åã°ç¯çëö
+## 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
+## 接続タイプ:new 方向:out->in ポリシー:NEW Activate・Deactivateテスト5
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -1784,27 +1784,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
-## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+## 1 コネクタープロファイル設定
make_connecter_profile("new", "NEW", 0)
-## 3 åãÚ妾åã°è¼§î¸
-# åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+## 3 ポート接続
+# データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
-# åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+# データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
-# åâµåã¼åãÆ夻åãÚ妾åã MyService
+# サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -1811,11 +1811,11 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -1822,30 +1822,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -1857,13 +1857,13 @@
time.sleep(sleep_for_time)
-## 6 åãÚ妾åã°ç¯çëö
+## 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
+## 接続タイプ:new 方向:out->in ポリシー:SKIP Activate・Deactivateテスト4
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -1872,27 +1872,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
-## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+## 1 コネクタープロファイル設定
make_connecter_profile("new", "SKIP", 0)
-## 3 åãÚ妾åã°è¼§î¸
-# åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+## 3 ポート接続
+# データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
-# åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+# データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
-# åâµåã¼åãÆ夻åãÚ妾åã MyService
+# サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -1899,11 +1899,11 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -1910,30 +1910,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -1945,13 +1945,13 @@
time.sleep(sleep_for_time)
-## 6 åãÚ妾åã°ç¯çëö
+## 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
+## 接続タイプ:new 方向:in->out ポリシー:ALL Activate・Deactivateテスト2
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -1960,27 +1960,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
-## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+## 1 コネクタープロファイル設定
make_connecter_profile("new", "ALL", 1)
-## 3 åãÚ妾åã°è¼§î¸
-# åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+## 3 ポート接続
+# データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
-# åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+# データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
-# åâµåã¼åãÆ夻åãÚ妾åã MyService
+# サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -1987,11 +1987,11 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -1998,30 +1998,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -2033,13 +2033,13 @@
time.sleep(sleep_for_time)
-## 6 åãÚ妾åã°ç¯çëö
+## 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
+## 接続タイプ:new 方向:in->out ポリシー:FIFO Activate・Deactivateテスト3
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -2048,27 +2048,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
-## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+## 1 コネクタープロファイル設定
make_connecter_profile("new", "FIFO", 1)
-## 3 åãÚ妾åã°è¼§î¸
-# åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+## 3 ポート接続
+# データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
-# åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+# データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
-# åâµåã¼åãÆ夻åãÚ妾åã MyService
+# サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -2075,11 +2075,11 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -2086,30 +2086,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -2121,13 +2121,13 @@
time.sleep(sleep_for_time)
-## 6 åãÚ妾åã°ç¯çëö
+## 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
+## 接続タイプ:new 方向:in->out ポリシー:NEW Activate・Deactivateテスト5
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -2136,27 +2136,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
-## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+## 1 コネクタープロファイル設定
make_connecter_profile("new", "NEW", 1)
-## 3 åãÚ妾åã°è¼§î¸
-# åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+## 3 ポート接続
+# データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
-# åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+# データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
-# åâµåã¼åãÆ夻åãÚ妾åã MyService
+# サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -2163,11 +2163,11 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -2174,30 +2174,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -2209,13 +2209,13 @@
time.sleep(sleep_for_time)
-## 6 åãÚ妾åã°ç¯çëö
+## 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
+## 接続タイプ:new 方向:in->out ポリシー:SKIP Activate・Deactivateテスト4
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -2224,27 +2224,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
-## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+## 1 コネクタープロファイル設定
make_connecter_profile("new", "SKIP", 1)
-## 3 åãÚ妾åã°è¼§î¸
-# åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+## 3 ポート接続
+# データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
-# åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+# データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
-# åâµåã¼åãÆ夻åãÚ妾åã MyService
+# サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -2251,11 +2251,11 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -2262,30 +2262,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -2297,13 +2297,13 @@
time.sleep(sleep_for_time)
-## 6 åãÚ妾åã°ç¯çëö
+## 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
+## 接続タイプ:new 方向:out->in ポリシー:ALL 接続・切断・Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -2312,27 +2312,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("new", "ALL", 0)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -2339,16 +2339,16 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -2355,30 +2355,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -2391,7 +2391,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÏew ëö¹éðÂñ¼ÓÐut->in åãÚ妬åâ·åã¼þ¾Ó§IFO ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã1
+## 接続タイプ:new 方向:out->in ポリシー:FIFO 接続・切断・Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -2400,27 +2400,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("new", "FIFO", 0)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -2427,16 +2427,16 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -2443,30 +2443,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -2479,7 +2479,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÏew ëö¹éðÂñ¼ÓÐut->in åãÚ妬åâ·åã¼þ¾Ó¯EW ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã1
+## 接続タイプ:new 方向:out->in ポリシー:NEW 接続・切断・Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -2488,27 +2488,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("new", "NEW", 0)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -2515,16 +2515,16 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -2531,30 +2531,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -2567,7 +2567,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÏew ëö¹éðÂñ¼ÓÐut->in åãÚ妬åâ·åã¼þ¾Ó´KIP ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã1
+## 接続タイプ:new 方向:out->in ポリシー:SKIP 接続・切断・Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -2576,27 +2576,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("new", "SKIP", 0)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -2603,16 +2603,16 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -2619,30 +2619,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -2655,7 +2655,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÏew ëö¹éðÂñ¼ÓÊn->out åãÚ妬åâ·åã¼þ¾Ó¢LL ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã1
+## 接続タイプ:new 方向:in->out ポリシー:ALL 接続・切断・Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -2664,27 +2664,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("new", "ALL", 1)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -2691,16 +2691,16 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -2707,30 +2707,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -2743,7 +2743,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÏew ëö¹éðÂñ¼ÓÊn->out åãÚ妬åâ·åã¼þ¾Ó§IFO ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã1
+## 接続タイプ:new 方向:in->out ポリシー:FIFO 接続・切断・Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -2752,27 +2752,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("new", "FIFO", 1)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -2779,16 +2779,16 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -2795,30 +2795,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -2831,7 +2831,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÏew ëö¹éðÂñ¼ÓÊn->out åãÚ妬åâ·åã¼þ¾Ó¯EW ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã1
+## 接続タイプ:new 方向:in->out ポリシー:NEW 接続・切断・Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -2840,27 +2840,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("new", "NEW", 1)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -2867,16 +2867,16 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -2883,30 +2883,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -2919,7 +2919,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÏew ëö¹éðÂñ¼ÓÊn->out åãÚ妬åâ·åã¼þ¾Ó´KIP ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã1
+## 接続タイプ:new 方向:in->out ポリシー:SKIP 接続・切断・Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -2928,27 +2928,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("new", "SKIP", 1)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -2955,16 +2955,16 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -2971,30 +2971,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -3008,7 +3008,7 @@
##--------------------------------------------------------------------
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÑeriodic ëö¹éðÂñ¼ÓÐut->in åãÚ妬åâ·åã¼þ¾Ó¢LL ëî¥î¸Ô妽éè®è̯åã¬å¤»åã7
+## 接続タイプ:periodic 方向:out->in ポリシー:ALL 接続・切断テスト7
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -3017,35 +3017,35 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "ALL", 0)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_connect_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
+ print(message)
fout.write(message + '\n')
fout.close()
@@ -3052,7 +3052,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÑeriodic ëö¹éðÂñ¼ÓÐut->in åãÚ妬åâ·åã¼þ¾Ó§IFO ëî¥î¸Ô妽éè®è̯åã¬å¤»åã8
+## 接続タイプ:periodic 方向:out->in ポリシー:FIFO 接続・切断テスト8
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -3061,35 +3061,35 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "FIFO", 0)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_connect_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
+ print(message)
fout.write(message + '\n')
fout.close()
@@ -3096,7 +3096,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÑeriodic ëö¹éðÂñ¼ÓÐut->in åãÚ妬åâ·åã¼þ¾Ó¯EW ëî¥î¸Ô妽éè®è̯åã¬å¤»åã10
+## 接続タイプ:periodic 方向:out->in ポリシー:NEW 接続・切断テスト10
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -3105,35 +3105,35 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "NEW", 0)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_connect_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
+ print(message)
fout.write(message + '\n')
fout.close()
@@ -3140,7 +3140,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÑeriodic ëö¹éðÂñ¼ÓÐut->in åãÚ妬åâ·åã¼þ¾Ó´KIP ëî¥î¸Ô妽éè®è̯åã¬å¤»åã9
+## 接続タイプ:periodic 方向:out->in ポリシー:SKIP 接続・切断テスト9
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -3149,35 +3149,35 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "SKIP", 0)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_connect_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
+ print(message)
fout.write(message + '\n')
fout.close()
@@ -3184,7 +3184,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÑeriodic ëö¹éðÂñ¼ÓÊn->out åãÚ妬åâ·åã¼þ¾Ó¢LL ëî¥î¸Ô妽éè®è̯åã¬å¤»åã7
+## 接続タイプ:periodic 方向:in->out ポリシー:ALL 接続・切断テスト7
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -3193,35 +3193,35 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "ALL", 1)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_connect_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
+ print(message)
fout.write(message + '\n')
fout.close()
@@ -3228,7 +3228,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÑeriodic ëö¹éðÂñ¼ÓÊn->out åãÚ妬åâ·åã¼þ¾Ó§IFO ëî¥î¸Ô妽éè®è̯åã¬å¤»åã8
+## 接続タイプ:periodic 方向:in->out ポリシー:FIFO 接続・切断テスト8
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -3237,35 +3237,35 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "FIFO", 1)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_connect_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
+ print(message)
fout.write(message + '\n')
fout.close()
@@ -3272,7 +3272,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÑeriodic ëö¹éðÂñ¼ÓÊn->out åãÚ妬åâ·åã¼þ¾Ó¯EW ëî¥î¸Ô妽éè®è̯åã¬å¤»åã10
+## 接続タイプ:periodic 方向:in->out ポリシー:NEW 接続・切断テスト10
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -3281,35 +3281,35 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "NEW", 1)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_connect_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
+ print(message)
fout.write(message + '\n')
fout.close()
@@ -3316,7 +3316,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÑeriodic ëö¹éðÂñ¼ÓÊn->out åãÚ妬åâ·åã¼þ¾Ó´KIP ëî¥î¸Ô妽éè®è̯åã¬å¤»åã9
+## 接続タイプ:periodic 方向:in->out ポリシー:SKIP 接続・切断テスト9
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -3325,35 +3325,35 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "SKIP", 1)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
time.sleep(sleep_connect_time)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
+ print(message)
fout.write(message + '\n')
fout.close()
@@ -3360,7 +3360,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÑeriodic ëö¹éðÂñ¼ÓÐut->in åãÚ妬åâ·åã¼þ¾Ó¢LL Activateåã»Deactivateåã¬å¤»åã6
+## 接続タイプ:periodic 方向:out->in ポリシー:ALL Activate・Deactivateテスト6
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -3369,27 +3369,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
-## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "ALL", 0)
-## 3 åãÚ妾åã°è¼§î¸
-# åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+## 3 ポート接続
+# データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
-# åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+# データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
-# åâµåã¼åãÆ夻åãÚ妾åã MyService
+# サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -3396,11 +3396,11 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -3407,30 +3407,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -3442,13 +3442,13 @@
time.sleep(sleep_for_time)
-## 6 åãÚ妾åã°ç¯çëö
+## 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
+## 接続タイプ:periodic 方向:out->in ポリシー:FIFO Activate・Deactivateテスト7
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -3457,27 +3457,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
-## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "FIFO", 0)
-## 3 åãÚ妾åã°è¼§î¸
-# åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+## 3 ポート接続
+# データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
-# åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+# データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
-# åâµåã¼åãÆ夻åãÚ妾åã MyService
+# サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -3484,11 +3484,11 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -3495,30 +3495,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -3530,13 +3530,13 @@
time.sleep(sleep_for_time)
-## 6 åãÚ妾åã°ç¯çëö
+## 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
+## 接続タイプ:periodic 方向:out->in ポリシー:NEW Activate・Deactivateテスト9
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -3545,27 +3545,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
-## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "NEW", 0)
-## 3 åãÚ妾åã°è¼§î¸
-# åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+## 3 ポート接続
+# データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
-# åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+# データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
-# åâµåã¼åãÆ夻åãÚ妾åã MyService
+# サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -3572,11 +3572,11 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -3583,30 +3583,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -3618,13 +3618,13 @@
time.sleep(sleep_for_time)
-## 6 åãÚ妾åã°ç¯çëö
+## 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
+## 接続タイプ:periodic 方向:out->in ポリシー:SKIP Activate・Deactivateテスト8
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -3633,27 +3633,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
-## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "SKIP", 0)
-## 3 åãÚ妾åã°è¼§î¸
-# åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+## 3 ポート接続
+# データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
-# åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+# データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
-# åâµåã¼åãÆ夻åãÚ妾åã MyService
+# サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -3660,11 +3660,11 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -3671,30 +3671,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -3706,13 +3706,13 @@
time.sleep(sleep_for_time)
-## 6 åãÚ妾åã°ç¯çëö
+## 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
+## 接続タイプ:periodic 方向:in->out ポリシー:ALL Activate・Deactivateテスト6
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -3721,27 +3721,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
-## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "ALL", 1)
-## 3 åãÚ妾åã°è¼§î¸
-# åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+## 3 ポート接続
+# データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
-# åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+# データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
-# åâµåã¼åãÆ夻åãÚ妾åã MyService
+# サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -3748,11 +3748,11 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -3759,30 +3759,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -3794,13 +3794,13 @@
time.sleep(sleep_for_time)
-## 6 åãÚ妾åã°ç¯çëö
+## 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
+## 接続タイプ:periodic 方向:in->out ポリシー:FIFO Activate・Deactivateテスト7
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -3809,27 +3809,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
-## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "FIFO", 1)
-## 3 åãÚ妾åã°è¼§î¸
-# åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+## 3 ポート接続
+# データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
-# åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+# データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
-# åâµåã¼åãÆ夻åãÚ妾åã MyService
+# サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -3836,11 +3836,11 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -3847,30 +3847,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -3882,13 +3882,13 @@
time.sleep(sleep_for_time)
-## 6 åãÚ妾åã°ç¯çëö
+## 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
+## 接続タイプ:periodic 方向:in->out ポリシー:NEW Activate・Deactivateテスト9
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -3897,27 +3897,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
-## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "NEW", 1)
-## 3 åãÚ妾åã°è¼§î¸
-# åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+## 3 ポート接続
+# データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
-# åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+# データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
-# åâµåã¼åãÆ夻åãÚ妾åã MyService
+# サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -3924,11 +3924,11 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -3935,30 +3935,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -3970,13 +3970,13 @@
time.sleep(sleep_for_time)
-## 6 åãÚ妾åã°ç¯çëö
+## 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
+## 接続タイプ:periodic 方向:in->out ポリシー:SKIP Activate・Deactivateテスト8
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -3985,27 +3985,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
-## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "SKIP", 1)
-## 3 åãÚ妾åã°è¼§î¸
-# åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+## 3 ポート接続
+# データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
-# åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+# データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
-# åâµåã¼åãÆ夻åãÚ妾åã MyService
+# サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -4012,11 +4012,11 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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
@@ -4023,30 +4023,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -4058,13 +4058,13 @@
time.sleep(sleep_for_time)
-## 6 åãÚ妾åã°ç¯çëö
+## 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
+## 接続タイプ:periodic 方向:out->in ポリシー:ALL 接続・切断・Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -4073,27 +4073,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "ALL", 0)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -4100,16 +4100,16 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -4116,30 +4116,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -4152,7 +4152,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÑeriodic ëö¹éðÂñ¼ÓÐut->in åãÚ妬åâ·åã¼þ¾Ó§IFO ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã1
+## 接続タイプ:periodic 方向:out->in ポリシー:FIFO 接続・切断・Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -4161,27 +4161,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "FIFO", 0)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -4188,16 +4188,16 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -4204,30 +4204,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -4240,7 +4240,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÑeriodic ëö¹éðÂñ¼ÓÐut->in åãÚ妬åâ·åã¼þ¾Ó¯EW ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã1
+## 接続タイプ:periodic 方向:out->in ポリシー:NEW 接続・切断・Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -4249,27 +4249,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "NEW", 0)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -4276,16 +4276,16 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -4292,30 +4292,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -4328,7 +4328,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÑeriodic ëö¹éðÂñ¼ÓÐut->in åãÚ妬åâ·åã¼þ¾Ó´KIP ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã1
+## 接続タイプ:periodic 方向:out->in ポリシー:SKIP 接続・切断・Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -4337,27 +4337,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "SKIP", 0)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -4364,16 +4364,16 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -4380,30 +4380,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -4416,7 +4416,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÑeriodic ëö¹éðÂñ¼ÓÊn->out åãÚ妬åâ·åã¼þ¾Ó¢LL ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã1
+## 接続タイプ:periodic 方向:in->out ポリシー:ALL 接続・切断・Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -4425,27 +4425,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "ALL", 1)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -4452,16 +4452,16 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -4468,30 +4468,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -4504,7 +4504,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÑeriodic ëö¹éðÂñ¼ÓÊn->out åãÚ妬åâ·åã¼þ¾Ó§IFO ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã1
+## 接続タイプ:periodic 方向:in->out ポリシー:FIFO 接続・切断・Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -4513,27 +4513,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "FIFO", 1)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -4540,16 +4540,16 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -4556,30 +4556,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -4592,7 +4592,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÑeriodic ëö¹éðÂñ¼ÓÊn->out åãÚ妬åâ·åã¼þ¾Ó¯EW ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã1
+## 接続タイプ:periodic 方向:in->out ポリシー:NEW 接続・切断・Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -4601,27 +4601,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "NEW", 1)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -4628,16 +4628,16 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -4644,30 +4644,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -4680,7 +4680,7 @@
time.sleep(sleep_for_time)
##--------------------------------------------------------------------
-## ëî¥î¸Ôå¤Áåâ¤åãÎñ¼ÓÑeriodic ëö¹éðÂñ¼ÓÊn->out åãÚ妬åâ·åã¼þ¾Ó´KIP ëî¥î¸Ô妽éè®è̯åã»Activateåã»Deactivateåã¬å¤»åã1
+## 接続タイプ:periodic 方向:in->out ポリシー:SKIP 接続・切断・Activate・Deactivateテスト1
##--------------------------------------------------------------------
case_no = case_no + 1
fout = open(g_test_result_file, 'a')
@@ -4689,27 +4689,27 @@
message = message + g_mess_footer
fout.write(message + '\n')
fout.close()
-print message
+print(message)
for i in range(loop_count):
- ## 2 éïÎæ¿¡åã®å¦¾åâ¿åãÊ夣åâ¤åã«éé´ëÒ¦
+ ## 2 受信データファイル削除
delete_recv_file()
- ## 1 åâ³åãºå¤±åâ¿åã¼åãÎ妯åãÊ夣åâ¤åã«ðªê°
+ ## 1 コネクタープロファイル設定
make_connecter_profile("periodic", "SKIP", 1)
- ## 3 åãÚ妾åã°è¼§î¸
- # åã®å¦¾åâ¿åãÚ妾åã1 TimedFloat
+ ## 3 ポート接続
+ # データポート1 TimedFloat
ret0 = g_out_ports[g_port1].connect(g_conprof1)
- # åã®å¦¾åâ¿åãÚ妾åã2 TimedFloatSeq
+ # データポート2 TimedFloatSeq
ret1 = g_out_ports[g_port2].connect(g_conprof2)
- # åâµåã¼åãÆ夻åãÚ妾åã MyService
+ # サービスポート MyService
ret2 = g_out_ports[g_port3].connect(g_conprof3)
- ## 4 åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 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)
@@ -4716,16 +4716,16 @@
time.sleep(sleep_act_time)
- ## 5 åã®å¤¥åâ¢åâ¯åã¬å¤¥åãÒ妾åã
+ ## 5 ディアクティベート
ec_send[0].deactivate_component(g_compo_send.rtc_ref)
ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
- ## 6 åãÚ妾åã°ç¯çëö
+ ## 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
@@ -4732,30 +4732,30 @@
message = message + g_check_message
fout.write(message + '\n')
fout.close()
- print message
+ print(message)
time.sleep(sleep_for_time)
continue
- ## 7 ñà¢ç½÷èÁ¡åã®å¦¾åâ¿ì±Èê¼
+ ## 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 åáªåâ²ë¢ç½÷èÁ¡åã®å¦¾åâ¿èºïç´
+ # bret==True なら送受信データ一致
if bret == True:
- # åã¬å¤»åã°éµÀèÛü OK
+ # テスト結果 OK
message = message + g_test_ok
- print message
+ print(message)
fout.write(message + '\n')
else:
- # åã¬å¤»åã°éµÀèÛü NG
+ # テスト結果 NG
message = message + g_test_ng
- print message
+ print(message)
message = message + g_test_ng_message
fout.write(message + '\n')
- # éïÎæ¿¡åã®å¦¾åâ¿åâÄå¥æåâ¹åã°éµÀèÛüåãÊ夣åâ¤åã«åá¸åâ³åãÈ妾
+ # 受信データをテスト結果ファイルへコピー
fin2 = open(g_diff_recv_file, 'r')
while(1):
s2 = fin2.readline()
@@ -4767,4 +4767,4 @@
time.sleep(sleep_for_time)
-print "Test Complete."
+print("Test Complete.")
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/CorbaNaming.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/CorbaNaming.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/CorbaNaming.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -15,6 +15,7 @@
# Advanced Industrial Science and Technology (AIST), Japan
# All rights reserved.
+from __future__ import print_function
import omniORB.CORBA as CORBA
import CosNaming
import string
@@ -90,11 +91,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
@@ -875,7 +876,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 = ""
@@ -1207,7 +1208,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
@@ -1237,10 +1238,10 @@
# @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: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/rtc_handle.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/rtc_handle.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/rtc_handle.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
from omniORB import CORBA, URI
from omniORB import any
@@ -80,10 +81,10 @@
return rslt
def proc_bd(self, bd, name_context, parent) :
-# print '-------------------------------------------------------------------'
-# print 'bd= ', bd
-# print 'name_context= ', name_context
-# print 'parent= ', parent
+# print('-------------------------------------------------------------------')
+# print('bd= ', bd)
+# print('name_context= ', name_context)
+# print('parent= ', parent)
rslt = []
pre = ""
if parent :
@@ -92,21 +93,21 @@
if bd.binding_type == CosNaming.nobject :
tmp = name_context.resolve(bd.binding_name)
self.obj_list[nam]=tmp
- print 'objcet '+nam+' was listed.'
+ print('objcet '+nam+' was listed.')
try :
tmp = tmp._narrow(RTC.RTObject)
except :
- print nam+' is not RTC.'
+ 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.'
+ print('handle for '+nam+' was created.')
else :
pass
except :
- print nam+' is not alive.'
+ print(nam+' is not alive.')
pass
else :
tmp = name_context.resolve(bd.binding_name)
@@ -284,7 +285,7 @@
if self.ref :
return self.ref.get().value()
else :
- print "not supported"
+ print("not supported")
return None
#
# RtcHandle
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/rtc_handle10_11.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/rtc_handle10_11.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/AutoTest/rtc_handle10_11.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
from omniORB import CORBA, URI
# from omniORB import any
@@ -82,10 +83,10 @@
return rslt
def proc_bd(self, bd, name_context, parent) :
-# print '-------------------------------------------------------------------'
-# print 'bd= ', bd
-# print 'name_context= ', name_context
-# print 'parent= ', parent
+# print('-------------------------------------------------------------------')
+# print('bd= ', bd)
+# print('name_context= ', name_context)
+# print('parent= ', parent)
rslt = []
pre = ""
if parent :
@@ -94,21 +95,21 @@
if bd.binding_type == CosNaming.nobject :
tmp = name_context.resolve(bd.binding_name)
self.obj_list[nam]=tmp
- print 'objcet '+nam+' was listed.'
+ print('objcet '+nam+' was listed.')
try :
tmp = tmp._narrow(RTC.RTObject)
except :
- print nam+' is not RTC.'
+ 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.'
+ print('handle for '+nam+' was created.')
else :
pass
except :
- print nam+' is not alive.' , sys.exc_info()[0]
+ print(nam+' is not alive.' , sys.exc_info()[0])
pass
else :
tmp = name_context.resolve(bd.binding_name)
@@ -159,7 +160,7 @@
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]
+ print(kk, self.prop_dict_req[kk])
self.prop_dict_req[kk] = ""
self.possible = False
self.prop_nvlist_req = dict2nvlist(self.prop_dict_req)
@@ -218,7 +219,7 @@
tmp1 = self.get_connections()
tmp2 = [pp.connector_id for pp in tmp1]
if self.con.profile.connector_id in tmp2 :
- print "connecting"
+ print("connecting")
self.con.disconnect()
def get_connections(self) :
@@ -303,7 +304,7 @@
# 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
+ print(tmp)
self.data_class = eval('RTC.' + tmp)
self.data_tc = eval('RTC._tc_' + tmp)
def write(self,data) :
@@ -349,7 +350,7 @@
except :
return None
else :
- print "not supported"
+ print("not supported")
return None
def open(self) :
@@ -399,7 +400,7 @@
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
+ 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)
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Composite/Controller.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Composite/Controller.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Composite/Controller.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
import time
sys.path.append(".")
@@ -45,7 +46,7 @@
def onExecute(self, ec_id):
if self._inIn.isNew():
data = self._inIn.read()
- print "Controller Received data: ", data.data
+ print("Controller Received data: ", data.data)
self._d_out.data = data.data *2
self._outOut.write()
return RTC.RTC_OK
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Composite/Motor.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Composite/Motor.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Composite/Motor.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
import time
sys.path.append(".")
@@ -51,8 +52,8 @@
def onExecute(self, ec_id):
if self._inIn.isNew():
data = self._inIn.read()
- print "Motor Received data: ", data.data
- self._d_out.data = long(data.data *2)
+ print("Motor Received data: ", data.data)
+ self._d_out.data = int(data.data *2)
self._outOut.write()
return RTC.RTC_OK
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Composite/Sensor.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Composite/Sensor.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Composite/Sensor.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
import time
sys.path.append(".")
@@ -45,7 +46,7 @@
def onExecute(self, ec_id):
if self._inIn.isNew():
data = self._inIn.read()
- print "Sensor Received data: ", data.data
+ print("Sensor Received data: ", data.data)
self._d_out.data = data.data *2
self._outOut.write()
return RTC.RTC_OK
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ConfigSample/ConfigSample.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ConfigSample/ConfigSample.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ConfigSample/ConfigSample.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
import time
@@ -42,7 +43,7 @@
pass
def __call__(self, config_set_name, config_param_name):
- print "Changed config_set_name: ", config_set_name, " config_param_name: ", config_param_name
+ print("Changed config_set_name: ", config_set_name, " config_param_name: ", config_param_name)
return
@@ -50,7 +51,7 @@
# class constructor
def __init__(self, manager):
OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
- print "ConfigSample constructor."
+ print("ConfigSample constructor.")
self._int_param0 = [0]
self._int_param1 = [1]
self._double_param0 = [0.11]
@@ -71,7 +72,7 @@
self.addConfigurationParamListener(OpenRTM_aist.ConfigurationParamListenerType.ON_UPDATE_CONFIG_PARAM,
MyConfigurationParamListner())
- print "\n Please change configuration values from RtcLink"
+ print("\n Please change configuration values from RtcLink")
return RTC.RTC_OK
@@ -81,21 +82,21 @@
curlen = 0
c = " "
- print "---------------------------------------"
- print " Active Configuration Set: ", self._configsets.getActiveId(),c
- print "---------------------------------------"
+ 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
+ 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("vector_param0[", idx, "]: ", self._vector_param0[0][idx], c)
- print "---------------------------------------"
+ print("---------------------------------------")
curlen = len(self._vector_param0[0])
@@ -105,14 +106,14 @@
maxlen = curlen
for idx in range(maxlen - curlen):
- print c, c
+ print(c, c)
- print "Updating.... ", ticktack(), c
+ print("Updating.... ", ticktack(), c)
str_ = ""
for idx in range(12 + maxlen):
str_ += "[A\r"
- print str_
+ print(str_)
if self._int_param0 > 1000 and self._int_param0 < 1000000:
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ExtTrigger/Connector.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ExtTrigger/Connector.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ExtTrigger/Connector.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
from omniORB import CORBA
@@ -75,12 +76,12 @@
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? >",
+ 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()
@@ -90,11 +91,11 @@
ec0._ptr().tick()
ec1._ptr().tick()
elif cmd == "q\n":
- print "exit"
+ print("exit")
break
except:
- print "Exception."
+ print("Exception.")
pass
if __name__ == "__main__":
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ExtTrigger/ConsoleIn.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ExtTrigger/ConsoleIn.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ExtTrigger/ConsoleIn.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
import RTC
@@ -33,9 +34,9 @@
return RTC.RTC_OK
def onExecute(self, ec_id):
- print "Please input number: ",
- self._data.data = long(sys.stdin.readline())
- print "Sending to subscriber: ", self._data.data
+ print("> ",end="")
+ self._data.data = int(input())
+ print("Sending to subscriber: ", self._data.data)
self._outport.write()
return RTC.RTC_OK
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ExtTrigger/ConsoleOut.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ExtTrigger/ConsoleOut.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ExtTrigger/ConsoleOut.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
import time
@@ -36,8 +37,8 @@
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]"
+ print("Received: ", data.data)
+ print("TimeStamp: ", data.tm.sec, "[s] ", data.tm.nsec, "[ns]")
time.sleep(0.001)
return RTC.RTC_OK
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ExtTrigger/run.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ExtTrigger/run.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/ExtTrigger/run.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -14,6 +14,7 @@
# All rights reserved.
#
+from __future__ import print_function
import sys,os,platform
import time
import commands
@@ -46,7 +47,7 @@
term += " -x"
if status != 0:
- print "No terminal program (kterm/xterm/gnome-terminal) exists."
+ print("No terminal program (kterm/xterm/gnome-terminal) exists.")
exit
path = None
@@ -55,7 +56,7 @@
path = os.path.join(p,"OpenRTM_aist","utils","rtm-naming")
break
if path is None:
- print "rtm-naming directory not exist."
+ print("rtm-naming directory not exist.")
sys.exit(0)
os.system('python %s/rtm-naming.py &'%path)
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTBrick.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTBrick.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTBrick.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import nxt.locator
from nxt.sensor import *
from nxt.motor import *
@@ -73,8 +74,8 @@
if stat == None:
import sys
- print "Unknown motor encoder error"
- print sys.exc_info()[1]
+ print("Unknown motor encoder error")
+ print(sys.exc_info()[1])
state.append(stat)
return state
@@ -96,8 +97,8 @@
continue
if stat == None:
import sys
- print "Unknown sensor error"
- print sys.exc_info()[1]
+ print("Unknown sensor error")
+ print(sys.exc_info()[1])
state.append(stat)
return state
@@ -111,15 +112,15 @@
if __name__ == "__main__":
import time
nxt = NXTBrick()
- print "connected"
+ print("connected")
# Testing motors
for i in range(0):
nxt.setMotors([80,-80,80])
- print "Motor: "
+ print("Motor: ")
mstat = nxt.getMotors()
for i, m in enumerate(mstat):
- print "(" , i, "): ", m
+ print("(" , i, "): ", m)
time.sleep(0.1)
nxt.setMotors([0,0,0])
@@ -127,5 +128,5 @@
for i in range(100):
sensors = ["Touch", "Sound", "Light", "USonic"]
sval = nxt.getSensors()
- print sval
+ print(sval)
time.sleep(0.1)
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTBrick20.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTBrick20.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTBrick20.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import nxt.locator
from nxt.sensor import *
from nxt.motor import *
@@ -69,8 +70,8 @@
if stat == None:
import sys
- print "Unknown motor encoder error"
- print sys.exc_info()[1]
+ print("Unknown motor encoder error")
+ print(sys.exc_info()[1])
state.append(stat)
return state
@@ -92,8 +93,8 @@
continue
if stat == None:
import sys
- print "Unknown sensor error"
- print sys.exc_info()[1]
+ print("Unknown sensor error")
+ print(sys.exc_info()[1])
state.append(stat)
return state
@@ -107,15 +108,15 @@
if __name__ == "__main__":
import time
nxt = NXTBrick()
- print "connected"
+ print("connected")
# Testing motors
for i in range(0):
nxt.setMotors([80,-80,80])
- print "Motor: "
+ print("Motor: ")
mstat = nxt.getMotors()
for i, m in enumerate(mstat):
- print "(" , i, "): ", m
+ print("(" , i, "): ", m)
time.sleep(0.1)
nxt.setMotors([0,0,0])
@@ -123,5 +124,5 @@
for i in range(100):
sensors = ["Touch", "Sound", "Light", "USonic"]
sval = nxt.getSensors()
- print sval
+ print(sval)
time.sleep(0.1)
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTRTC.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTRTC.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTRTC.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding:utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
import time
sys.path.append(".")
@@ -61,11 +62,11 @@
# create NXTBrick object
try:
- print "Connecting to NXT brick ...."
+ print("Connecting to NXT brick ....")
self._nxtbrick = NXTBrick.NXTBrick()
- print "Connection established."
+ print("Connection established.")
except:
- print "NXTBrick connection failed."
+ print("NXTBrick connection failed.")
return RTC.RTC_ERROR
return RTC.RTC_OK
@@ -97,10 +98,10 @@
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_
+# print(vel_)
self._nxtbrick.setMotors(vel_)
else:
- print "buffer empty"
+ print("buffer empty")
# get sensor data.
sensor_ = self._nxtbrick.getSensors()
@@ -118,7 +119,7 @@
# write position data to outport.
self._posOut.write()
except:
- print sys.exc_info()[1]
+ print(sys.exc_info()[1])
return RTC.RTC_OK
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTRTC20.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTRTC20.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTRTC20.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding:utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
import time
sys.path.append(".")
@@ -61,11 +62,11 @@
# create NXTBrick object
try:
- print "Connecting to NXT brick ...."
+ print("Connecting to NXT brick ....")
self._nxtbrick = NXTBrick20.NXTBrick()
- print "Connection established."
+ print("Connection established.")
except:
- print "NXTBrick connection failed."
+ print("NXTBrick connection failed.")
return RTC.RTC_ERROR
return RTC.RTC_OK
@@ -99,7 +100,7 @@
# set velocity
self._nxtbrick.setMotors(vel_)
else:
- print "buffer empty"
+ print("buffer empty")
# get sensor data.
sensor_ = self._nxtbrick.getSensors()
@@ -117,7 +118,7 @@
# write position data to outport.
self._posOut.write()
except:
- print sys.exc_info()[1]
+ print(sys.exc_info()[1])
return RTC.RTC_OK
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTRTC20_callback.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTRTC20_callback.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTRTC20_callback.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding:utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
import time
sys.path.append(".")
@@ -80,11 +81,11 @@
# create NXTBrick object
try:
- print "Connecting to NXT brick ...."
+ print("Connecting to NXT brick ....")
self._nxtbrick = NXTBrick.NXTBrick()
- print "Connection established."
+ print("Connection established.")
except:
- print "NXTBrick connection failed."
+ print("NXTBrick connection failed.")
return RTC.RTC_ERROR
# set callback class
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTRTC_callback.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTRTC_callback.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/NXTRTC/NXTRTC_callback.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding:utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
import time
sys.path.append(".")
@@ -80,11 +81,11 @@
# create NXTBrick object
try:
- print "Connecting to NXT brick ...."
+ print("Connecting to NXT brick ....")
self._nxtbrick = NXTBrick.NXTBrick()
- print "Connection established."
+ print("Connection established.")
except:
- print "NXTBrick connection failed."
+ print("NXTBrick connection failed.")
return RTC.RTC_ERROR
# set callback class
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SeqIO/SeqIn.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SeqIO/SeqIn.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SeqIO/SeqIn.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
import time
@@ -100,23 +101,23 @@
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 "-----------------------------------------------------------"
+ 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])
+ 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"
+ 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
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SeqIO/SeqOut.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SeqIO/SeqOut.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SeqIO/SeqOut.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
import RTC
@@ -77,28 +78,28 @@
self._octet.data = int(random.uniform(0x41, 0x4a))
self._short.data = int(random.uniform(0, 10))
- self._long.data = long(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 "-------------------------------------------------------------"
+ 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(long(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])
+ 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 "[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r"
+ print("[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r[A\r")
self._octetSeq.data = octetSeq
self._shortSeq.data = shortSeq
@@ -136,7 +137,7 @@
# Create a component
comp = manager.createComponent("SeqOut")
- print "Component created"
+ print("Component created")
def main():
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleIO/Connector.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleIO/Connector.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleIO/Connector.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
from omniORB import CORBA
@@ -11,21 +12,21 @@
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"
+ 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():
@@ -91,10 +92,10 @@
else:
usage()
- print "Subscription Type: ", subs_type
- print "Period: ", period, " [Hz]"
- print "push policy: ", push_policy
- print "skip count: ", skip_count
+ 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]], [])
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleIO/ConsoleIn.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleIO/ConsoleIn.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleIO/ConsoleIn.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
import RTC
@@ -25,16 +26,16 @@
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):
@@ -41,14 +42,14 @@
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 ConsoleIn(OpenRTM_aist.DataFlowComponentBase):
@@ -91,10 +92,11 @@
def onExecute(self, ec_id):
- print "Please input number: ",
- self._data.data = long(sys.stdin.readline())
+ print("Please input number: ",end="")
+ self._data.data = int(input())
+
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: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleIO/ConsoleOut.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleIO/ConsoleOut.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleIO/ConsoleOut.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,8 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+
+from __future__ import print_function
import sys
import time
@@ -26,16 +28,16 @@
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):
@@ -43,14 +45,14 @@
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("------------------------------")
@@ -107,9 +109,9 @@
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]"
+ print("Received: ", data)
+ print("Received: ", data.data)
+ print("TimeStamp: ", data.tm.sec, "[s] ", data.tm.nsec, "[ns]")
return RTC.RTC_OK
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleIO/run.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleIO/run.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleIO/run.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -14,6 +14,7 @@
# All rights reserved.
#
+from __future__ import print_function
import sys,os,platform
import time
import commands
@@ -47,7 +48,7 @@
term += " -x"
if status != 0:
- print "No terminal program (kterm/xterm/gnome-terminal) exists."
+ print("No terminal program (kterm/xterm/gnome-terminal) exists.")
sys.exit(0)
path = None
@@ -56,7 +57,7 @@
path = os.path.join(p,"OpenRTM_aist","utils","rtm-naming")
break
if path is None:
- print "rtm-naming directory not exist."
+ print("rtm-naming directory not exist.")
sys.exit(0)
os.system('python %s/rtm-naming.py &'%path)
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleService/MyServiceConsumer.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleService/MyServiceConsumer.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleService/MyServiceConsumer.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
import string
@@ -31,7 +32,7 @@
def __call__(self, obj):
try:
if CORBA.is_nil(obj):
- print "No service connected."
+ print("No service connected.")
else:
self._result[0] = obj.echo(self._msg)
except:
@@ -64,21 +65,23 @@
# 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 "> ",
+ 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())
- args = str(sys.stdin.readline())
- argv = string.split(args)
+
+
+ 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]
+ print("echo() finished: ", self._result[0])
self._async_echo = None
if argv[0] == "echo" and len(argv) > 1:
@@ -89,7 +92,7 @@
func)
self._async_echo.invoke()
else:
- print "echo() still invoking"
+ print("echo() still invoking")
return RTC.RTC_OK
@@ -96,12 +99,12 @@
if argv[0] == "set_value" and len(argv) > 1:
val = float(argv[1])
self._myservice0._ptr().set_value(val)
- print "Set remote 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
+ print("Current remote value: ", retval)
return RTC.RTC_OK;
if argv[0] == "get_echo_history":
@@ -114,7 +117,7 @@
self.seq_print())
return RTC.RTC_OK
- print "Invalid command or argument(s)."
+ print("Invalid command or argument(s).")
return RTC.RTC_OK
@@ -126,7 +129,7 @@
return
def __call__(self, val):
- print self._cnt, ": ", val
+ print(self._cnt, ": ", val)
self._cnt += 1
return
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleService/MyServiceProvider.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleService/MyServiceProvider.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleService/MyServiceProvider.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
import string
import time
@@ -30,7 +31,7 @@
return
def __call__(self, val):
- print self._cnt, ": ", val
+ print(self._cnt, ": ", val)
self._cnt += 1
return
@@ -48,15 +49,15 @@
def echo(self, msg):
OpenRTM_aist.CORBA_SeqUtil.push_back(self._echoList, msg)
- print "MyService::echo() was called."
+ print("MyService::echo() was called.")
for i in range(10):
- print "Message: ", msg
+ print("Message: ", msg)
time.sleep(1)
- print "MyService::echo() was finished."
+ print("MyService::echo() was finished.")
return msg
def get_echo_history(self):
- print "MyService::get_echo_history() was called."
+ print("MyService::get_echo_history() was called.")
OpenRTM_aist.CORBA_SeqUtil.for_each(self._echoList, seq_print())
return self._echoList
@@ -63,17 +64,17 @@
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
+ 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
+ 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."
+ print("MyService::get_value_history() was called.")
OpenRTM_aist.CORBA_SeqUtil.for_each(self._valueList, seq_print())
return self._valueList
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleService/run.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleService/run.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/SimpleService/run.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -14,6 +14,7 @@
# All rights reserved.
#
+from __future__ import print_function
import sys,os,platform
import time
import commands
@@ -51,7 +52,7 @@
term += " -x"
if status != 0:
- print "No terminal program (kterm/xterm/gnome-terminal) exists."
+ print("No terminal program (kterm/xterm/gnome-terminal) exists.")
sys.exit(0)
path = None
@@ -60,7 +61,7 @@
path = os.path.join(p,"OpenRTM_aist","utils","rtm-naming")
break
if path is None:
- print "rtm-naming directory not exist."
+ print("rtm-naming directory not exist.")
sys.exit(0)
os.system('python %s/rtm-naming.py &'%path)
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/SliderComp.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/SliderComp.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/SliderComp.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
import time
sys.path.append(".")
@@ -73,7 +74,7 @@
# Create a component
comp = manager.createComponent("SliderComp")
- print "Componet created"
+ print("Componet created")
def main():
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/TkMotorComp.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/TkMotorComp.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/TkMotorComp.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
sys.path.append(".")
@@ -56,13 +57,13 @@
try:
indata = self._tkIn.read()
val = indata.data
- print val
+ 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()"
+ print("Exception cought in onExecute()")
time.sleep(0.01)
return RTC.RTC_OK
@@ -87,7 +88,7 @@
# Create a component
comp = manager.createComponent("TkMotorComp")
- print "Componet created"
+ print("Componet created")
def main():
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/TkMotorPosComp.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/TkMotorPosComp.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/TkMotorPosComp.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
sys.path.append(".")
@@ -57,13 +58,13 @@
try:
indata = self._tkIn.read()
val = indata.data
- print val
+ 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()"
+ print("Exception cought in onExecute()")
time.sleep(0.01)
return RTC.RTC_OK
@@ -87,7 +88,7 @@
# Create a component
comp = manager.createComponent("TkMotorPosComp")
- print "Componet created"
+ print("Componet created")
def main():
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/run.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/run.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/run.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -14,6 +14,7 @@
# All rights reserved.
#
+from __future__ import print_function
import sys,os,platform
import time
import commands
@@ -46,7 +47,7 @@
term += " -x"
if status != 0:
- print "No terminal program (kterm/xterm/gnome-terminal) exists."
+ print("No terminal program (kterm/xterm/gnome-terminal) exists.")
exit
path = None
@@ -55,7 +56,7 @@
path = os.path.join(p,"OpenRTM_aist","utils","rtm-naming")
break
if path is None:
- print "rtm-naming directory not exist."
+ print("rtm-naming directory not exist.")
sys.exit(0)
os.system('python %s/rtm-naming.py &'%path)
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/slider.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/slider.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Slider_and_Motor/slider.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
from Tkinter import *
#import thread
import dummy_threading
@@ -55,7 +56,7 @@
# thread.start_new_thread(slider.mainloop, ())
while (1):
- print slider.get()
+ print(slider.get())
time.sleep(0.5)
# slider.update()
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Throughput/Throughput_py.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Throughput/Throughput_py.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/Throughput/Throughput_py.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -14,6 +14,8 @@
LGPL
"""
+
+from __future__ import print_function
import sys
import time
sys.path.append(".")
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/TkJoyStick/TkJoyStickComp.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/TkJoyStick/TkJoyStickComp.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/TkJoyStick/TkJoyStickComp.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- Python -*-
+from __future__ import print_function
import sys
import time
sys.path.append(".")
@@ -83,7 +84,7 @@
_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
+ print(x, y, _vl, _vr)
return [_vl, _vr]
def set_pos(self, pos, pol):
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/TkJoyStick/tkjoystick.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/TkJoyStick/tkjoystick.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/examples/TkJoyStick/tkjoystick.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -21,6 +21,7 @@
# $Log$
#
+from __future__ import print_function
from Tkinter import *
import time
import math
@@ -535,7 +536,7 @@
while 1:
m.update()
- print m.get_pos()
+ print(m.get_pos())
if __name__ == '__main__': test()
Modified: branches/RELENG_1_2/OpenRTM-aist-Python/setup.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/setup.py 2017-12-26 04:27:58 UTC (rev 908)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/setup.py 2017-12-27 01:30:22 UTC (rev 909)
@@ -244,10 +244,7 @@
#
# examples
#
-if sys.version_info[0] == 2:
- example_dir = "OpenRTM_aist/examples"
-else:
- example_dir = "OpenRTM_aist/python3_examples"
+example_dir = "OpenRTM_aist/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)
More information about the openrtm-commit
mailing list