documentation of sync receiver
Stefan Schuermans

Stefan Schuermans commited on 2014-01-03 17:09:12
Showing 9 changed files, with 196 additions and 12 deletions.

... ...
@@ -114,12 +114,17 @@
114 114
         <li><a href="udp4phone.html">UDP4 Phone Connector</a></li>
115 115
         <li><a href="udp4receiver.html">UDP4 Receiver</a></li>
116 116
         <li><a href="udp4sender.html">UDP4 Sender</a></li>
117
+        <li><a href="udp4syncreceiver.html">UDP4 Synchronization Receiver</a></li>
118
+        <li><a href="udp6phone.html">UDP6 Phone Connector</a></li>
119
+        <li><a href="udp6receiver.html">UDP6 Receiver</a></li>
120
+        <li><a href="udp6sender.html">UDP6 Sender</a></li>
121
+        <li><a href="udp6syncreceiver.html">UDP6 Synchronization Receiver</a></li>
117 122
       </ul>
118 123
     </p>
119 124
     <h2>Copyright / Copyleft</h2>
120 125
     <p>
121 126
       Blinker<br>
122
-      Copyright 2011 Stefan Schuermans &lt;stefan@blinkenarea.org&gt;<br>
127
+      Copyright 2011-2014 Stefan Schuermans &lt;stefan@blinkenarea.org&gt;<br>
123 128
       Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html<br>
124 129
       a blinkenarea.org project
125 130
     </p>
... ...
@@ -0,0 +1,85 @@
1
+<html>
2
+  <head>
3
+    <title>Blinker - Po.W.E.R. Synchronization Protocol</title>
4
+  </head>
5
+  <body>
6
+    <h1>Blinker - Po.W.E.R. Synchronization Protocol</h1>
7
+    <p>
8
+      The Po.W.E.R. synchronization protocol has been defined for a stage
9
+      play of BBM (Beobachter der Bediener von Maschinen).
10
+      Its purpose is to synchronize multiple media players over a local
11
+      network.
12
+    </p>
13
+    <p>
14
+      The master sends/broadcasts the current media file name and the
15
+      position within the media file every 0.1s in a single UDP packet.
16
+      Both source and destination ports have to be 5740, but Blinker
17
+      allows to use other values, too.
18
+    </p>
19
+    <h2>UDP packet format</h2>
20
+    <p>
21
+      The payload data in each UDP packet is defined as follows:
22
+      <table>
23
+        <tr><td><b>start</b></td>
24
+            <td width="2em"></td>
25
+            <td><b>length</b></td>
26
+            <td width="2em"></td>
27
+            <td><b>type</b></td>
28
+            <td width="2em"></td>
29
+            <td><b>description</b></td></tr>
30
+        <tr><td>0</td>
31
+            <td></td>
32
+            <td>4</td>
33
+            <td></td>
34
+            <td>ASCII</td>
35
+            <td></td>
36
+            <td>fixed magic, always &quot;PoSy&quot;</td></tr>
37
+        <tr><td>4</td>
38
+            <td></td>
39
+            <td>4</td>
40
+            <td></td>
41
+            <td>uint32, big endian</td>
42
+            <td></td>
43
+            <td>bit field for flags</td></tr>
44
+        <tr><td>4</td>
45
+            <td></td>
46
+            <td>64</td>
47
+            <td></td>
48
+            <td>UTF-8 string, zero-padded</td>
49
+            <td></td>
50
+            <td>name of the current media piece/file</td></tr>
51
+        <tr><td>72</td>
52
+            <td></td>
53
+            <td>4</td>
54
+            <td></td>
55
+            <td>uint32, big endian</td>
56
+            <td></td>
57
+            <td>current position within the media piece in milliseconds</td></tr>
58
+      </table>
59
+    </p>
60
+    <p>
61
+      The following flags are defined:
62
+      <table>
63
+        <tr><td><b>value</b></td>
64
+            <td width="2em"></td>
65
+            <td><b>description</b></td></tr>
66
+        <tr><td>1</td>
67
+            <td></td>
68
+            <td>pause mode active</td></tr>
69
+      </table>
70
+    </p>
71
+    <p>
72
+      Generation of packets has to follow the above specification exactly.
73
+      Additional fields may be added in later version of the protocol.
74
+      User-defined extensions are not allowed.
75
+      Undefined fields in bit fields have to be zero.
76
+    </p>
77
+    <p>
78
+      On reception, all packets with a smaller length or not starting with
79
+      the correct magic have to be discarded.
80
+      Undefined fields of bit fields have to be ignored.
81
+      Trailing data (i.e. if packet is longer than expected) has to be ignored.
82
+    </p>
83
+  </body>
84
+</html>
85
+
... ...
@@ -5,7 +5,7 @@
5 5
   <body>
