summaryrefslogtreecommitdiff
path: root/tests/api_read_eth0_ncom_2s1r/receiver.py
blob: 286af70cd0e27d550511a676b22cbcacb2052c51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env python

def execute(api):
    api.log("eth0 is {}".format(api.read("ncom_eth0"))) # Ensure no commmunications at t=0s
    api.wait(624)
    api.log("eth0 is {}".format(api.read("ncom_eth0"))) # 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("eth0 is {}".format(api.read("ncom_eth0"))) # Should print 1
    # Now second sender start a communication
    api.wait(1)  # Let the second communication starts
    api.log("eth0 is {}".format(api.read("ncom_eth0"))) # Should print 2