BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
906bf44
Branches
Tags
master
Blinker
doc
powersync.html
documentation of sync receiver
Stefan Schuermans
commited
906bf44
at 2014-01-03 17:09:12
powersync.html
Blame
History
Raw
<html> <head> <title>Blinker - Po.W.E.R. Synchronization Protocol</title> </head> <body> <h1>Blinker - Po.W.E.R. Synchronization Protocol</h1> <p> The Po.W.E.R. synchronization protocol has been defined for a stage play of BBM (Beobachter der Bediener von Maschinen). Its purpose is to synchronize multiple media players over a local network. </p> <p> The master sends/broadcasts the current media file name and the position within the media file every 0.1s in a single UDP packet. Both source and destination ports have to be 5740, but Blinker allows to use other values, too. </p> <h2>UDP packet format</h2> <p> The payload data in each UDP packet is defined as follows: <table> <tr><td><b>start</b></td> <td width="2em"></td> <td><b>length</b></td> <td width="2em"></td> <td><b>type</b></td> <td width="2em"></td> <td><b>description</b></td></tr> <tr><td>0</td> <td></td> <td>4</td> <td></td> <td>ASCII</td> <td></td> <td>fixed magic, always "PoSy"</td></tr> <tr><td>4</td> <td></td> <td>4</td> <td></td> <td>uint32, big endian</td> <td></td> <td>bit field for flags</td></tr> <tr><td>4</td> <td></td> <td>64</td> <td></td> <td>UTF-8 string, zero-padded</td> <td></td> <td>name of the current media piece/file</td></tr> <tr><td>72</td> <td></td> <td>4</td> <td></td> <td>uint32, big endian</td> <td></td> <td>current position within the media piece in milliseconds</td></tr> </table> </p> <p> The following flags are defined: <table> <tr><td><b>value</b></td> <td width="2em"></td> <td><b>description</b></td></tr> <tr><td>1</td> <td></td> <td>pause mode active</td></tr> </table> </p> <p> Generation of packets has to follow the above specification exactly. Additional fields may be added in later version of the protocol. User-defined extensions are not allowed. Undefined fields in bit fields have to be zero. </p> <p> On reception, all packets with a smaller length or not starting with the correct magic have to be discarded. Undefined fields of bit fields have to be ignored. Trailing data (i.e. if packet is longer than expected) has to be ignored. </p> </body> </html>