Revision 301
| trunk/swipe/pingTest.py (revision 301) | ||
|---|---|---|
| 29 | 29 |
|
| 30 | 30 |
def ping(t): |
| 31 | 31 |
common.sendMessage(t, common.TT_PING, "") |
| 32 |
|
|
| 33 |
def response(i): |
|
| 32 | 34 |
return common.checkAck(t) |
| 33 | 35 |
|
| 34 | 36 |
acks = [] |
| 35 | 37 |
|
| 36 | 38 |
try: |
| 37 | 39 |
for i in range(256): |
| 38 |
while ping(i): |
|
| 40 |
ping(i) |
|
| 41 |
while response(i): |
|
| 39 | 42 |
acks.append(i) |
| 40 | 43 |
print "\n\ndone pinging" |
| 41 | 44 |
finally: |
Also available in: Unified diff