summaryrefslogtreecommitdiff
path: root/example/simulator.py
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-06-29 09:37:27 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2023-06-29 09:37:27 +0200
commite082a7b51983b4a277243f9bb02d3b5126b4b74a (patch)
tree3c0d2751465e04f7621aa817f91a0548990fb184 /example/simulator.py
parent9a1578ae752075cbe4e0c658307d037cb18b56c9 (diff)
Interfaces are now assigned to specific nodes
Diffstat (limited to 'example/simulator.py')
-rwxr-xr-xexample/simulator.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/example/simulator.py b/example/simulator.py
index 20eb878..7b62c77 100755
--- a/example/simulator.py
+++ b/example/simulator.py
@@ -32,11 +32,11 @@ s=esds.Simulator({"wlan0":{"bandwidth":B, "latency":L, "is_wired":False},"eth0":
##### Instantiate nodes
uptime=180 # 180s uptime
-s.create_node("sender",args=uptime) # Load sender.py for the first node with 5 as argument (first row in B and L)
+s.create_node("sender",interfaces=["wlan0","eth0"],args=uptime) # Load sender.py for the first node with 5 as argument (first row in B and L)
# Aguments can be passed to nodes via: s.create_node("sender",args="my argument")
for n in range(0,n-1): # Load receiver.py for the remaining nodes
- s.create_node("receiver",args=uptime)
+ s.create_node("receiver",interfaces=["wlan0","eth0"],args=uptime)
##### Run the simulation
#s.run(debug=True) # Generate a "esds.debug" file