summaryrefslogtreecommitdiff
path: root/tests/api_read_wlan0_ncom_2s1r/receiver.py
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-06-30 12:11:59 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2022-06-30 12:11:59 +0200
commitd0ae9f329685a19136cfd9a890b305db3bc384b9 (patch)
treeb3c72908b8930db16b1f682bb7119abeaf72fadf /tests/api_read_wlan0_ncom_2s1r/receiver.py
parent1bef51d87860f782f687533012167bebb43c093d (diff)
Improve tests
Diffstat (limited to 'tests/api_read_wlan0_ncom_2s1r/receiver.py')
-rw-r--r--tests/api_read_wlan0_ncom_2s1r/receiver.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/api_read_wlan0_ncom_2s1r/receiver.py b/tests/api_read_wlan0_ncom_2s1r/receiver.py
new file mode 100644
index 0000000..1e133ec
--- /dev/null
+++ b/tests/api_read_wlan0_ncom_2s1r/receiver.py
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+
+def execute(api):
+ api.log("wlan0 is {}".format(api.read("ncom_wlan0"))) # Ensure no commmunications at t=0s
+ api.wait(624)
+ api.log("wlan0 is {}".format(api.read("ncom_wlan0"))) # Ensure still no commmunications at t=624s
+ api.wait(624)
+ # Now we are at 624*2=1248 (first sender start a communication)
+ api.wait(1) # Let the communication starts (otherwise value will be 0 (see api_read_order_ncom_1s2r))
+ api.log("wlan0 is {}".format(api.read("ncom_wlan0"))) # Should print 1
+ # Now second sender start a communication
+ api.wait(1) # Let the second communication starts
+ api.log("wlan0 is {}".format(api.read("ncom_wlan0"))) # Should print 2