schaatsnacht python stuff
Live results and deejay support for Schaatsnachtvaneindhoven.nl
Brought to you by:
joshuisken
| File | Date | Author | Commit |
|---|---|---|---|
| src | 2016-12-27 |
|
[a626c2] Fixed some typos |
| testdata | 2013-01-25 |
|
[34a886] Initial commit with tests for file I/O, TCP and... |
| README | 2013-11-16 |
|
[76b517] Schaatnacht 2010 packet generator works with ud... |
# Copyright (C) 2013 Jos Huisken <jos.huisken@gmail.com> # # This file is licensed under the GNU Lesser General Public License. # See http://www.gnu.org/copyleft/lesser.html Version 3, 29 june 2007 Experimental python code to communicate with AMB.i.t timing system. Prerequisites: - Python (using 2.7) - twisted (using 12.3.0) === Test 1, interpreting a file $ cd testdata $ python ../src/amb_file.py Result: On Windows: CRC errors On Linux: NO CRC errors TODO: solve mismatch between Windows and Linux === Test 2, using TCP communication Run (optionally on another computer in the same network) this server: $ python ../src/amb_tcp.py -s -p 5403 Run on this computer the client, which connects and receives AMB data: $ python ../src/amb_tcp.py -c -d localhost:5403 Using TCP over port 5403 a file is transferred from server to client, after the connection has been established. === Test 3, using UDP broadcast Run on another computer in the same network this client: $ python ../src/amb_udp.py -c Run on this computer the server, which broadcasts AMB data: $ python ../src/amb_udp.py -s Using UDP broadcast to 255.255.255.255 port 5303 packets are being broadcasted from server and received by the client. (Note: In this case you cannot run both server and client on the same computer: the server sends but also tries to listen on the same port. Do not yet know how to change this) === This latter situation is the intended way of operation: the AMB.i.t timing unit is continously broadcasting data in the form of passing athletes. The client collects the passings and can do things with it... === Test 4, using an initial client program which listens to broadcast on 5303 and which connects on 5403 to send (resend) commands and listen as well. This test fills a sqlite3 dBase, which should be prepared with empty tables. Run on the other computer $ python ../src/amb_tcp.py -s -p 5403 Run on the local computer: $ cp /home/Web/web2py/applications/welcome/databases/storage.sqlite . $ python amb_dbconn.py -s host:5403 TODO: - create an empty dbase with table for amb_Passing - cmdline argument for dBase selection - test with mysql, besides sqlite3 - remove 'resend' test, and set proper heuristic params for missed UDP packets