summaryrefslogtreecommitdiff
path: root/esds
diff options
context:
space:
mode:
Diffstat (limited to 'esds')
-rw-r--r--esds/esds.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/esds/esds.py b/esds/esds.py
index 07b57c7..a0b4557 100644
--- a/esds/esds.py
+++ b/esds/esds.py
@@ -187,15 +187,17 @@ class Simulator:
- 2 breakpoint_manual (3,timestamp,0,0)
- 3 breakpoint_auto (4,timestamp,0,0)
- Very important: when the simulator wakes up a node (changing is state to running)
- data that should be received by that node on the current simulated time SHOULD be in the queue!
- Thus, the send event must be handle before the other event (priority equals to 1). Otherwise plugings such as the power states
- one may not gives accurate results because of missing entries in the nodes received queues.
+ Very important notes:
+ - When the simulator wakes up a node (changing is state to running) data that should be received by that node
+ on the current simulated time SHOULD be in the queue! Thus, the send event must be handle before the other event (priority equals to 1).
+ Otherwise plugings such as the power states one may not gives accurate results because of missing entries in the nodes received queues.
+ - The state of a node should always be updated (e.g node["state"]="running") BEFORE updating its
+ queue (e.g node.rqueue.put(("timeout_remove",0))
"""
def __init__(self,netmat):
"""
- Format of netmat: { "interface": {"bandwidth": numpy_matrix, "latency": numpy_matrix, "is_wired":bool}}
+ Format of netmat: { "interface": {"bandwidth": numpy_matrix_2D, "latency": numpy_matrix_2D, "is_wired":bool}}
For wireless interfaces the diagonals of the bandwidth and latency matrices are very important.
They determine the duration of the tranmission for THE SENDER. It allows to have a different tx duration per node and per interface.
Thus, at each wireless communication, an addionnal event is created for the sender that corresponds to a send to himself (diagonals of the matrices) used