6 6
     <h1>Blinker - UDPv4 Receiver</h1>
7 7
     <p>
8
-      The UDPv4 receiver module reeceives a stream using UDP version 4 across
8
+      The UDPv4 receiver module receives a stream using UDP version 4 across
9 9
       a network.
10 10
       It supports the static and dynamic variants of the BLP, EBLP and MCUF
11 11
       protocols.
... ...
@@ -0,0 +1,47 @@
1
+<html>
2
+  <head>
3
+    <title>Blinker - UDPv4 Synchronization Receiver</title>
4
+  </head>
5
+  <body>
6
+    <h1>Blinker - UDPv4 Synchronization Receiver</h1>
7
+    <p>
8
+      The UDPv4 synchronization receiver module receives a synchronization
9
+      stream using the
10
+      <a href="powersync.html">Po.W.E.R. synchronization protocol</a>
11
+      over UDP version 4 across a network.
12
+    </p>
13
+    <h2>Configuration</h2>
14
+    <p>
15
+      The configuration of the UDPv4 synchronization receiver module with name
16
+      <code>NAME</code> is located in the <code>udp4syncreceivers/NAME</code>
17
+      subdirectory.
18
+    </p>
19
+    <h3>Output Synchronization Stream</h3>
20
+    <p>
21
+      The file <code>outsync</code> contains the name of the synchronization
22
+      stream to write the received synchronization information to.
23
+    </p>
24
+    <h3>Bind Address</h3>
25
+    <p>
26
+      The file <code>bind</code> contains the local address to bind to.
27
+      It must contain the IP address and the port, i.e. a string
28
+      <code>&lt;IP&gt;:&lt;port&gt;</code> (hostnames are not supported).
29
+      If the local address should be determined automatically, the file
30
+      can contain <code>0.0.0.0:0</code>.
31
+    </p>
32
+    <h3>Source Address</h3>
33
+    <p>
34
+      The file <code>source</code> contains the source address
35
+      as a string <code>&lt;IP&gt;:&lt;port&gt;</code>
36
+      (hostnames are not supported).
37
+      <br>
38
+      If the source address file exists, only a stream from the specified
39
+      address is accepted.
40
+      Otherwise, the stream can be sent from any address.
41
+      <br>
42
+      If both the source address and the protocol are given, dynamic
43
+      stream request packets are sent to the source address.
44
+    </p>
45
+  </body>
46
+</html>
47
+
... ...
@@ -21,15 +21,15 @@
21 21
     <h3>Bind Address</h3>
22 22
     <p>
23 23
       The file <code>bind</code> contains the local address to bind to.
24
-      It must contain the IP address and the port, i.e. a string
25
-      <code>&lt;IP&gt;:&lt;port&gt;</code> (hostnames are not supported).
24
+      It must contain the IPv6 address and the port, i.e. a string
25
+      <code>[&lt;IPv6&gt;]:&lt;port&gt;</code> (hostnames are not supported).
26 26
       If the local address should be determined automatically, the file
27 27
       can contain <code>[::]:0</code>.
28 28
     </p>
29 29
     <h3>Server Address</h3>
30 30
     <p>
31 31
       The file <code>server</code> contains the address of the EBIP server
32
-      as a string <code>&lt;IP&gt;:&lt;port&gt;</code>
32
+      as a string <code>[&lt;IPv6&gt;]:&lt;port&gt;</code>
33 33
       (hostnames are not supported).
34 34
       <br>
35 35
       The phone connector module will register with this server and
... ...
@@ -5,7 +5,7 @@
5 5
   <body>
6 6
     <h1>Blinker - UDPv6 Receiver</h1>
7 7
     <p>
8
-      The UDPv6 receiver module reeceives a stream using UDP version 4 across
8
+      The UDPv6 receiver module receives a stream using UDP version 4 across
9 9
       a network.
