summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-09-11 16:14:17 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2022-09-11 16:14:17 +0200
commit1563817f1fc2d0c826c20c7baa56dc0f3fb9d324 (patch)
tree63adab52612c6110bba3723b0a70933421f81d5a /example
parentcb02cc0e0208a0d056a5216f73eb8fef346aad89 (diff)
Update platform parser
Diffstat (limited to 'example')
-rw-r--r--example/platform.yaml20
-rw-r--r--example/platform_callback.py5
2 files changed, 11 insertions, 14 deletions
diff --git a/example/platform.yaml b/example/platform.yaml
index 911daa1..723b4b8 100644
--- a/example/platform.yaml
+++ b/example/platform.yaml
@@ -1,15 +1,15 @@
##### General Section #####
general:
- # List of timestamps where the simulator will break
- # and call the callback function (cf breakpoints_callback entry)
+ # List of timestamps at which the simulator should break
+ # and call the callback function (cf. the breakpoints_callback entry)
breakpoints: []
# Same as breakpoints but simulator will break every x second(s)
- breakpoints_every: 0
+ breakpoints_every: 1000
# Define the callback to call when the simulator reach a breakpoint
breakpoints_callback:
file: "platform_callback.py"
callback: "callback"
- # Turn on/off the debugging of esds
+ # Turn on/off the debugging mode of esds
debug: off
# Debug output file (default is ./esds.debug)
debug_file: "./esds.debug"
@@ -20,17 +20,17 @@ general:
nodes:
# Number of nodes to simulate
count: 5
- # List of files used has implementation for each node
+ # List of files used as implementation for each node
# Example:
# - 0,1,2 sender.py
# - 3-4 receiver.py
- # Note that @ will be replaced by the last node id ex:
+ # Note that @ will be replaced by the last node id example for 5 nodes:
# 0-@ receiver.py is equivalent to 0-4 receiver.py
implementations:
- all sender.py
- # Node implementations arguments
- # arguments is a dictionary where key isrange of node the value is the arguments for
- # this specific node range
+ # Node implementation arguments
+ # arguments is a dictionary where key are ranges of node and values are the arguments for
+ # these specific node ranges
arguments: {
"all": 2
}
@@ -41,7 +41,7 @@ interfaces:
wlan0:
# Interface type (wired/wireless)
type: "wireless"
- # List of links between nodes in this interface
+ # List of links between nodes on this interface
# Syntax infos:
# 1MBps = 1 megaBYTE per seconds
# 1Mbps = 1 megabit per seconds
diff --git a/example/platform_callback.py b/example/platform_callback.py
index b8a87d0..d3d5dab 100644
--- a/example/platform_callback.py
+++ b/example/platform_callback.py
@@ -1,6 +1,3 @@
-
-
-
def callback(simulator):
- print("Called :)") \ No newline at end of file
+ print("Callback called at {}s".format(simulator.time)) \ No newline at end of file