mirror of
https://gitlab.com/manzerbredes/esds.git
synced 2025-05-20 22:17:38 +00:00
Interfaces are now assigned to specific nodes
This commit is contained in:
parent
9a1578ae75
commit
e082a7b519
33 changed files with 64 additions and 18 deletions
|
@ -39,10 +39,12 @@ nodes:
|
|||
|
||||
##### Interfaces Section #####
|
||||
interfaces:
|
||||
# Each entry for each node interfaces
|
||||
# Each entry defines an network interface
|
||||
wlan0:
|
||||
# Interface type (wired/wireless)
|
||||
type: "wireless"
|
||||
# Now specify the nodes on which the interface is available
|
||||
nodes: all
|
||||
# List of links between nodes on this interface
|
||||
# Syntax infos:
|
||||
# 1MBps = 1 megaBYTE per seconds
|
||||
|
@ -57,5 +59,6 @@ interfaces:
|
|||
# Example of a wired interface
|
||||
eth0:
|
||||
type: "wired"
|
||||
nodes: all
|
||||
links:
|
||||
- all 5Mbps 10s all
|
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from esds.helpers.platform import YAMLPlatformFile
|
||||
|
||||
|
||||
|
||||
s=YAMLPlatformFile("platform.yaml")
|
||||
s.run()
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue