esds/tests/api_receivet0_eth0_1s1r/receiver.py

16 lines
448 B
Python
Raw Permalink Normal View History

2022-06-29 11:19:36 +02:00
#!/usr/bin/env python
from esds import RCode
2022-06-29 11:19:36 +02:00
def receivet(node,timeout):
##### Simple receive
code, data=node.receivet("eth0",timeout)
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)