Simplify the API: Now wired transmission are never aborted if receiver turned off. It will just not receive the data

This commit is contained in:
Loic Guegan 2022-07-01 13:05:33 +02:00
parent 1eee1ac81a
commit 33ffa0b6e0
5 changed files with 29 additions and 60 deletions

View file

@ -10,17 +10,12 @@ def execute(api):
code, data=api.receive("eth0")
msg="Received: "+data if code == 0 else "Receive failed code="+str(code)
api.log(msg)
##### Ensure data is not receive when turned off
api.turn_off()
api.wait(1)
api.turn_on()
code, data=api.receivet("eth0",1)
msg="Received: "+data if code == 0 else "Receive failed code="+str(code)
api.log(msg)
##### Ensure data is not receive turned off but communication is not cancel
##### Ensure data is not receive when turned off but communication must still be ongoing
api.turn_off()
api.wait(1)
api.turn_on()
code, data=api.receivet("eth0",1)
msg="Received: "+data if code == 0 else "Receive failed code="+str(code)
api.log(msg)