esds/tests/api_send_eth0_2s1r/receiver.py
2022-09-09 13:16:42 +02:00

14 lines
430 B
Python

#!/usr/bin/env python
from esds import RCode
def execute(api):
##### Simple receive from node 0
code, data=api.receive("eth0")
msg="Received: "+data if code == RCode.SUCCESS else "Receive failed code="+str(code)
api.log(msg)
##### Simple receive from node 1
code, data=api.receive("eth0")
msg="Received: "+data if code == RCode.SUCCESS else "Receive failed code="+str(code)
api.log(msg)