summaryrefslogtreecommitdiff
path: root/manual/assets/orchestrator.py
diff options
context:
space:
mode:
Diffstat (limited to 'manual/assets/orchestrator.py')
-rwxr-xr-xmanual/assets/orchestrator.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/manual/assets/orchestrator.py b/manual/assets/orchestrator.py
new file mode 100755
index 0000000..2886dd9
--- /dev/null
+++ b/manual/assets/orchestrator.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+
+import esds
+import numpy as np
+
+n=2 # 2 nodes
+B=np.full((n,n),50*1000) # Bandwith+txperfs 5bps
+L=np.full((n,n),0) # Latency 0s
+
+s=esds.Simulator({"wlan0":{"bandwidth":B, "latency":L, "is_wired":False}})
+
+##### Instantiate nodes with their implementation
+s.create_node("node",args="sender") # Use node.py for the first node with "sender" as argument
+s.create_node("node",args="receiver") # Now the second node
+
+##### Run the simulation
+s.run()