summaryrefslogtreecommitdiff
path: root/tests/api_send_eth0_1s1r
diff options
context:
space:
mode:
Diffstat (limited to 'tests/api_send_eth0_1s1r')
-rw-r--r--tests/api_send_eth0_1s1r/out7
-rw-r--r--tests/api_send_eth0_1s1r/receiver.py1
-rw-r--r--tests/api_send_eth0_1s1r/sender.py4
3 files changed, 9 insertions, 3 deletions
diff --git a/tests/api_send_eth0_1s1r/out b/tests/api_send_eth0_1s1r/out
index 7b8f88d..9168e55 100644
--- a/tests/api_send_eth0_1s1r/out
+++ b/tests/api_send_eth0_1s1r/out
@@ -8,5 +8,8 @@
[t=3.000,src=n1] Turned off
[t=4.000,src=n1] Turned on
[t=5.000,src=n1] Receive failed code=-1
-[t=18.000,src=n0] End
-[t=18.000,src=esds] Simulation ends
+[t=5.000,src=n1] Turned off
+[t=18.000,src=n0] End transmission
+[t=18.000,src=n0] Send 15 bytes to n1 on eth0
+[t=33.000,src=n0] End transmission
+[t=33.000,src=esds] Simulation ends
diff --git a/tests/api_send_eth0_1s1r/receiver.py b/tests/api_send_eth0_1s1r/receiver.py
index 514cbbe..d2a3656 100644
--- a/tests/api_send_eth0_1s1r/receiver.py
+++ b/tests/api_send_eth0_1s1r/receiver.py
@@ -17,5 +17,6 @@ def execute(api):
code, data=api.receivet("eth0",1)
msg="Received: "+data if code == 0 else "Receive failed code="+str(code)
api.log(msg)
+ api.turn_off()
diff --git a/tests/api_send_eth0_1s1r/sender.py b/tests/api_send_eth0_1s1r/sender.py
index 64293da..8abb5e7 100644
--- a/tests/api_send_eth0_1s1r/sender.py
+++ b/tests/api_send_eth0_1s1r/sender.py
@@ -5,4 +5,6 @@ def execute(api):
api.send("eth0","Hello World!",1,1)
api.wait(1) # Goto t=3s
api.send("eth0","Hello World!",15,1) # Communication should not be aborted even if receiver turned_off (e.g UDP)
- api.log("End") # Should be printed at t=18s \ No newline at end of file
+ api.log("End transmission") # Should be printed at t=18s
+ api.send("eth0","Hello World!",15,1) # Now receiver is off
+ api.log("End transmission") # Should be printed at t=33s \ No newline at end of file