cosmos-ccsds_transfer_frames 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 89006d10884c558d15f95aa5f4ac33f318c30445
4
- data.tar.gz: 8ed81aa7a0264e5756eeadf6af8582c018f74c87
3
+ metadata.gz: 3128ece31262853c7294711004de02f80b4599c0
4
+ data.tar.gz: a9d2186b8fe665575128e8603d26f988a9507520
5
5
  SHA512:
6
- metadata.gz: 0ec01cbd0780df0f5b7166fdc5d233efeec9e20be86ebf9344d7808a92ce1f8d0e99406d44b0e9fc729051535177830fd4879c29b26ac261ccf4e883dfaa69a7
7
- data.tar.gz: a691e88527df7288fefbf9ce714d0d02fe62775a1f30b250a0461a652ccfe4836d7a0eca5f628e8736fde410dbf14f2864379b5d07ca7d5d3f4cd3efab2a0565
6
+ metadata.gz: 40efc045e911d709893cb871d188c12ea174c4ca0e5d67a1058195f7c81ef3ad4f1cdf26cc335380cf88ebd1e5f3d4ce643b17b5db043749d90beae45ce1e3ea
7
+ data.tar.gz: 42829c6c87adb5b48700a697fa908e130d458bd0d029313b332a8022a09a9cdefd83e87666ad7a05c3a8150943fa41f4fb5fe188411823a74694f7b201ee4d30
data/README.md CHANGED
@@ -30,25 +30,62 @@ In order to use this protocol in your COSMOS target first make sure to add the f
30
30
  REQUIRE cosmos/ccsds_transfer_frames
31
31
  ```
32
32
 
33
- Then add the protocol in the command and telemetry server configuration in an interface definition as usual. The full explicit module namespace is necessary, for example:
33
+ Then add the protocol in the command and telemetry server configuration in an interface definition as usual. The full explicit module namespace `Cosmos::CcsdsTransferFrames::CcsdsTransferFrameProtocol` is necessary.
34
+
35
+ For example:
34
36
 
35
37
  ```
36
38
  INTERFACE INTERFACE_NAME tcpip_client_interface.rb localhost 12345 12345 10.0 nil
37
- PROTOCOL Cosmos::CcsdsTransferFrames::CcsdsTransferFrameProtocol 1115 0 true true
39
+ PROTOCOL READ Cosmos::CcsdsTransferFrames::CcsdsTransferFrameProtocol 1115 0 true true
38
40
  TARGET TARGET_NAME
