esds/tests/api_receivet0_eth0_1s1r/receiver.py
2022-06-30 12:11:59 +02:00

14 lines
413 B
Python

#!/usr/bin/env python
def receivet(node,timeout):
##### Simple receive
code, data=node.receivet("eth0",timeout)
msg="Received: "+data if code == 0 else "Receive failed code="+str(code)
node.log(msg)
def execute(api):
# Should not works since communication start at t=0s
receivet(api,0)
api.wait(1)
# Now communication started
receivet(api,0) # Should work (no timeout error)