mirror of
https://gitlab.com/manzerbredes/esds.git
synced 2025-04-07 02:26:28 +02:00
Debug node state update that should be performed before node queue update
This commit is contained in:
parent
dc7f062517
commit
a2cd1b1fdc
1 changed files with 4 additions and 4 deletions
|
@ -446,8 +446,8 @@ class Simulator:
|
||||||
interface=node.rargs
|
interface=node.rargs
|
||||||
if node["interfaces_queue_size"][interface] > 0:
|
if node["interfaces_queue_size"][interface] > 0:
|
||||||
node["interfaces_queue_size"][interface]-=1
|
node["interfaces_queue_size"][interface]-=1
|
||||||
node.rqueue.put(("receive",0))
|
|
||||||
node["state"]="running"
|
node["state"]="running"
|
||||||
|
node.rqueue.put(("receive",0))
|
||||||
# Do not forget to collect the next event. This is the only request which is processed here
|
# Do not forget to collect the next event. This is the only request which is processed here
|
||||||
self.sync_node(node)
|
self.sync_node(node)
|
||||||
self.sync_event(node)
|
self.sync_event(node)
|
||||||
|
@ -533,8 +533,8 @@ class Simulator:
|
||||||
# Notify nodes that wait for the end of the simulation
|
# Notify nodes that wait for the end of the simulation
|
||||||
# Note that we do not allow them to create new events (even if they try, they will not be processed)
|
# Note that we do not allow them to create new events (even if they try, they will not be processed)
|
||||||
for node_id in self.wait_end_nodes:
|
for node_id in self.wait_end_nodes:
|
||||||
self.nodes[node_id].rqueue.put(("sim_end",0))
|
|
||||||
self.nodes[node_id]["state"]="running"
|
self.nodes[node_id]["state"]="running"
|
||||||
|
self.nodes[node_id].rqueue.put(("sim_end",0))
|
||||||
self.sync_node(self.nodes[node_id]) # Allow them for make call requests (printing logs for example)
|
self.sync_node(self.nodes[node_id]) # Allow them for make call requests (printing logs for example)
|
||||||
break # End the event processing loop
|
break # End the event processing loop
|
||||||
|
|
||||||
|
@ -560,8 +560,8 @@ class Simulator:
|
||||||
# If node is receiving makes it consume (this way if there is a timeout, it will be removed!)
|
# If node is receiving makes it consume (this way if there is a timeout, it will be removed!)
|
||||||
if dst["state"] == "request" and dst["request"] == "receive":
|
if dst["state"] == "request" and dst["request"] == "receive":
|
||||||
dst["interfaces_queue_size"][interface]-=1
|
dst["interfaces_queue_size"][interface]-=1
|
||||||
dst.rqueue.put(("receive",0))
|
|
||||||
dst["state"]="running"
|
dst["state"]="running"
|
||||||
|
dst.rqueue.put(("receive",0))
|
||||||
self.sync_node(dst)
|
self.sync_node(dst)
|
||||||
src["state"]="running"
|
src["state"]="running"
|
||||||
src.rqueue.put(("send",0))
|
src.rqueue.put(("send",0))
|
||||||
|
@ -573,8 +573,8 @@ class Simulator:
|
||||||
# If node is receiving makes it consume (this way if there is a timeout, it will be removed!)
|
# If node is receiving makes it consume (this way if there is a timeout, it will be removed!)
|
||||||
if dst["state"] == "request" and dst["request"] == "receive":
|
if dst["state"] == "request" and dst["request"] == "receive":
|
||||||
dst["interfaces_queue_size"][interface]-=1
|
dst["interfaces_queue_size"][interface]-=1
|
||||||
dst.rqueue.put(("receive",0))
|
|
||||||
dst["state"]="running"
|
dst["state"]="running"
|
||||||
|
dst.rqueue.put(("receive",0))
|
||||||
self.sync_node(dst)
|
self.sync_node(dst)
|
||||||
else:
|
else:
|
||||||
src["state"]="running"
|
src["state"]="running"
|
||||||
|
|
Loading…
Add table
Reference in a new issue