Skip to content

Commit 3295ed7

Browse files
committed
Simplify sent/reaceived beacons according to scenario.
1 parent f6c4e43 commit 3295ed7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

example_run.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
bob.ctmgr.receive_scans([alice_ephID], now = now)
5555
now = now + timedelta(seconds=LowCostDP3T.CONTACT_THRESHOLD+1)
5656
alice.ctmgr.receive_scans([bob_ephID], now = now)
57-
bob.ctmgr.receive_scans([bob_ephID], now = now)
57+
bob.ctmgr.receive_scans([alice_ephID], now = now)
5858
# Process the received beacons
5959
alice.next_epoch()
6060
bob.next_epoch()
@@ -70,13 +70,12 @@
7070
now = datetime.utcfromtimestamp(epotime)
7171
bob_ephID = bob.keystore.get_current_ephID(now)
7272
isidor_ephID = isidor.keystore.get_current_ephID(now)
73-
beacons = [alice_ephID, bob_ephID, isidor_ephID]
7473
# Record two beacons in the same epoch, resulting in a contact
75-
bob.ctmgr.receive_scans(beacons, now = now)
76-
isidor.ctmgr.receive_scans(beacons, now = now)
74+
bob.ctmgr.receive_scans([isidor_ephID], now = now)
75+
isidor.ctmgr.receive_scans([bob_ephID], now = now)
7776
now = now + timedelta(seconds=LowCostDP3T.CONTACT_THRESHOLD+1)
78-
bob.ctmgr.receive_scans(beacons, now = now)
79-
isidor.ctmgr.receive_scans(beacons, now = now)
77+
bob.ctmgr.receive_scans([isidor_ephID], now = now)
78+
isidor.ctmgr.receive_scans([bob_ephID], now = now)
8079
# Process the received beacons
8180
alice.next_epoch()
8281
bob.next_epoch()

0 commit comments

Comments
 (0)