2022-06-09 21:48:32 +02:00
|
|
|
#!/usr/bin/env python
|
2022-09-09 13:16:42 +02:00
|
|
|
from esds import RCode
|
2022-06-09 21:48:32 +02:00
|
|
|
|
|
|
|
def receive(node, n):
|
|
|
|
for i in range(0,n):
|
|
|
|
code, data=node.receive("eth0")
|
2022-09-09 13:16:42 +02:00
|
|
|
msg="Received: "+data if code == RCode.SUCCESS else "Receive failed code="+str(code)
|
2022-06-09 21:48:32 +02:00
|
|
|
node.log(msg)
|
|
|
|
|
|
|
|
def execute(api):
|
|
|
|
# Receive the first 3 send that should end at 3s
|
|
|
|
receive(api,3)
|
|
|
|
# Receive the first 3 send that should end at 7s
|
|
|
|
receive(api,3)
|
|
|
|
# Receive the first 3 send that should end at 12s
|
|
|
|
receive(api,3)
|
|
|
|
# Receive the first 3 send that should end at 18s
|
|
|
|
receive(api,3)
|
|
|
|
# Should ends at 23s
|
|
|
|
receive(api,1)
|