summaryrefslogtreecommitdiff
path: root/manual/assets
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-09-13 16:32:15 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2022-09-13 16:32:15 +0200
commitdb5bb401f336600521cf464e95ec51a1bca6cbc6 (patch)
tree500865611c80a95798a805fc1632c51498890e1e /manual/assets
parentbe6dafcd106ff9c50c9fa316685874773f6b251e (diff)
Update manual
Diffstat (limited to 'manual/assets')
-rwxr-xr-xmanual/assets/orchestrator.py17
-rw-r--r--manual/assets/output.txt4
2 files changed, 19 insertions, 2 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()
diff --git a/manual/assets/output.txt b/manual/assets/output.txt
index 858bd83..f3cc6c7 100644
--- a/manual/assets/output.txt
+++ b/manual/assets/output.txt
@@ -1,3 +1,3 @@
[t=0.000,src=n0] Send 10 bytes on wlan0
-[t=0.016,src=n1] Receive 10 bytes on wlan0
-[t=0.016,src=esds] Simulation ends
+[t=0.002,src=n1] Receive 10 bytes on wlan0
+[t=0.002,src=esds] Simulation ends