39
41
  ```
40
42
 
41
- This would set up the protocol to expect transfer frames with:
43
+ would set up the protocol to expect transfer frames with:
42
44
 
43
45
  * A total size of 1115 bytes.
44
46
  * No secondary header.
45
47
  * Operational control field.
46
48
  * Frame error control field.
49
+
50
+ and to perform:
51
+
47
52
  * No prefixing of packets (default).
48
53
  * Discarding of idle packets (default).
49
54
 
55
+ Another example:
56
+
57
+ ```
58
+ INTERFACE INTERFACE_NAME tcpip_client_interface.rb localhost 12345 12345 10.0 nil
59
+ PROTOCOL READ Cosmos::CcsdsTransferFrames::CcsdsTransferFrameProtocol 1115 64 false false true true
60
+ TARGET TARGET_NAME
61
+ ```
62
+
63
+ would set up the protocol to expect transfer frames with:
64
+
65
+ * A total size of 1115 bytes.
66
+ * A secondary header with a size of 64 bytes.
67
+ * No operational control field.
68
+ * No frame error control field.
69
+
70
+ and to perform:
71
+
72
+ * Prefixing of packets.
73
+ * No discarding of idle packets.
74
+
50
75
  For detailed information about the available configuration parameters for the protocol, please consult the yard inline source code documentation in [ccsds_transfer_frame_protocol.rb](lib/cosmos/ccsds_transfer_frames/ccsds_transfer_frame_protocol.rb) or the generated documentation for the currently published gem at https://www.rubydoc.info/gems/cosmos-ccsds_transfer_frames/Cosmos/CcsdsTransferFrames/CcsdsTransferFrameProtocol
51
76
 
77
+ ### Packet prefixing
78
+
79
+ Packet prefixing is a non-standard feature which prefixes each packet with the primary and secondary transfer frame headers from the frame in which the first byte of the packet was seen.
80
+
81
+ For example, if a set of 4 frames containing 4 packets as illustrated below is received:
82
+
83
+ ![Frames before packet extraction and prefixing.](img/frames_before_packet_extraction_and_prefixing.svg)
84
+
85
+ the resulting prefixed packets would be:
86
+
87
+ ![Prefixed packets after extraction and prefixing.](img/prefixed_packets_after_extraction_and_prefixing.svg)
88
+
52
89
  ## Development
53
90
 
54
91
  [![Build Status](https://travis-ci.org/ienorand/cosmos-ccsds_transfer_frames.svg?branch=master)](https://travis-ci.org/ienorand/cosmos-ccsds_transfer_frames)
@@ -0,0 +1,516 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
6
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
7
+ xmlns:cc="http://creativecommons.org/ns#"
8
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9
+ xmlns:svg="http://www.w3.org/2000/svg"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+ width="138.28403mm"
14
+ height="109.60315mm"
15
+ viewBox="0 0 138.28402 109.60315"
16
+ version="1.1"
17
+ id="svg8"
18
+ inkscape:version="0.92.1 r15371"
19
+ sodipodi:docname="frames_before_packet_extraction_and_prefixing.svg">
20
+ <defs
21
+ id="defs2">
22
+ <linearGradient
23
+ id="linearGradient4798"
24
+ osb:paint="solid">
25
+ <stop
26
+ style="stop-color:#174251;stop-opacity:1;"
27
+ offset="0"
28
+ id="stop4796" />
29
+ </linearGradient>
30
+ <marker
31
+ inkscape:stockid="DotL"
32
+ orient="auto"
33
+ refY="0"
34
+ refX="0"
35
+ id="DotL"
36
+ style="overflow:visible"
37
+ inkscape:isstock="true">
38
+ <path
39
+ id="path4562"
40
+ d="m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z"
41
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt"
42
+ transform="matrix(0.8,0,0,0.8,5.92,0.8)"
43
+ inkscape:connector-curvature="0" />
44
+ </marker>
45
+ <linearGradient
46
+ id="linearGradient4497"
47
+ osb:paint="solid">
48
+ <stop
49
+ style="stop-color:#584800;stop-opacity:1;"
50
+ offset="0"
51
+ id="stop4495" />
52
+ </linearGradient>
53
+ <linearGradient
54
+ id="linearGradient4491"
55
+ osb:paint="solid">
56
+ <stop
57
+ style="stop-color:#584800;stop-opacity:1;"
58
+ offset="0"
59
+ id="stop4489" />
60
+ </linearGradient>
61
+ </defs>
62
+ <sodipodi:namedview
63
+ id="base"
64
+ pagecolor="#ffffff"
65
+ bordercolor="#666666"
66
+ borderopacity="1.0"
67
+ inkscape:pageopacity="0.0"
68
+ inkscape:pageshadow="2"
69
+ inkscape:zoom="0.70710678"
70
+ inkscape:cx="143.62988"
71
+ inkscape:cy="144.52486"
72
+ inkscape:document-units="mm"
73
+ inkscape:current-layer="layer1"
74
+ showgrid="false"
75
+ showguides="true"
76
+ inkscape:guide-bbox="true"
77
+ inkscape:snap-bbox="true"
78
+ inkscape:snap-bbox-midpoints="true"
79
+ inkscape:bbox-nodes="true"
80
+ inkscape:snap-bbox-edge-midpoints="true"
81
+ inkscape:window-width="1280"
82
+ inkscape:window-height="987"
83
+ inkscape:window-x="0"
84
+ inkscape:window-y="56"
85
+ inkscape:window-maximized="1"
86
+ fit-margin-top="5"
87
+ fit-margin-left="5"
88
+ fit-margin-bottom="5"
89
+ fit-margin-right="5"
90
+ scale-x="1">
91
+ <sodipodi:guide
92
+ position="175.53835,93.9716"
93
+ orientation="0,1"
94
+ id="guide344"
95
+ inkscape:locked="false" />
96
+ <sodipodi:guide
97
+ position="175.53836,67.858398"
98
+ orientation="0,1"
99
+ id="guide346"
100
+ inkscape:locked="false" />
101
+ <sodipodi:guide
102
+ position="175.53837,41.745189"
103
+ orientation="0,1"
104
+ id="guide348"
105
+ inkscape:locked="false" />
106
+ <sodipodi:guide
107
+ position="175.53837,15.631988"
108
+ orientation="0,1"
109
+ id="guide350"
110
+ inkscape:locked="false" />
111
+ <sodipodi:guide
112
+ position="161.83694,93.971598"
113
+ orientation="1,0"
114
+ id="guide352"
115
+ inkscape:locked="false" />
116
+ <sodipodi:guide
117
+ position="69.142005,104.60315"
118
+ orientation="1,0"
119
+ id="guide129"
120
+ inkscape:locked="false" />
121
+ <sodipodi:guide
122
+ position="69.142015,100.2981"
123
+ orientation="0,1"
124
+ id="guide131"
125
+ inkscape:locked="false" />
126
+ <sodipodi:guide
127
+ position="69.142007,74.184865"
128
+ orientation="0,1"
129
+ id="guide133"
130
+ inkscape:locked="false" />
131
+ <sodipodi:guide
132
+ position="69.142015,48.071702"
133
+ orientation="0,1"
134
+ id="guide135"
135
+ inkscape:locked="false" />
136
+ <sodipodi:guide
137
+ position="69.141996,21.958501"
138
+ orientation="0,1"
139
+ id="guide137"
140
+ inkscape:locked="false" />
141
+ </sodipodi:namedview>
142
+ <metadata
143
+ id="metadata5">
144
+ <rdf:RDF>
145
+ <cc:Work
146
+ rdf:about="">
147
+ <dc:format>image/svg+xml</dc:format>
148
+ <dc:type
149
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
150
+ <dc:title />
151
+ </cc:Work>
152
+ </rdf:RDF>
153
+ </metadata>
154
+ <g
155
+ inkscape:label="Layer 1"
156
+ inkscape:groupmode="layer"
157
+ id="layer1"
158
+ transform="translate(-44.7868,-76.088257)">
159
+ <rect
160
+ id="rect3680"
161
+ width="127.784"
162
+ height="20.763075"
163
+ x="50.036808"
164
+ y="81.338257"
165
+ style="fill:#ffe680;stroke:#584800;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
166
+ rx="1"
167
+ ry="1" />
168
+ <text
169
+ xml:space="preserve"
170
+ style="font-style:normal;font-weight:normal;font-size:5.64444447px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
171
+ x="114.26051"
172
+ y="87.333961"
173
+ id="text4804"
174
+ transform="scale(0.99808408,1.0019196)"><tspan
175
+ sodipodi:role="line"
176
+ id="tspan4802"
177
+ x="114.26051"
178
+ y="87.333961"
179
+ style="font-size:5.64444447px;text-align:center;text-anchor:middle;stroke-width:0.26458332">transfer frame 0</tspan></text>
180
+ <g
181
+ style="stroke-width:0.49843231"
182
+ id="g5321"
183
+ transform="matrix(2.0024466,0,0,2.0101417,-50.159212,-182.27093)">
184
+ <rect
185
+ rx="0.49938911"
186
+ ry="0.49747732"
187
+ y="135.76961"
188
+ x="50.036804"
189
+ height="5.6991529"
190
+ width="10.716301"
191
+ id="rect3682"
192
+ style="opacity:0.75;fill:#de8787;fill-opacity:1;stroke:#561818;stroke-width:0.24921615;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
193
+ <text
194
+ id="text4810"
195
+ y="138.17433"
196
+ x="55.373425"
197
+ style="font-style:normal;font-weight:normal;font-size:1.76388884px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.13187687"
198
+ xml:space="preserve"><tspan
199
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.13187687"
200
+ y="138.17433"
201
+ x="55.373425"
202
+ id="tspan4808"
203
+ sodipodi:role="line">frame 0</tspan><tspan
204
+ id="tspan4850"
205
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.13187687"
206
+ y="140.3792"
207
+ x="55.373425"
208
+ sodipodi:role="line">headers</tspan></text>
209
+ </g>
210
+ <rect
211
+ style="opacity:0.75;fill:#87c8de;fill-opacity:1;stroke:#174251;stroke-width:0.5;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
212
+ id="rect3682-3"
213
+ width="26.579962"
214
+ height="11.456124"
215
+ x="71.495628"
216
+ y="90.645218"
217
+ ry="1"
218
+ rx="1" />
219
+ <text
220
+ xml:space="preserve"
221
+ style="font-style:normal;font-weight:normal;font-size:3.53887343px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
222
+ x="84.626961"
223
+ y="97.164932"
224
+ id="text4810-6"
225
+ transform="scale(0.99808409,1.0019196)"><tspan
226
+ sodipodi:role="line"
227
+ x="84.626961"
228
+ y="97.164932"
229
+ style="font-size:3.53887343px;text-align:center;text-anchor:middle;stroke-width:0.26458332"
230
+ id="tspan4850-5">packet 0</tspan></text>
231
+ <rect
232
+ style="opacity:0.75;fill:#87c8de;fill-opacity:1;stroke:#174251;stroke-width:0.5;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
233
+ id="rect3682-3-3"
234
+ width="79.745239"
235
+ height="11.456124"
236
+ x="98.075584"
237
+ y="90.645218"
238
+ ry="1"
239
+ rx="1" />
240
+ <text
241
+ xml:space="preserve"
242
+ style="font-style:normal;font-weight:normal;font-size:3.53887343px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
243
+ x="138.21646"
244
+ y="97.164932"
245
+ id="text4810-6-6"
246
+ transform="scale(0.99808409,1.0019196)"><tspan
247
+ sodipodi:role="line"
248
+ x="138.21646"
249
+ y="97.164932"
250
+ style="font-size:3.53887343px;text-align:center;text-anchor:middle;stroke-width:0.26458332"
251
+ id="tspan4923">packet 1</tspan></text>
252
+ <rect
253
+ id="rect3680-5"
254
+ width="127.784"
255
+ height="20.763075"
256
+ x="50.036808"
257
+ y="107.45146"
258
+ style="fill:#ffe680;stroke:#584800;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
259
+ rx="1"
260
+ ry="1" />
261
+ <text
262
+ xml:space="preserve"
263
+ style="font-style:normal;font-weight:normal;font-size:5.64444447px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
264
+ x="114.33354"
265
+ y="113.39716"
266
+ id="text4804-9"
267
+ transform="scale(0.99808408,1.0019196)"><tspan
268
+ sodipodi:role="line"
269
+ id="tspan4802-1"
270
+ x="114.33354"
271
+ y="113.39716"
272
+ style="font-size:5.64444447px;text-align:center;text-anchor:middle;stroke-width:0.26458332">transfer frame 1</tspan></text>
273
+ <rect
274
+ style="opacity:0.75;fill:#87c8de;fill-opacity:1;stroke:#174251;stroke-width:0.49999997;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
275
+ id="rect3682-3-3-2"
276
+ width="61.528435"
277
+ height="11.456124"
278
+ x="98.445023"
279
+ y="116.75842"
280
+ ry="1"
281
+ rx="0.99999982" />
282
+ <text
283
+ xml:space="preserve"
284
+ style="font-style:normal;font-weight:normal;font-size:3.53887343px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
285
+ x="129.47456"
286
+ y="123.2281"
287
+ id="text4810-6-6-3"
288
+ transform="scale(0.99808409,1.0019196)"><tspan
289
+ sodipodi:role="line"
290
+ x="129.47456"
291
+ y="123.2281"
292
+ style="font-size:3.53887343px;text-align:center;text-anchor:middle;stroke-width:0.26458332"
293
+ id="tspan4923-6">packet 2</tspan></text>
294
+ <rect
295
+ style="opacity:0.75;fill:#87c8de;fill-opacity:1;stroke:#174251;stroke-width:0.5;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
296
+ id="rect3682-3-3-2-0"
297
+ width="26.949369"
298
+ height="11.456124"
299
+ x="71.495644"
300
+ y="116.75842"
301
+ ry="1"
302
+ rx="0.99999994" />
303
+ <text
304
+ xml:space="preserve"
305
+ style="font-style:normal;font-weight:normal;font-size:3.53887343px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
306
+ x="85.187874"
307
+ y="121.35933"
308
+ id="text4810-6-6-3-2"
309
+ transform="scale(0.99808409,1.0019196)"><tspan
310
+ sodipodi:role="line"
311
+ x="85.187874"
312
+ y="121.35933"
313
+ style="font-size:3.53887343px;text-align:center;text-anchor:middle;stroke-width:0.26458332"
314
+ id="tspan4923-6-3">packet 1</tspan><tspan
315
+ sodipodi:role="line"
316
+ x="85.187874"
317
+ y="125.78292"
318
+ style="font-size:3.53887343px;text-align:center;text-anchor:middle;stroke-width:0.26458332"
319
+ id="tspan5125">continuation</tspan></text>
320
+ <rect
321
+ style="opacity:0.75;fill:#87c8de;fill-opacity:1;stroke:#174251;stroke-width:0.49999997;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
322
+ id="rect3682-3-3-2-7"
323
+ width="17.847363"
324
+ height="11.456124"
325
+ x="159.97345"
326
+ y="116.75842"
327
+ ry="1"
328
+ rx="0.99999988" />
329
+ <text
330
+ xml:space="preserve"
331
+ style="font-style:normal;font-weight:normal;font-size:3.53887343px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
332
+ x="169.20319"
333
+ y="123.2281"
334
+ id="text4810-6-6-3-5"
335
+ transform="scale(0.99808409,1.0019196)"><tspan
336
+ sodipodi:role="line"
337
+ x="169.20319"
338
+ y="123.2281"
339
+ style="font-size:3.53887343px;text-align:center;text-anchor:middle;stroke-width:0.26458332"
340
+ id="tspan4923-6-9">packet 3</tspan></text>
341
+ <g
342
+ style="stroke-width:0.49843231"
343
+ transform="matrix(2.0024466,0,0,2.0101417,-50.1592,-156.15772)"
344
+ id="g5321-3">
345
+ <rect
346
+ rx="0.49938911"
347
+ ry="0.49747732"
348
+ y="135.76961"
349
+ x="50.036804"
350
+ height="5.6991529"
351
+ width="10.716301"
352
+ id="rect3682-6"
353
+ style="opacity:0.75;fill:#de8787;fill-opacity:1;stroke:#561818;stroke-width:0.24921615;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
354
+ <text
355
+ id="text4810-1"
356
+ y="138.17433"
357
+ x="55.373425"
358
+ style="font-style:normal;font-weight:normal;font-size:1.76388884px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.13187687"
359
+ xml:space="preserve"><tspan
360
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.13187687"
361
+ y="138.17433"
362
+ x="55.373425"
363
+ id="tspan4808-0"
364
+ sodipodi:role="line">frame 1</tspan><tspan
365
+ id="tspan4850-6"
366
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.13187687"
367
+ y="140.3792"
368
+ x="55.373425"
369
+ sodipodi:role="line">headers</tspan></text>
370
+ </g>
371
+ <rect
372
+ id="rect3680-5-7"
373
+ width="127.784"
374
+ height="20.763075"
375
+ x="50.036816"
376
+ y="133.56465"
377
+ style="fill:#ffe680;stroke:#584800;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
378
+ rx="1"
379
+ ry="1" />
380
+ <text
381
+ xml:space="preserve"
382
+ style="font-style:normal;font-weight:normal;font-size:5.64444447px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
383
+ x="114.3556"
384
+ y="139.4603"
385
+ id="text4804-9-0"
386
+ transform="scale(0.99808408,1.0019196)"><tspan
387
+ sodipodi:role="line"
388
+ id="tspan4802-1-9"
389
+ x="114.3556"
390
+ y="139.4603"
391
+ style="font-size:5.64444447px;text-align:center;text-anchor:middle;stroke-width:0.26458332">transfer frame 2</tspan></text>
392
+ <rect
393
+ style="opacity:0.75;fill:#87c8de;fill-opacity:1;stroke:#174251;stroke-width:0.49999997;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
394
+ id="rect3682-3-3-2-3"
395
+ width="106.32517"
396
+ height="11.456124"
397
+ x="71.495621"
398
+ y="142.87163"
399
+ ry="1"
400
+ rx="0.99999982" />
401
+ <text
402
+ xml:space="preserve"
403
+ style="font-style:normal;font-weight:normal;font-size:3.53887343px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
404
+ x="124.87937"
405
+ y="149.29128"
406
+ id="text4810-6-6-3-5-4"
407
+ transform="scale(0.99808409,1.0019196)"><tspan
408
+ sodipodi:role="line"
409
+ x="124.87937"
410
+ y="149.29128"
411
+ style="font-size:3.53887343px;text-align:center;text-anchor:middle;stroke-width:0.26458332"
412
+ id="tspan4923-6-9-7">packet 3 continuation</tspan></text>
413
+ <g
414
+ style="stroke-width:0.49843231"
415
+ transform="matrix(2.0024466,0,0,2.0101417,-50.159232,-130.04452)"
416
+ id="g5321-32">
417
+ <rect
418
+ rx="0.49938911"
419
+ ry="0.49747732"
420
+ y="135.76961"
421
+ x="50.036804"
422
+ height="5.6991529"
423
+ width="10.716301"
424
+ id="rect3682-0"
425
+ style="opacity:0.75;fill:#de8787;fill-opacity:1;stroke:#561818;stroke-width:0.24921615;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
426
+ <text
427
+ id="text4810-61"
428
+ y="138.17433"
429
+ x="55.373425"
430
+ style="font-style:normal;font-weight:normal;font-size:1.76388884px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.13187687"
431
+ xml:space="preserve"><tspan
432
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.13187687"
433
+ y="138.17433"
434
+ x="55.373425"
435
+ id="tspan4808-5"
436
+ sodipodi:role="line">frame 2</tspan><tspan
437
+ id="tspan4850-54"
438
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.13187687"
439
+ y="140.3792"
440
+ x="55.373425"
441
+ sodipodi:role="line">headers</tspan></text>
442
+ </g>
443
+ <rect
444
+ id="rect3680-5-7-6"
445
+ width="127.784"
446
+ height="20.763075"
447
+ x="50.0368"
448
+ y="159.67786"
449
+ style="fill:#ffe680;stroke:#584800;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
450
+ rx="1"
451
+ ry="1" />
452
+ <rect
453
+ style="opacity:0.75;fill:#87c8de;fill-opacity:1;stroke:#174251;stroke-width:0.49999997;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
454
+ id="rect3682-3-3-2-3-9"
455
+ width="106.32517"
456
+ height="11.456124"
457
+ x="71.495636"
458
+ y="168.98482"
459
+ ry="1"
460
+ rx="0.99999982" />
461
+ <text
462
+ xml:space="preserve"
463
+ style="font-style:normal;font-weight:normal;font-size:3.53887343px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
464
+ x="124.88891"
465
+ y="175.35445"
466
+ id="text4810-6-6-3-5-4-8"
467
+ transform="scale(0.99808409,1.0019196)"><tspan
468
+ sodipodi:role="line"
469
+ x="124.88891"
470
+ y="175.35445"
471
+ style="font-size:3.53887343px;text-align:center;text-anchor:middle;stroke-width:0.26458332"
472
+ id="tspan4923-6-9-7-4">packet 3 continuation</tspan></text>
473
+ <text
474
+ xml:space="preserve"
475
+ style="font-style:normal;font-weight:normal;font-size:5.64444447px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
476
+ x="114.29908"
477
+ y="165.52347"
478
+ id="text4804-9-0-5"
479
+ transform="scale(0.99808408,1.0019196)"><tspan
480
+ sodipodi:role="line"
481
+ id="tspan4802-1-9-0"
482
+ x="114.29908"
483
+ y="165.52347"
484
+ style="font-size:5.64444447px;text-align:center;text-anchor:middle;stroke-width:0.26458332">transfer frame 3</tspan></text>
485
+ <g
486
+ style="stroke-width:0.49843231"
487
+ transform="matrix(2.0024466,0,0,2.0101417,-50.159212,-103.93133)"
488
+ id="g5321-7">
489
+ <rect
490
+ rx="0.49938911"
491
+ ry="0.49747732"
492
+ y="135.76961"
493
+ x="50.036804"
494
+ height="5.6991529"
495
+ width="10.716301"
496
+ id="rect3682-65"
497
+ style="opacity:0.75;fill:#de8787;fill-opacity:1;stroke:#561818;stroke-width:0.24921615;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
498
+ <text
499
+ id="text4810-69"
500
+ y="138.17433"
501
+ x="55.373425"
502
+ style="font-style:normal;font-weight:normal;font-size:1.76388884px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.13187687"
503
+ xml:space="preserve"><tspan
504
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.13187687"
505
+ y="138.17433"
506
+ x="55.373425"
507
+ id="tspan4808-3"
508
+ sodipodi:role="line">frame 3</tspan><tspan
509
+ id="tspan4850-7"
510
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.13187687"
511
+ y="140.3792"
512
+ x="55.373425"
513
+ sodipodi:role="line">headers</tspan></text>
514
+ </g>
515
+ </g>
516
+ </svg>
@@ -0,0 +1,420 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
6
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
7
+ xmlns:cc="http://creativecommons.org/ns#"
8
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9
+ xmlns:svg="http://www.w3.org/2000/svg"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+ width="262.64679mm"
14
+ height="71.493126mm"
15
+ viewBox="0 0 262.64676 71.493128"
16
+ version="1.1"
17
+ id="svg8"
18
+ inkscape:version="0.92.1 r15371"
19
+ sodipodi:docname="prefixed_packets_after_extraction_and_prefixing.svg">
20
+ <defs
21
+ id="defs2">
22
+ <linearGradient
23
+ id="linearGradient4798"
24
+ osb:paint="solid">
25
+ <stop
26
+ style="stop-color:#174251;stop-opacity:1;"
27
+ offset="0"
28
+ id="stop4796" />
29
+ </linearGradient>
30
+ <marker
31
+ inkscape:stockid="DotL"
32
+ orient="auto"
33
+ refY="0"
34
+ refX="0"
35
+ id="DotL"
36
+ style="overflow:visible"
37
+ inkscape:isstock="true">
38
+ <path
39
+ id="path4562"
40
+ d="m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z"
41
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt"
42
+ transform="matrix(0.8,0,0,0.8,5.92,0.8)"
43
+ inkscape:connector-curvature="0" />
44
+ </marker>
45
+ <linearGradient
46
+ id="linearGradient4497"
47
+ osb:paint="solid">
48
+ <stop
49
+ style="stop-color:#584800;stop-opacity:1;"
50
+ offset="0"
51
+ id="stop4495" />
52
+ </linearGradient>
53
+ <linearGradient
54
+ id="linearGradient4491"
55
+ osb:paint="solid">
56
+ <stop
57
+ style="stop-color:#584800;stop-opacity:1;"
58
+ offset="0"
59
+ id="stop4489" />
60
+ </linearGradient>
61
+ </defs>
62
+ <sodipodi:namedview
63
+ id="base"
64
+ pagecolor="#ffffff"
65
+ bordercolor="#666666"
66
+ borderopacity="1.0"
67
+ inkscape:pageopacity="0.0"
68
+ inkscape:pageshadow="2"
69
+ inkscape:zoom="0.35355339"
70
+ inkscape:cx="-374.92691"
71
+ inkscape:cy="-246.65595"
72
+ inkscape:document-units="mm"
73
+ inkscape:current-layer="layer1"
74
+ showgrid="false"
75
+ showguides="true"
76
+ inkscape:guide-bbox="true"
77
+ inkscape:snap-bbox="true"
78
+ inkscape:snap-bbox-midpoints="true"
79
+ inkscape:bbox-nodes="true"
80
+ inkscape:snap-bbox-edge-midpoints="true"
81
+ inkscape:window-width="1280"
82
+ inkscape:window-height="987"
83
+ inkscape:window-x="0"
84
+ inkscape:window-y="56"
85
+ inkscape:window-maximized="1"
86
+ fit-margin-top="5"
87
+ fit-margin-left="5"
88
+ fit-margin-bottom="5"
89
+ fit-margin-right="5"
90
+ inkscape:measure-start="109.425,102.177"
91
+ inkscape:measure-end="42.3923,85.2796">
92
+ <sodipodi:guide
93
+ position="4.9999994,49.993415"
94
+ orientation="1,0"
95
+ id="guide61"
96
+ inkscape:locked="false" />
97
+ <sodipodi:guide
98
+ position="27.659442,60.496069"
99
+ orientation="0,1"
100
+ id="guide63"
101
+ inkscape:locked="false" />
102
+ <sodipodi:guide
103
+ position="26.47516,43.996384"
104
+ orientation="0,1"
105
+ id="guide65"
106
+ inkscape:locked="false" />
107
+ <sodipodi:guide
108
+ position="27.158436,27.496706"
109
+ orientation="0,1"
110
+ id="guide67"
111
+ inkscape:locked="false" />
112
+ <sodipodi:guide
113
+ position="27.158436,10.99705"
114
+ orientation="0,1"
115
+ id="guide69"
116
+ inkscape:locked="false" />
117
+ </sodipodi:namedview>
118
+ <metadata
119
+ id="metadata5">
120
+ <rdf:RDF>
121
+ <cc:Work
122
+ rdf:about="">
123
+ <dc:format>image/svg+xml</dc:format>
124
+ <dc:type
125
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
126
+ <dc:title />
127
+ </cc:Work>
128
+ </rdf:RDF>
129
+ </metadata>
130
+ <g
131
+ inkscape:label="Layer 1"
132
+ inkscape:groupmode="layer"
133
+ id="layer1"
134
+ transform="translate(-44.695346,-93.823867)">
135
+ <g
136
+ id="g78"
137
+ transform="matrix(2.0039709,0,0,2.0165312,-50.327733,-174.709)"
138
+ style="stroke-width:0.49745274">
139
+ <g
140
+ id="g5321"
141
+ style="stroke-width:0.49745274">
142
+ <rect
143
+ style="opacity:0.75;fill:#de8787;fill-opacity:1;stroke:#561818;stroke-width:0.24872637;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
144
+ id="rect3682"
145
+ width="10.716301"
146
+ height="5.6991529"
147
+ x="50.036804"
148
+ y="135.76961"
149
+ ry="0.49590105"
150
+ rx="0.49900925" />
151
+ <text
152
+ xml:space="preserve"
153
+ style="font-style:normal;font-weight:normal;font-size:1.76388884px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.1316177"
154
+ x="55.373425"
155
+ y="138.17433"
156
+ id="text4810"><tspan
157
+ sodipodi:role="line"
158
+ id="tspan4808"
159
+ x="55.373425"
160
+ y="138.17433"
161
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.1316177">frame 0</tspan><tspan
162
+ sodipodi:role="line"
163
+ x="55.373425"
164
+ y="140.3792"
165
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.1316177"
166
+ id="tspan4850">headers</tspan></text>
167
+ </g>
168
+ <rect
169
+ rx="0.49900925"
170
+ ry="0.49590108"
171
+ y="135.76961"
172
+ x="60.753101"
173
+ height="5.6991625"
174
+ width="13.273743"
175
+ id="rect3682-3"
176
+ style="opacity:0.75;fill:#87c8de;fill-opacity:1;stroke:#174251;stroke-width:0.24872637;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
177
+ <text
178
+ id="text4810-6"
179
+ y="139.1058"
180
+ x="67.229774"
181
+ style="font-style:normal;font-weight:normal;font-size:1.76388884px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.1316177"
182
+ xml:space="preserve"><tspan
183
+ id="tspan4850-5"
184
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.1316177"
185
+ y="139.1058"
186
+ x="67.229774"
187
+ sodipodi:role="line">packet 0</tspan></text>
188
+ </g>
189
+ <g
190
+ id="g92"
191
+ transform="matrix(2.0039709,0,0,2.0165312,-50.327733,-170.71007)"
192
+ style="stroke-width:0.49745274">
193
+ <rect
194
+ rx="0.49900925"
195
+ ry="0.49590108"
196
+ y="141.96875"
197
+ x="60.753109"
198
+ height="5.6991625"
199
+ width="39.823902"
200
+ id="rect3682-3-3"
201
+ style="opacity:0.75;fill:#87c8de;fill-opacity:1;stroke:#174251;stroke-width:0.24872637;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
202
+ <text
203
+ id="text4810-6-6"
204
+ y="145.30495"
205
+ x="80.666779"
206
+ style="font-style:normal;font-weight:normal;font-size:1.76388884px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.1316177"
207
+ xml:space="preserve"><tspan
208
+ id="tspan4923"
209
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.1316177"
210
+ y="145.30495"
211
+ x="80.666779"
212
+ sodipodi:role="line">packet 1</tspan></text>
213
+ <rect
214
+ rx="0.49900922"
215
+ ry="0.49590108"
216
+ y="141.96875"
217
+ x="100.577"
218
+ height="5.6991625"
219
+ width="13.458221"
220
+ id="rect3682-3-3-2-0"
221
+ style="opacity:0.75;fill:#87c8de;fill-opacity:1;stroke:#174251;stroke-width:0.24872637;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
222
+ <text
223
+ id="text4810-6-6-3-2"
224
+ y="144.37349"
225
+ x="107.33324"
226
+ style="font-style:normal;font-weight:normal;font-size:1.76388884px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.1316177"
227
+ xml:space="preserve"><tspan
228
+ id="tspan4923-6-3"
229
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.1316177"
230
+ y="144.37349"
231
+ x="107.33324"
232
+ sodipodi:role="line">packet 1</tspan><tspan
233
+ id="tspan5125"
234
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.1316177"
235
+ y="146.57835"
236
+ x="107.33324"
237
+ sodipodi:role="line">continuation</tspan></text>
238
+ <g
239
+ id="g5321-3"
240
+ transform="translate(0,6.1991529)"
241
+ style="stroke-width:0.49745274">
242
+ <rect
243
+ style="opacity:0.75;fill:#de8787;fill-opacity:1;stroke:#561818;stroke-width:0.24872637;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
244
+ id="rect3682-6"
245
+ width="10.716301"
246
+ height="5.6991529"
247
+ x="50.036804"
248
+ y="135.76961"
249
+ ry="0.49590105"
250
+ rx="0.49900925" />
251
+ <text
252
+ xml:space="preserve"
253
+ style="font-style:normal;font-weight:normal;font-size:1.76388884px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.1316177"
254
+ x="55.373425"
255
+ y="138.17433"
256
+ id="text4810-1"><tspan
257
+ sodipodi:role="line"
258
+ id="tspan4808-0"
259
+ x="55.373425"
260
+ y="138.17433"
261
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.1316177">frame 0</tspan><tspan
262
+ sodipodi:role="line"
263
+ x="55.373425"
264
+ y="140.3792"
265
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.1316177"
266
+ id="tspan4850-6">headers</tspan></text>
267
+ </g>
268
+ </g>
269
+ <g
270
+ id="g102"
271
+ transform="matrix(2.0039709,0,0,2.0165312,-50.327733,-166.71119)"
272
+ style="stroke-width:0.49745274">
273
+ <rect
274
+ rx="0.49900916"
275
+ ry="0.49590108"
276
+ y="148.16791"
277
+ x="60.753101"
278
+ height="5.6991625"
279
+ width="30.726629"
280
+ id="rect3682-3-3-2"
281
+ style="opacity:0.75;fill:#87c8de;fill-opacity:1;stroke:#174251;stroke-width:0.24872635;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
282
+ <text
283
+ id="text4810-6-6-3"
284
+ y="151.5041"
285
+ x="76.125031"
286
+ style="font-style:normal;font-weight:normal;font-size:1.76388884px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.1316177"
287
+ xml:space="preserve"><tspan
288
+ id="tspan4923-6"
289
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.1316177"
290
+ y="151.5041"
291
+ x="76.125031"
292
+ sodipodi:role="line">packet 2</tspan></text>
293
+ <g
294
+ id="g5321-32"
295
+ transform="translate(0,12.398306)"
296
+ style="stroke-width:0.49745274">
297
+ <rect
298
+ style="opacity:0.75;fill:#de8787;fill-opacity:1;stroke:#561818;stroke-width:0.24872637;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
299
+ id="rect3682-0"
300
+ width="10.716301"
301
+ height="5.6991529"
302
+ x="50.036804"
303
+ y="135.76961"
304
+ ry="0.49590105"
305
+ rx="0.49900925" />
306
+ <text
307
+ xml:space="preserve"
308
+ style="font-style:normal;font-weight:normal;font-size:1.76388884px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.1316177"
309
+ x="55.373425"
310
+ y="138.17433"
311
+ id="text4810-61"><tspan
312
+ sodipodi:role="line"
313
+ id="tspan4808-5"
314
+ x="55.373425"
315
+ y="138.17433"
316
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.1316177">frame 1</tspan><tspan
317
+ sodipodi:role="line"
318
+ x="55.373425"
319
+ y="140.3792"
320
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.1316177"
321
+ id="tspan4850-54">headers</tspan></text>
322
+ </g>
323
+ </g>
324
+ <g
325
+ id="g118"
326
+ transform="matrix(2.0039709,0,0,2.0165312,-50.327733,-162.71233)"
327
+ style="stroke-width:0.49745274">
328
+ <rect
329
+ rx="0.49900919"
330
+ ry="0.49590108"
331
+ y="154.36707"
332
+ x="60.753105"
333
+ height="5.6991625"
334
+ width="8.9127779"
335
+ id="rect3682-3-3-2-7"
336
+ style="opacity:0.75;fill:#87c8de;fill-opacity:1;stroke:#174251;stroke-width:0.24872635;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
337
+ <text
338
+ id="text4810-6-6-3-5"
339
+ y="157.70326"
340
+ x="65.200447"
341
+ style="font-style:normal;font-weight:normal;font-size:1.76388884px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.1316177"
342
+ xml:space="preserve"><tspan
343
+ id="tspan4923-6-9"
344
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.1316177"
345
+ y="157.70326"
346
+ x="65.200447"
347
+ sodipodi:role="line">packet 3</tspan></text>
348
+ <rect
349
+ rx="0.49900916"
350
+ ry="0.49590108"
351
+ y="154.36707"
352
+ x="69.665886"
353
+ height="5.6991625"
354
+ width="53.097633"
355
+ id="rect3682-3-3-2-3"
356
+ style="opacity:0.75;fill:#87c8de;fill-opacity:1;stroke:#174251;stroke-width:0.24872635;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
357
+ <rect
358
+ rx="0.49900916"
359
+ ry="0.49590108"
360
+ y="154.36707"
361
+ x="122.76353"
362
+ height="5.6991625"
363
+ width="53.097633"
364
+ id="rect3682-3-3-2-3-9"
365
+ style="opacity:0.75;fill:#87c8de;fill-opacity:1;stroke:#174251;stroke-width:0.24872635;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
366
+ <text
367
+ id="text4810-6-6-3-5-4"
368
+ y="157.70326"
369
+ x="96.210396"
370
+ style="font-style:normal;font-weight:normal;font-size:1.76388884px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.1316177"
371
+ xml:space="preserve"><tspan
372
+ id="tspan4923-6-9-7"
373
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.1316177"
374
+ y="157.70326"
375
+ x="96.210396"
376
+ sodipodi:role="line">packet 3 continuation</tspan></text>
377
+ <text
378
+ id="text4810-6-6-3-5-4-8"
379
+ y="157.70326"
380
+ x="149.30804"
381
+ style="font-style:normal;font-weight:normal;font-size:1.76388884px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.1316177"
382
+ xml:space="preserve"><tspan
383
+ id="tspan4923-6-9-7-4"
384
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.1316177"
385
+ y="157.70326"
386
+ x="149.30804"
387
+ sodipodi:role="line">packet 3 continuation</tspan></text>
388
+ <g
389
+ id="g5321-32-4"
390
+ transform="translate(0,18.597459)"
391
+ style="stroke-width:0.49745274">
392
+ <rect
393
+ style="opacity:0.75;fill:#de8787;fill-opacity:1;stroke:#561818;stroke-width:0.24872637;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
394
+ id="rect3682-0-5"
395
+ width="10.716301"
396
+ height="5.6991529"
397
+ x="50.036804"
398
+ y="135.76961"
399
+ ry="0.49590105"
400
+ rx="0.49900925" />
401
+ <text
402
+ xml:space="preserve"
403
+ style="font-style:normal;font-weight:normal;font-size:1.76388884px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.1316177"
404
+ x="55.373425"
405
+ y="138.17433"
406
+ id="text4810-61-2"><tspan
407
+ sodipodi:role="line"
408
+ id="tspan4808-5-5"
409
+ x="55.373425"
410
+ y="138.17433"
411
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.1316177">frame 1</tspan><tspan
412
+ sodipodi:role="line"
413
+ x="55.373425"
414
+ y="140.3792"
415
+ style="font-size:1.76388884px;text-align:center;text-anchor:middle;stroke-width:0.1316177"
416
+ id="tspan4850-54-4">headers</tspan></text>
417
+ </g>
418
+ </g>
419
+ </g>
420
+ </svg>
@@ -29,9 +29,8 @@ module Cosmos
29
29
  # Only read is supported.
30
30
  class CcsdsTransferFrameProtocol < Protocol
31
31
  FRAME_PRIMARY_HEADER_LENGTH = 6
32
- FIRST_HEADER_POINTER_OFFSET = 4
33
- # last 11 bits
34
- FIRST_HEADER_POINTER_MASK = [0b00000111, 0b11111111]
32
+ FIRST_HEADER_POINTER_BIT_OFFSET = FRAME_PRIMARY_HEADER_LENGTH * 8 - 11
33
+ FIRST_HEADER_POINTER_BITS = 11
35
34
  IDLE_FRAME_FIRST_HEADER_POINTER = 0b11111111110
36
35
  NO_PACKET_START_FIRST_HEADER_POINTER = 0b11111111111
37
36
  FRAME_VIRTUAL_CHANNEL_BIT_OFFSET = 12
@@ -42,9 +41,9 @@ module Cosmos
42
41
  SPACE_PACKET_HEADER_LENGTH = 6
43
42
  SPACE_PACKET_LENGTH_BIT_OFFSET = 4 * 8
44
43
  SPACE_PACKET_LENGTH_BITS = 2 * 8
45
- SPACE_PACKET_APID_BITS = 14
44
+ SPACE_PACKET_APID_BITS = 11
46
45
  SPACE_PACKET_APID_BIT_OFFSET = 2 * 8 - SPACE_PACKET_APID_BITS
47
- IDLE_PACKET_APID = 0b11111111111111
46
+ IDLE_PACKET_APID = 0b11111111111
48
47
 
49
48
  # @param transfer_frame_length [Integer] Length of transfer frame in bytes
50
49
  # @param transfer_frame_secondary_header_length [Integer] Length of
@@ -136,18 +135,21 @@ module Cosmos
136
135
  # packets.
137
136
  def get_packet
138
137
  @virtual_channels.each do |vc|
139
- loop do
140
- # Skip if there's only a single incomplete packet in the queue.
141
- break if (vc.packet_queue.length == 1 &&
142
- vc.pending_incomplete_packet_bytes_left > 0)
143
-
138
+ # avoid extracting incomplete packets
139
+ while (vc.packet_queue.length >= 2 ||
140
+ (vc.packet_queue.length == 1 &&
141
+ vc.pending_incomplete_packet_bytes_left == 0))
144
142
  packet_data = vc.packet_queue.shift
145
143
 
146
- break if packet_data.nil?
147
-
148
- return packet_data if @include_idle_packets
144
+ return packet_data if (@include_idle_packets ||
145
+ packet_data.length < SPACE_PACKET_HEADER_LENGTH)
149
146
 
150
- apid = get_space_packet_apid(packet_data[@packet_prefix_length, SPACE_PACKET_HEADER_LENGTH])
147
+ apid = BinaryAccessor.read(
148
+ @packet_prefix_length * 8 + SPACE_PACKET_APID_BIT_OFFSET,
149
+ SPACE_PACKET_APID_BITS,
150
+ :UINT,
151
+ packet_data,
152
+ :BIG_ENDIAN)
151
153
  return packet_data unless (apid == IDLE_PACKET_APID)
152
154
  end
153
155
  end
@@ -167,9 +169,12 @@ module Cosmos
167
169
  #
168
170
  # @param frame [String] Transfer frame data.
169
171
  def process_frame(frame)
170
- first_header_pointer =
171
- ((frame.bytes[FIRST_HEADER_POINTER_OFFSET] & FIRST_HEADER_POINTER_MASK[0]) << 8) |
172
- (frame.bytes[FIRST_HEADER_POINTER_OFFSET + 1] & FIRST_HEADER_POINTER_MASK[1])
172
+ first_header_pointer = BinaryAccessor.read(
173
+ FIRST_HEADER_POINTER_BIT_OFFSET,
174
+ FIRST_HEADER_POINTER_BITS,
175
+ :UINT,
176
+ frame,
177
+ :BIG_ENDIAN)
173
178
 
174
179
  return if (first_header_pointer == IDLE_FRAME_FIRST_HEADER_POINTER)
175
180
 
@@ -235,10 +240,14 @@ module Cosmos
235
240
  end
236
241
  vc.packet_queue[-1] << packet_continuation.slice!(0, rest_of_packet_header_length)
237
242
 
238
- space_packet_length = get_space_packet_length(vc.packet_queue[-1][@packet_prefix_length..-1])
239
- throw "failed to get space packet length" if Symbol === space_packet_length && space_packet_length == :STOP
240
-
241
- vc.pending_incomplete_packet_bytes_left = space_packet_length - SPACE_PACKET_HEADER_LENGTH
243
+ # actual length in ccsds space packet is stored value plus one
244
+ space_packet_data_field_length = BinaryAccessor.read(
245
+ @packet_prefix_length * 8 + SPACE_PACKET_LENGTH_BIT_OFFSET,
246
+ SPACE_PACKET_LENGTH_BITS,
247
+ :UINT,
248
+ vc.packet_queue[-1],
249
+ :BIG_ENDIAN) + 1
250
+ vc.pending_incomplete_packet_bytes_left = space_packet_data_field_length
242
251
  end
243
252
 
244
253
  if (first_header_pointer == NO_PACKET_START_FIRST_HEADER_POINTER)
@@ -300,61 +309,42 @@ module Cosmos
300
309
  def store_packets(virtual_channel, frame_headers, frame_data_field)
301
310
  vc = @virtual_channels[virtual_channel]
302
311
  while (frame_data_field.length > 0) do
303
- if (@prefix_packets)
304
- vc.packet_queue << frame_headers.clone
305
- else
306
- vc.packet_queue << ""
307
- end
308
-
309
312
  if (frame_data_field.length < SPACE_PACKET_HEADER_LENGTH)
310
- vc.packet_queue[-1] << frame_data_field
313
+ if (@prefix_packets)
314
+ vc.packet_queue << (frame_headers.clone << frame_data_field)
315
+ else
316
+ vc.packet_queue << frame_data_field
317
+ end
311
318
  vc.pending_incomplete_packet_bytes_left = SPACE_PACKET_HEADER_LENGTH - frame_data_field.length
312
319
  return
313
320
  end
314
321
 
315
- space_packet_length = get_space_packet_length(frame_data_field)
316
- throw "failed to get space packet length" if Symbol === space_packet_length && space_packet_length == :STOP
322
+ # actual length in ccsds space packet is stored value plus one
323
+ space_packet_data_field_length = BinaryAccessor.read(
324
+ SPACE_PACKET_LENGTH_BIT_OFFSET,
325
+ SPACE_PACKET_LENGTH_BITS,
326
+ :UINT,
327
+ frame_data_field,
328
+ :BIG_ENDIAN) + 1
329
+ space_packet_length = SPACE_PACKET_HEADER_LENGTH + space_packet_data_field_length
317
330
 
318
331
  if (space_packet_length > frame_data_field.length)
319
- vc.packet_queue[-1] << frame_data_field
332
+ if (@prefix_packets)
333
+ vc.packet_queue << (frame_headers.clone << frame_data_field)
334
+ else
335
+ vc.packet_queue << frame_data_field
336
+ end
320
337
  vc.pending_incomplete_packet_bytes_left = space_packet_length - frame_data_field.length
321
338
  return
322
339
  end
323
340
 
324
- vc.packet_queue[-1] << frame_data_field.slice!(0, space_packet_length)
341
+ if (@prefix_packets)
342
+ vc.packet_queue << (frame_headers.clone << frame_data_field.slice!(0, space_packet_length))
343
+ else
344
+ vc.packet_queue << frame_data_field.slice!(0, space_packet_length)
345
+ end
325
346
  end
326
347
  end
327
-
328
- def get_space_packet_length(space_packet)
329
- # signal more data needed if we do not have enough to determine the
330
- # length of the space packet
331
- return :STOP if (space_packet.length < SPACE_PACKET_HEADER_LENGTH)
332
-
333
- # actual length in ccsds space packet is stored value plus one
334
- space_packet_data_field_length = BinaryAccessor.read(
335
- SPACE_PACKET_LENGTH_BIT_OFFSET,
336
- SPACE_PACKET_LENGTH_BITS,
337
- :UINT,
338
- space_packet,
339
- :BIG_ENDIAN) + 1
340
- space_packet_length = SPACE_PACKET_HEADER_LENGTH + space_packet_data_field_length
341
- return space_packet_length
342
- end
343
-
344
- def get_space_packet_apid(space_packet)
345
- # signal more data needed if we do not have enough of the header to
346
- # determine the apid of the space packet
347
- return :STOP if (space_packet.length < (SPACE_PACKET_APID_BIT_OFFSET + SPACE_PACKET_APID_BITS) / 8)
348
-
349
- # actual length in ccsds space packet is stored value plus one
350
- space_packet_apid = BinaryAccessor.read(
351
- SPACE_PACKET_APID_BIT_OFFSET,
352
- SPACE_PACKET_APID_BITS,
353
- :UINT,
354
- space_packet,
355
- :BIG_ENDIAN)
356
- return space_packet_apid
357
- end
358
348
  end
359
349
  end
360
350
  end
@@ -1,5 +1,5 @@
1
1
  module Cosmos
2
2
  module CcsdsTransferFrames
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cosmos-ccsds_transfer_frames
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Erik Werner
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-12 00:00:00.000000000 Z
11
+ date: 2018-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cosmos
@@ -101,6 +101,8 @@ files:
101
101
  - Rakefile
102
102
  - bin/setup
103
103
  - cosmos-ccsds_transfer_frames.gemspec
104
+ - img/frames_before_packet_extraction_and_prefixing.svg
105
+ - img/prefixed_packets_after_extraction_and_prefixing.svg
104
106
  - lib/cosmos/ccsds_transfer_frames.rb
105
107
  - lib/cosmos/ccsds_transfer_frames/ccsds_transfer_frame_protocol.rb
106
108
  - lib/cosmos/ccsds_transfer_frames/version.rb