10 10
       It supports the static and dynamic variants of the BLP, EBLP and MCUF
11 11
       protocols.
... ...
@@ -31,15 +31,15 @@
31 31
     <h3>Bind Address</h3>
32 32
     <p>
33 33
       The file <code>bind</code> contains the local address to bind to.
34
-      It must contain the IP address and the port, i.e. a string
35
-      <code>&lt;IP&gt;:&lt;port&gt;</code> (hostnames are not supported).
34
+      It must contain the IPv6 address and the port, i.e. a string
35
+      <code>[&lt;IPv6&gt;]:&lt;port&gt;</code> (hostnames are not supported).
36 36
       If the local address should be determined automatically, the file
37 37
       can contain <code>[::]:0</code>.
38 38
     </p>
39 39
     <h3>Source Address</h3>
40 40
     <p>
41 41
       The file <code>source</code> contains the source address
42
-      as a string <code>&lt;IP&gt;:&lt;port&gt;</code>
42
+      as a string <code>[&lt;IPv6&gt;]:&lt;port&gt;</code>
43 43
       (hostnames are not supported).
44 44
       <br>
45 45
       If the source address file exists, only a stream from the specified
... ...
@@ -30,8 +30,8 @@
30 30
     <h3>Bind Address</h3>
31 31
     <p>
32 32
       The file <code>bind</code> contains the local address to bind to.
33
-      It must contain the IP address and the port, i.e. a string
34
-      <code>&lt;IP&gt;:&lt;port&gt;</code> (hostnames are not supported).
33
+      It must contain the IPv6 address and the port, i.e. a string
34
+      <code>[&lt;IPv6&gt;]:&lt;port&gt;</code> (hostnames are not supported).
35 35
       If the local address should be determined automatically, the file
36 36
       can contain <code>[::]:0</code>.
37 37
     </p>
... ...
@@ -52,7 +52,7 @@
52 52
     <h4>Destination Address</h4>
53 53
     <p>
54 54
       The file <code>addr</code> contains the destination address
55
-      as a string <code>&lt;IP&gt;:&lt;port&gt;</code>
55
+      as a string <code>[&lt;IPv6&gt;]:&lt;port&gt;</code>
56 56
       (hostnames are not supported).
57 57
     </p>
58 58
   </body>
... ...
@@ -0,0 +1,47 @@
1
+<html>
2
+  <head>
3
+    <title>Blinker - UDPv6 Synchronization Receiver</title>
4
+  </head>
5
+  <body>
6
+    <h1>Blinker - UDPv6 Synchronization Receiver</h1>
7
+    <p>
8
+      The UDPv6 synchronization receiver module receives a synchronization
9
+      stream using the
10
+      <a href="powersync.html">Po.W.E.R. synchronization protocol</a>
11
+      over UDP version 4 across a network.
12
+    </p>
13
+    <h2>Configuration</h2>
14
+    <p>
15
+      The configuration of the UDPv6 synchronization receiver module with name
16
+      <code>NAME</code> is located in the <code>udp4syncreceivers/NAME</code>
17
+      subdirectory.
18
+    </p>
19
+    <h3>Output Synchronization Stream</h3>
20
+    <p>
21
+      The file <code>outsync</code> contains the name of the synchronization
22
+      stream to write the received synchronization information to.
23
+    </p>
24
+    <h3>Bind Address</h3>
25
+    <p>
26
+      The file <code>bind</code> contains the local address to bind to.
27
+      It must contain the IPv6 address and the port, i.e. a string
28
+      <code>[&lt;IPv6&gt;]:&lt;port&gt;</code> (hostnames are not supported).
29
+      If the local address should be determined automatically, the file
30
+      can contain <code>[::]:0</code>.
31
+    </p>
32
+    <h3>Source Address</h3>
33
+    <p>
34
+      The file <code>source</code> contains the source address
35
+      as a string <code>[&lt;IPv6&gt;]:&lt;port&gt;</code>
36
+      (hostnames are not supported).
37
+      <br>
38
+      If the source address file exists, only a stream from the specified
39
+      address is accepted.
40
+      Otherwise, the stream can be sent from any address.
41
+      <br>
42
+      If both the source address and the protocol are given, dynamic
43
+      stream request packets are sent to the source address.
44
+    </p>
45
+  </body>
46
+</html>
47
+