summaryrefslogtreecommitdiff
path: root/esds/node.py
diff options
context:
space:
mode:
Diffstat (limited to 'esds/node.py')
-rw-r--r--esds/node.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/esds/node.py b/esds/node.py
index f4e1d16..238c08d 100644
--- a/esds/node.py
+++ b/esds/node.py
@@ -22,7 +22,7 @@ class Node:
def plugin_register(self,plugin):
self.plugins.append(plugin)
- def plugin_notify(self,reason,args):
+ def plugin_notify(self,reason,args,time=None):
"""
This function strives to avoid using Python specific features
"""
@@ -34,7 +34,7 @@ class Node:
if reason == "send_return":
p.on_send_return(args[0],args[1],args[2],args[3],args[4])
if reason == "on_communication_end":
- p.on_communication_end(args[0],args[1])
+ p.on_communication_end(args[0],time,args[1])
if reason == "terminated":
p.on_terminated()
@@ -202,7 +202,7 @@ class Node:
while True:
ack=self.rqueue.get() # Wait for simulator acknowledgments
if ack[0] == "plugin_notify":
- self.plugin_notify(ack[1],ack[2])
+ self.plugin_notify(ack[1],ack[3],time=ack[2])
self["pending_plugin_notify"]-=1
elif ack[0] not in ack_types:
ack_buffer.append(ack)
@@ -217,7 +217,7 @@ class Node:
"""
Wait until node stop running
"""
- while self["state"] == "running":
+ while self["state"] == "running" or self["pending_plugin_notify"] > 0:
pass
def run(self,args):