diff options
Diffstat (limited to 'example')
| -rw-r--r-- | example/platform.yaml | 5 | ||||
| -rwxr-xr-x | example/platform_test.py | 8 | ||||
| -rwxr-xr-x | example/simulator.py | 4 |
3 files changed, 6 insertions, 11 deletions
diff --git a/example/platform.yaml b/example/platform.yaml index ea3f760..7632e50 100644 --- a/example/platform.yaml +++ b/example/platform.yaml @@ -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
\ No newline at end of file diff --git a/example/platform_test.py b/example/platform_test.py deleted file mode 100755 index 2573b32..0000000 --- a/example/platform_test.py +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python - -from esds.helpers.platform import YAMLPlatformFile - - - -s=YAMLPlatformFile("platform.yaml") -s.run()
\ No newline at end of file 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 |
