2022-06-29 11:19:36 +02:00
|
|
|
#!/usr/bin/env python
|
2022-09-09 13:16:42 +02:00
|
|
|
from esds import RCode
|
2022-06-29 11:19:36 +02:00
|
|
|
|
|
|
|
def receivet(node,timeout):
|
|
|
|
##### Simple receive
|
|
|
|
code, data=node.receivet("eth0",timeout)
|
2022-09-09 13:16:42 +02:00
|
|
|
msg="Received: "+data if code == RCode.SUCCESS else "Receive failed code="+str(code)
|
2022-06-29 11:19:36 +02:00
|
|
|
node.log(msg)
|
|
|
|
|
|
|
|
def execute(api):
|
2022-06-30 12:11:59 +02:00
|
|
|
# Should not works since communication start at t=0s
|
2022-06-29 11:19:36 +02:00
|
|
|
receivet(api,0)
|
|
|
|
api.wait(1)
|
2022-06-30 12:11:59 +02:00
|
|
|
# Now communication started
|
|
|
|
receivet(api,0) # Should work (no timeout error)
|