summaryrefslogtreecommitdiff
path: root/tests/simple_send_4interfaces_1s2r/simulator.py
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-06-11 11:57:29 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2022-06-11 11:57:29 +0200
commitdd7d5863d32477ddcfdfc08bb47626cddcc75a48 (patch)
treec965d735bc263ec651cebc3db8eb1f02fa71e86d /tests/simple_send_4interfaces_1s2r/simulator.py
parent0f0d08cabaeb7135a6a45ad239dfba2562715cb6 (diff)
Add multiple interfaces test
Diffstat (limited to 'tests/simple_send_4interfaces_1s2r/simulator.py')
-rwxr-xr-xtests/simple_send_4interfaces_1s2r/simulator.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/simple_send_4interfaces_1s2r/simulator.py b/tests/simple_send_4interfaces_1s2r/simulator.py
new file mode 100755
index 0000000..9b35760
--- /dev/null
+++ b/tests/simple_send_4interfaces_1s2r/simulator.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+
+# Load ESDS
+import sys
+sys.path.append("../../")
+import esds
+import numpy as np
+
+B_wlan0=np.full((3,3),8)
+B_wlan0[0,2]=0 # Sender cannot reach n2 on wlan0
+B_wlan1=np.full((3,3),8) # Sender can reach n1 AND n2 on wlan1
+
+B_eth0=np.full((3,3),8)
+B_eth1=np.full((3,3),16) # On eth1 sender can reach receiver twice faster than eth0
+
+L=np.full((3,3),0)
+s=esds.Simulator({"wlan0":{"bandwidth":B_wlan0, "latency":L, "is_wired":False},
+ "wlan1":{"bandwidth":B_wlan1, "latency":L, "is_wired":False},
+ "eth0":{"bandwidth":B_eth0, "latency":L, "is_wired":True},
+ "eth1":{"bandwidth":B_eth1, "latency":L, "is_wired":True}})
+
+s.create_node("sender")
+s.create_node("receiver")
+s.create_node("receiver")
+
+s.run()