summaryrefslogtreecommitdiff
path: root/tests/simple_read_eth0_ncom_2s1r
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-06-30 12:11:59 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2022-06-30 12:11:59 +0200
commitd0ae9f329685a19136cfd9a890b305db3bc384b9 (patch)
treeb3c72908b8930db16b1f682bb7119abeaf72fadf /tests/simple_read_eth0_ncom_2s1r
parent1bef51d87860f782f687533012167bebb43c093d (diff)
Improve tests
Diffstat (limited to 'tests/simple_read_eth0_ncom_2s1r')
-rw-r--r--tests/simple_read_eth0_ncom_2s1r/out9
-rw-r--r--tests/simple_read_eth0_ncom_2s1r/receiver.py12
-rw-r--r--tests/simple_read_eth0_ncom_2s1r/sender.py9
-rwxr-xr-xtests/simple_read_eth0_ncom_2s1r/simulator.py15
4 files changed, 0 insertions, 45 deletions
diff --git a/tests/simple_read_eth0_ncom_2s1r/out b/tests/simple_read_eth0_ncom_2s1r/out
deleted file mode 100644
index 087e62b..0000000
--- a/tests/simple_read_eth0_ncom_2s1r/out
+++ /dev/null
@@ -1,9 +0,0 @@
-[t=0.000,src=n2] eth0 is 0
-[t=624.000,src=n2] eth0 is 0
-[t=1248.000,src=n0] Send 50 bytes to n2 on eth0
-[t=1249.000,src=n2] eth0 is 1
-[t=1249.000,src=n1] Send 50 bytes to n2 on eth0
-[t=1250.000,src=n2] eth0 is 2
-[t=1513.667,src=n2] Receive 50 bytes on eth0
-[t=1514.667,src=n2] Receive 50 bytes on eth0
-[t=1514.667,src=esds] Simulation ends
diff --git a/tests/simple_read_eth0_ncom_2s1r/receiver.py b/tests/simple_read_eth0_ncom_2s1r/receiver.py
deleted file mode 100644
index e2d317b..0000000
--- a/tests/simple_read_eth0_ncom_2s1r/receiver.py
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env python
-
-def execute(api):
- api.log("eth0 is {}".format(api.read("ncom_eth0")))
- api.wait(624)
- api.log("eth0 is {}".format(api.read("ncom_eth0")))
- api.wait(624)
- # Now we are at 624*2=1248 (first sender start a communication)
- api.wait(1) # Let the communication starts
- api.log("eth0 is {}".format(api.read("ncom_eth0"))) # Should print 1
- api.wait(1) # Now second sender start a communication
- api.log("eth0 is {}".format(api.read("ncom_eth0"))) # Should print 2
diff --git a/tests/simple_read_eth0_ncom_2s1r/sender.py b/tests/simple_read_eth0_ncom_2s1r/sender.py
deleted file mode 100644
index 7c9259a..0000000
--- a/tests/simple_read_eth0_ncom_2s1r/sender.py
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env python
-
-def execute(api):
- api.wait(1248)
- if api.node_id==0:
- api.send("eth0","hello",50,2)
- else:
- api.wait(1)
- api.send("eth0","hello",50,2)
diff --git a/tests/simple_read_eth0_ncom_2s1r/simulator.py b/tests/simple_read_eth0_ncom_2s1r/simulator.py
deleted file mode 100755
index 85a0671..0000000
--- a/tests/simple_read_eth0_ncom_2s1r/simulator.py
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env python
-
-# Load ESDS
-import esds
-import numpy as np
-
-B=np.full((3,3),3)
-L=np.full((3,3),0)
-s=esds.Simulator({"wlan0":{"bandwidth":B, "latency":L, "is_wired":False}, "eth0":{"bandwidth":B, "latency":L, "is_wired":True}})
-
-s.create_node("sender")
-s.create_node("sender")
-s.create_node("receiver")
-
-s.run(interferences=False)