mirror of
https://gitlab.com/manzerbredes/esds.git
synced 2025-04-19 03:59:45 +00:00
Update manual
This commit is contained in:
parent
be6dafcd10
commit
db5bb401f3
5 changed files with 54 additions and 17 deletions
17
manual/assets/orchestrator.py
Executable file
17
manual/assets/orchestrator.py
Executable file
|
@ -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()
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue