@@ -187,6 +187,311 @@ def test_block_upload(self):
187187 data = fp .read ()
188188 self .assertEqual (data , 'Tiny Node - Mega Domains !' )
189189
190+ def test_sdo_block_upload_retransmit (self ):
191+ """Trigger a retransmit by only validating a block partially."""
192+ self .data = [
193+ (TX , b'\xa4 \x08 \x10 \x00 \x7f \x00 \x00 \x00 ' ),
194+ (RX , b'\xc4 \x08 \x10 \x00 \x00 \x00 \x00 \x00 ' ),
195+ (TX , b'\xa3 \x00 \x00 \x00 \x00 \x00 \x00 \x00 ' ),
196+ (RX , b'\x01 \x74 \x68 \x65 \x20 \x63 \x72 \x61 ' ),
197+ (RX , b'\x02 \x7a \x79 \x20 \x66 \x6f \x78 \x20 ' ),
198+ (RX , b'\x03 \x6a \x75 \x6d \x70 \x73 \x20 \x6f ' ),
199+ (RX , b'\x04 \x76 \x65 \x72 \x20 \x74 \x68 \x65 ' ),
200+ (RX , b'\x05 \x20 \x6c \x61 \x7a \x79 \x20 \x64 ' ),
201+ (RX , b'\x06 \x6f \x67 \x0a \x74 \x68 \x65 \x20 ' ),
202+ (RX , b'\x07 \x63 \x72 \x61 \x7a \x79 \x20 \x66 ' ),
203+ (RX , b'\x08 \x6f \x78 \x20 \x6a \x75 \x6d \x70 ' ),
204+ (RX , b'\x09 \x73 \x20 \x6f \x76 \x65 \x72 \x20 ' ),
205+ (RX , b'\x0a \x74 \x68 \x65 \x20 \x6c \x61 \x7a ' ),
206+ (RX , b'\x0b \x79 \x20 \x64 \x6f \x67 \x0a \x74 ' ),
207+ (RX , b'\x0c \x68 \x65 \x20 \x63 \x72 \x61 \x7a ' ),
208+ (RX , b'\x0d \x79 \x20 \x66 \x6f \x78 \x20 \x6a ' ),
209+ (RX , b'\x0e \x75 \x6d \x70 \x73 \x20 \x6f \x76 ' ),
210+ (RX , b'\x0f \x65 \x72 \x20 \x74 \x68 \x65 \x20 ' ),
211+ (RX , b'\x10 \x6c \x61 \x7a \x79 \x20 \x64 \x6f ' ),
212+ (RX , b'\x11 \x67 \x0a \x74 \x68 \x65 \x20 \x63 ' ),
213+ (RX , b'\x12 \x72 \x61 \x7a \x79 \x20 \x66 \x6f ' ),
214+ (RX , b'\x13 \x78 \x20 \x6a \x75 \x6d \x70 \x73 ' ),
215+ (RX , b'\x14 \x20 \x6f \x76 \x65 \x72 \x20 \x74 ' ),
216+ (RX , b'\x15 \x68 \x65 \x20 \x6c \x61 \x7a \x79 ' ),
217+ (RX , b'\x16 \x20 \x64 \x6f \x67 \x0a \x74 \x68 ' ),
218+ (RX , b'\x17 \x65 \x20 \x63 \x72 \x61 \x7a \x79 ' ),
219+ (RX , b'\x18 \x20 \x66 \x6f \x78 \x20 \x6a \x75 ' ),
220+ (RX , b'\x19 \x6d \x70 \x73 \x20 \x6f \x76 \x65 ' ),
221+ (RX , b'\x1a \x72 \x20 \x74 \x68 \x65 \x20 \x6c ' ),
222+ (RX , b'\x1b \x61 \x7a \x79 \x20 \x64 \x6f \x67 ' ),
223+ (RX , b'\x1c \x0a \x74 \x68 \x65 \x20 \x63 \x72 ' ),
224+ (RX , b'\x1d \x61 \x7a \x79 \x20 \x66 \x6f \x78 ' ),
225+ (RX , b'\x1e \x20 \x6a \x75 \x6d \x70 \x73 \x20 ' ),
226+ (RX , b'\x1f \x6f \x76 \x65 \x72 \x20 \x74 \x68 ' ),
227+ (RX , b'\x20 \x65 \x20 \x6c \x61 \x7a \x79 \x20 ' ),
228+ (RX , b'\x21 \x64 \x6f \x67 \x0a \x74 \x68 \x65 ' ),
229+ (RX , b'\x22 \x20 \x63 \x72 \x61 \x7a \x79 \x20 ' ),
230+ (RX , b'\x23 \x66 \x6f \x78 \x20 \x6a \x75 \x6d ' ),
231+ (RX , b'\x24 \x70 \x73 \x20 \x6f \x76 \x65 \x72 ' ),
232+ (RX , b'\x25 \x20 \x74 \x68 \x65 \x20 \x6c \x61 ' ),
233+ (RX , b'\x26 \x7a \x79 \x20 \x64 \x6f \x67 \x0a ' ),
234+ (RX , b'\x27 \x74 \x68 \x65 \x20 \x63 \x72 \x61 ' ),
235+ (RX , b'\x28 \x7a \x79 \x20 \x66 \x6f \x78 \x20 ' ),
236+ (RX , b'\x29 \x6a \x75 \x6d \x70 \x73 \x20 \x6f ' ),
237+ (RX , b'\x2a \x76 \x65 \x72 \x20 \x74 \x68 \x65 ' ),
238+ (RX , b'\x2b \x20 \x6c \x61 \x7a \x79 \x20 \x64 ' ),
239+ (RX , b'\x2c \x6f \x67 \x0a \x74 \x68 \x65 \x20 ' ),
240+ (RX , b'\x2d \x63 \x72 \x61 \x7a \x79 \x20 \x66 ' ),
241+ (RX , b'\x2e \x6f \x78 \x20 \x6a \x75 \x6d \x70 ' ),
242+ (RX , b'\x2f \x73 \x20 \x6f \x76 \x65 \x72 \x20 ' ),
243+ (RX , b'\x30 \x74 \x68 \x65 \x20 \x6c \x61 \x7a ' ),
244+ (RX , b'\x31 \x79 \x20 \x64 \x6f \x67 \x0a \x74 ' ),
245+ (RX , b'\x32 \x68 \x65 \x20 \x63 \x72 \x61 \x7a ' ),
246+ (RX , b'\x34 \x79 \x20 \x66 \x6f \x78 \x20 \x6a ' ), # --> Wrong seqno (x34 instead of x33)
247+ (RX , b'\x33 \x75 \x6d \x70 \x73 \x20 \x6f \x76 ' ), # All the following frames until end of block
248+ (RX , b'\x35 \x65 \x72 \x20 \x74 \x68 \x65 \x20 ' ), # will be ignored by the client and should be
249+ (RX , b'\x36 \x6c \x61 \x7a \x79 \x20 \x64 \x6f ' ), # resent by server.
250+ (RX , b'\x37 \x67 \x0a \x74 \x68 \x65 \x20 \x63 ' ),
251+ (RX , b'\x38 \x72 \x61 \x7a \x79 \x20 \x66 \x6f ' ),
252+ (RX , b'\x39 \x78 \x20 \x6a \x75 \x6d \x70 \x73 ' ),
253+ (RX , b'\x3a \x20 \x6f \x76 \x65 \x72 \x20 \x74 ' ),
254+ (RX , b'\x3b \x68 \x65 \x20 \x6c \x61 \x7a \x79 ' ),
255+ (RX , b'\x3c \x20 \x64 \x6f \x67 \x0a \x74 \x68 ' ),
256+ (RX , b'\x3d \x65 \x20 \x63 \x72 \x61 \x7a \x79 ' ),
257+ (RX , b'\x3e \x20 \x66 \x6f \x78 \x20 \x6a \x75 ' ),
258+ (RX , b'\x3f \x6d \x70 \x73 \x20 \x6f \x76 \x65 ' ),
259+ (RX , b'\x40 \x72 \x20 \x74 \x68 \x65 \x20 \x6c ' ),
260+ (RX , b'\x41 \x61 \x7a \x79 \x20 \x64 \x6f \x67 ' ),
261+ (RX , b'\x42 \x0a \x74 \x68 \x65 \x20 \x63 \x72 ' ),
262+ (RX , b'\x43 \x61 \x7a \x79 \x20 \x66 \x6f \x78 ' ),
263+ (RX , b'\x44 \x20 \x6a \x75 \x6d \x70 \x73 \x20 ' ),
264+ (RX , b'\x45 \x6f \x76 \x65 \x72 \x20 \x74 \x68 ' ),
265+ (RX , b'\x46 \x65 \x20 \x6c \x61 \x7a \x79 \x20 ' ),
266+ (RX , b'\x47 \x64 \x6f \x67 \x0a \x74 \x68 \x65 ' ),
267+ (RX , b'\x48 \x20 \x63 \x72 \x61 \x7a \x79 \x20 ' ),
268+ (RX , b'\x49 \x66 \x6f \x78 \x20 \x6a \x75 \x6d ' ),
269+ (RX , b'\x4a \x70 \x73 \x20 \x6f \x76 \x65 \x72 ' ),
270+ (RX , b'\x4b \x20 \x74 \x68 \x65 \x20 \x6c \x61 ' ),
271+ (RX , b'\x4c \x7a \x79 \x20 \x64 \x6f \x67 \x0a ' ),
272+ (RX , b'\x4d \x74 \x68 \x65 \x20 \x63 \x72 \x61 ' ),
273+ (RX , b'\x4e \x7a \x79 \x20 \x66 \x6f \x78 \x20 ' ),
274+ (RX , b'\x4f \x6a \x75 \x6d \x70 \x73 \x20 \x6f ' ),
275+ (RX , b'\x50 \x76 \x65 \x72 \x20 \x74 \x68 \x65 ' ),
276+ (RX , b'\x51 \x20 \x6c \x61 \x7a \x79 \x20 \x64 ' ),
277+ (RX , b'\x52 \x6f \x67 \x0a \x74 \x68 \x65 \x20 ' ),
278+ (RX , b'\x53 \x63 \x72 \x61 \x7a \x79 \x20 \x66 ' ),
279+ (RX , b'\x54 \x6f \x78 \x20 \x6a \x75 \x6d \x70 ' ),
280+ (RX , b'\x55 \x73 \x20 \x6f \x76 \x65 \x72 \x20 ' ),
281+ (RX , b'\x56 \x74 \x68 \x65 \x20 \x6c \x61 \x7a ' ),
282+ (RX , b'\x57 \x79 \x20 \x64 \x6f \x67 \x0a \x74 ' ),
283+ (RX , b'\x58 \x68 \x65 \x20 \x63 \x72 \x61 \x7a ' ),
284+ (RX , b'\x59 \x79 \x20 \x66 \x6f \x78 \x20 \x6a ' ),
285+ (RX , b'\x5a \x75 \x6d \x70 \x73 \x20 \x6f \x76 ' ),
286+ (RX , b'\x5b \x65 \x72 \x20 \x74 \x68 \x65 \x20 ' ),
287+ (RX , b'\x5c \x6c \x61 \x7a \x79 \x20 \x64 \x6f ' ),
288+ (RX , b'\x5d \x67 \x0a \x74 \x68 \x65 \x20 \x63 ' ),
289+ (RX , b'\x5e \x72 \x61 \x7a \x79 \x20 \x66 \x6f ' ),
290+ (RX , b'\x5f \x78 \x20 \x6a \x75 \x6d \x70 \x73 ' ),
291+ (RX , b'\x60 \x20 \x6f \x76 \x65 \x72 \x20 \x74 ' ),
292+ (RX , b'\x61 \x68 \x65 \x20 \x6c \x61 \x7a \x79 ' ),
293+ (RX , b'\x62 \x20 \x64 \x6f \x67 \x0a \x74 \x68 ' ),
294+ (RX , b'\x63 \x65 \x20 \x63 \x72 \x61 \x7a \x79 ' ),
295+ (RX , b'\x64 \x20 \x66 \x6f \x78 \x20 \x6a \x75 ' ),
296+ (RX , b'\x65 \x6d \x70 \x73 \x20 \x6f \x76 \x65 ' ),
297+ (RX , b'\x66 \x72 \x20 \x74 \x68 \x65 \x20 \x6c ' ),
298+ (RX , b'\x67 \x61 \x7a \x79 \x20 \x64 \x6f \x67 ' ),
299+ (RX , b'\x68 \x0a \x74 \x68 \x65 \x20 \x63 \x72 ' ),
300+ (RX , b'\x69 \x61 \x7a \x79 \x20 \x66 \x6f \x78 ' ),
301+ (RX , b'\x6a \x20 \x6a \x75 \x6d \x70 \x73 \x20 ' ),
302+ (RX , b'\x6b \x6f \x76 \x65 \x72 \x20 \x74 \x68 ' ),
303+ (RX , b'\x6c \x65 \x20 \x6c \x61 \x7a \x79 \x20 ' ),
304+ (RX , b'\x6d \x64 \x6f \x67 \x0a \x74 \x68 \x65 ' ),
305+ (RX , b'\x6e \x20 \x63 \x72 \x61 \x7a \x79 \x20 ' ),
306+ (RX , b'\x6f \x66 \x6f \x78 \x20 \x6a \x75 \x6d ' ),
307+ (RX , b'\x70 \x70 \x73 \x20 \x6f \x76 \x65 \x72 ' ),
308+ (RX , b'\x71 \x20 \x74 \x68 \x65 \x20 \x6c \x61 ' ),
309+ (RX , b'\x72 \x7a \x79 \x20 \x64 \x6f \x67 \x0a ' ),
310+ (RX , b'\x73 \x74 \x68 \x65 \x20 \x63 \x72 \x61 ' ),
311+ (RX , b'\x74 \x7a \x79 \x20 \x66 \x6f \x78 \x20 ' ),
312+ (RX , b'\x75 \x6a \x75 \x6d \x70 \x73 \x20 \x6f ' ),
313+ (RX , b'\x76 \x76 \x65 \x72 \x20 \x74 \x68 \x65 ' ),
314+ (RX , b'\x77 \x20 \x6c \x61 \x7a \x79 \x20 \x64 ' ),
315+ (RX , b'\x78 \x6f \x67 \x0a \x74 \x68 \x65 \x20 ' ),
316+ (RX , b'\x79 \x63 \x72 \x61 \x7a \x79 \x20 \x66 ' ),
317+ (RX , b'\x7a \x6f \x78 \x20 \x6a \x75 \x6d \x70 ' ),
318+ (RX , b'\x7b \x73 \x20 \x6f \x76 \x65 \x72 \x20 ' ),
319+ (RX , b'\x7c \x74 \x68 \x65 \x20 \x6c \x61 \x7a ' ),
320+ (RX , b'\x7d \x79 \x20 \x64 \x6f \x67 \x0a \x74 ' ),
321+ (RX , b'\x7e \x68 \x65 \x20 \x63 \x72 \x61 \x7a ' ),
322+ (RX , b'\x7f \x79 \x20 \x66 \x6f \x78 \x20 \x6a ' ), # --> Last element of block
323+ (TX , b'\xa2 \x32 \x7f \x00 \x00 \x00 \x00 \x00 ' ), # --> Last good seqno (x32)
324+ (RX , b'\x01 \x79 \x20 \x66 \x6f \x78 \x20 \x6a ' ), # --> Server starts resending from last acknowledged block
325+ (RX , b'\x02 \x75 \x6d \x70 \x73 \x20 \x6f \x76 ' ),
326+ (RX , b'\x03 \x65 \x72 \x20 \x74 \x68 \x65 \x20 ' ),
327+ (RX , b'\x04 \x6c \x61 \x7a \x79 \x20 \x64 \x6f ' ),
328+ (RX , b'\x05 \x67 \x0a \x74 \x68 \x65 \x20 \x63 ' ),
329+ (RX , b'\x06 \x72 \x61 \x7a \x79 \x20 \x66 \x6f ' ),
330+ (RX , b'\x07 \x78 \x20 \x6a \x75 \x6d \x70 \x73 ' ),
331+ (RX , b'\x08 \x20 \x6f \x76 \x65 \x72 \x20 \x74 ' ),
332+ (RX , b'\x09 \x68 \x65 \x20 \x6c \x61 \x7a \x79 ' ),
333+ (RX , b'\x0a \x20 \x64 \x6f \x67 \x0a \x74 \x68 ' ),
334+ (RX , b'\x0b \x65 \x20 \x63 \x72 \x61 \x7a \x79 ' ),
335+ (RX , b'\x0c \x20 \x66 \x6f \x78 \x20 \x6a \x75 ' ),
336+ (RX , b'\x0d \x6d \x70 \x73 \x20 \x6f \x76 \x65 ' ),
337+ (RX , b'\x0e \x72 \x20 \x74 \x68 \x65 \x20 \x6c ' ),
338+ (RX , b'\x0f \x61 \x7a \x79 \x20 \x64 \x6f \x67 ' ),
339+ (RX , b'\x10 \x0a \x74 \x68 \x65 \x20 \x63 \x72 ' ),
340+ (RX , b'\x11 \x61 \x7a \x79 \x20 \x66 \x6f \x78 ' ),
341+ (RX , b'\x12 \x20 \x6a \x75 \x6d \x70 \x73 \x20 ' ),
342+ (RX , b'\x13 \x6f \x76 \x65 \x72 \x20 \x74 \x68 ' ),
343+ (RX , b'\x14 \x65 \x20 \x6c \x61 \x7a \x79 \x20 ' ),
344+ (RX , b'\x15 \x64 \x6f \x67 \x0a \x74 \x68 \x65 ' ),
345+ (RX , b'\x16 \x20 \x63 \x72 \x61 \x7a \x79 \x20 ' ),
346+ (RX , b'\x17 \x66 \x6f \x78 \x20 \x6a \x75 \x6d ' ),
347+ (RX , b'\x18 \x70 \x73 \x20 \x6f \x76 \x65 \x72 ' ),
348+ (RX , b'\x19 \x20 \x74 \x68 \x65 \x20 \x6c \x61 ' ),
349+ (RX , b'\x1a \x7a \x79 \x20 \x64 \x6f \x67 \x0a ' ),
350+ (RX , b'\x1b \x74 \x68 \x65 \x20 \x63 \x72 \x61 ' ),
351+ (RX , b'\x1c \x7a \x79 \x20 \x66 \x6f \x78 \x20 ' ),
352+ (RX , b'\x1d \x6a \x75 \x6d \x70 \x73 \x20 \x6f ' ),
353+ (RX , b'\x1e \x76 \x65 \x72 \x20 \x74 \x68 \x65 ' ),
354+ (RX , b'\x1f \x20 \x6c \x61 \x7a \x79 \x20 \x64 ' ),
355+ (RX , b'\x20 \x6f \x67 \x0a \x74 \x68 \x65 \x20 ' ),
356+ (RX , b'\x21 \x63 \x72 \x61 \x7a \x79 \x20 \x66 ' ),
357+ (RX , b'\x22 \x6f \x78 \x20 \x6a \x75 \x6d \x70 ' ),
358+ (RX , b'\x23 \x73 \x20 \x6f \x76 \x65 \x72 \x20 ' ),
359+ (RX , b'\x24 \x74 \x68 \x65 \x20 \x6c \x61 \x7a ' ),
360+ (RX , b'\x25 \x79 \x20 \x64 \x6f \x67 \x0a \x74 ' ),
361+ (RX , b'\x26 \x68 \x65 \x20 \x63 \x72 \x61 \x7a ' ),
362+ (RX , b'\x27 \x79 \x20 \x66 \x6f \x78 \x20 \x6a ' ),
363+ (RX , b'\x28 \x75 \x6d \x70 \x73 \x20 \x6f \x76 ' ),
364+ (RX , b'\x29 \x65 \x72 \x20 \x74 \x68 \x65 \x20 ' ),
365+ (RX , b'\x2a \x6c \x61 \x7a \x79 \x20 \x64 \x6f ' ),
366+ (RX , b'\x2b \x67 \x0a \x74 \x68 \x65 \x20 \x63 ' ),
367+ (RX , b'\x2c \x72 \x61 \x7a \x79 \x20 \x66 \x6f ' ),
368+ (RX , b'\x2d \x78 \x20 \x6a \x75 \x6d \x70 \x73 ' ),
369+ (RX , b'\x2e \x20 \x6f \x76 \x65 \x72 \x20 \x74 ' ),
370+ (RX , b'\x2f \x68 \x65 \x20 \x6c \x61 \x7a \x79 ' ),
371+ (RX , b'\x30 \x20 \x64 \x6f \x67 \x0a \x74 \x68 ' ),
372+ (RX , b'\x31 \x65 \x20 \x63 \x72 \x61 \x7a \x79 ' ),
373+ (RX , b'\x32 \x20 \x66 \x6f \x78 \x20 \x6a \x75 ' ),
374+ (RX , b'\x33 \x6d \x70 \x73 \x20 \x6f \x76 \x65 ' ),
375+ (RX , b'\x34 \x72 \x20 \x74 \x68 \x65 \x20 \x6c ' ),
376+ (RX , b'\x35 \x61 \x7a \x79 \x20 \x64 \x6f \x67 ' ),
377+ (RX , b'\x36 \x0a \x74 \x68 \x65 \x20 \x63 \x72 ' ),
378+ (RX , b'\x37 \x61 \x7a \x79 \x20 \x66 \x6f \x78 ' ),
379+ (RX , b'\x38 \x20 \x6a \x75 \x6d \x70 \x73 \x20 ' ),
380+ (RX , b'\x39 \x6f \x76 \x65 \x72 \x20 \x74 \x68 ' ),
381+ (RX , b'\x3a \x65 \x20 \x6c \x61 \x7a \x79 \x20 ' ),
382+ (RX , b'\x3b \x64 \x6f \x67 \x0a \x74 \x68 \x65 ' ),
383+ (RX , b'\x3c \x20 \x63 \x72 \x61 \x7a \x79 \x20 ' ),
384+ (RX , b'\x3d \x66 \x6f \x78 \x20 \x6a \x75 \x6d ' ),
385+ (RX , b'\x3e \x70 \x73 \x20 \x6f \x76 \x65 \x72 ' ),
386+ (RX , b'\x3f \x20 \x74 \x68 \x65 \x20 \x6c \x61 ' ),
387+ (RX , b'\x40 \x7a \x79 \x20 \x64 \x6f \x67 \x0a ' ),
388+ (RX , b'\x41 \x74 \x68 \x65 \x20 \x63 \x72 \x61 ' ),
389+ (RX , b'\x42 \x7a \x79 \x20 \x66 \x6f \x78 \x20 ' ),
390+ (RX , b'\x43 \x6a \x75 \x6d \x70 \x73 \x20 \x6f ' ),
391+ (RX , b'\x44 \x76 \x65 \x72 \x20 \x74 \x68 \x65 ' ),
392+ (RX , b'\x45 \x20 \x6c \x61 \x7a \x79 \x20 \x64 ' ),
393+ (RX , b'\x46 \x6f \x67 \x0a \x74 \x68 \x65 \x20 ' ),
394+ (RX , b'\x47 \x63 \x72 \x61 \x7a \x79 \x20 \x66 ' ),
395+ (RX , b'\x48 \x6f \x78 \x20 \x6a \x75 \x6d \x70 ' ),
396+ (RX , b'\x49 \x73 \x20 \x6f \x76 \x65 \x72 \x20 ' ),
397+ (RX , b'\x4a \x74 \x68 \x65 \x20 \x6c \x61 \x7a ' ),
398+ (RX , b'\x4b \x79 \x20 \x64 \x6f \x67 \x0a \x74 ' ),
399+ (RX , b'\x4c \x68 \x65 \x20 \x63 \x72 \x61 \x7a ' ),
400+ (RX , b'\x4d \x79 \x20 \x66 \x6f \x78 \x20 \x6a ' ),
401+ (RX , b'\x4e \x75 \x6d \x70 \x73 \x20 \x6f \x76 ' ),
402+ (RX , b'\x4f \x65 \x72 \x20 \x74 \x68 \x65 \x20 ' ),
403+ (RX , b'\x50 \x6c \x61 \x7a \x79 \x20 \x64 \x6f ' ),
404+ (RX , b'\x51 \x67 \x0a \x74 \x68 \x65 \x20 \x63 ' ),
405+ (RX , b'\x52 \x72 \x61 \x7a \x79 \x20 \x66 \x6f ' ),
406+ (RX , b'\x53 \x78 \x20 \x6a \x75 \x6d \x70 \x73 ' ),
407+ (RX , b'\x54 \x20 \x6f \x76 \x65 \x72 \x20 \x74 ' ),
408+ (RX , b'\x55 \x68 \x65 \x20 \x6c \x61 \x7a \x79 ' ),
409+ (RX , b'\x56 \x20 \x64 \x6f \x67 \x0a \x74 \x68 ' ),
410+ (RX , b'\x57 \x65 \x20 \x63 \x72 \x61 \x7a \x79 ' ),
411+ (RX , b'\x58 \x20 \x66 \x6f \x78 \x20 \x6a \x75 ' ),
412+ (RX , b'\x59 \x6d \x70 \x73 \x20 \x6f \x76 \x65 ' ),
413+ (RX , b'\x5a \x72 \x20 \x74 \x68 \x65 \x20 \x6c ' ),
414+ (RX , b'\x5b \x61 \x7a \x79 \x20 \x64 \x6f \x67 ' ),
415+ (RX , b'\x5c \x0a \x74 \x68 \x65 \x20 \x63 \x72 ' ),
416+ (RX , b'\x5d \x61 \x7a \x79 \x20 \x66 \x6f \x78 ' ),
417+ (RX , b'\x5e \x20 \x6a \x75 \x6d \x70 \x73 \x20 ' ),
418+ (RX , b'\x5f \x6f \x76 \x65 \x72 \x20 \x74 \x68 ' ),
419+ (RX , b'\x60 \x65 \x20 \x6c \x61 \x7a \x79 \x20 ' ),
420+ (RX , b'\x61 \x64 \x6f \x67 \x0a \x74 \x68 \x65 ' ),
421+ (RX , b'\x62 \x20 \x63 \x72 \x61 \x7a \x79 \x20 ' ),
422+ (RX , b'\x63 \x66 \x6f \x78 \x20 \x6a \x75 \x6d ' ),
423+ (RX , b'\x64 \x70 \x73 \x20 \x6f \x76 \x65 \x72 ' ),
424+ (RX , b'\x65 \x20 \x74 \x68 \x65 \x20 \x6c \x61 ' ),
425+ (RX , b'\x66 \x7a \x79 \x20 \x64 \x6f \x67 \x0a ' ),
426+ (RX , b'\x67 \x74 \x68 \x65 \x20 \x63 \x72 \x61 ' ),
427+ (RX , b'\x68 \x7a \x79 \x20 \x66 \x6f \x78 \x20 ' ),
428+ (RX , b'\x69 \x6a \x75 \x6d \x70 \x73 \x20 \x6f ' ),
429+ (RX , b'\x6a \x76 \x65 \x72 \x20 \x74 \x68 \x65 ' ),
430+ (RX , b'\x6b \x20 \x6c \x61 \x7a \x79 \x20 \x64 ' ),
431+ (RX , b'\x6c \x6f \x67 \x0a \x74 \x68 \x65 \x20 ' ),
432+ (RX , b'\x6d \x63 \x72 \x61 \x7a \x79 \x20 \x66 ' ),
433+ (RX , b'\x6e \x6f \x78 \x20 \x6a \x75 \x6d \x70 ' ),
434+ (RX , b'\x6f \x73 \x20 \x6f \x76 \x65 \x72 \x20 ' ),
435+ (RX , b'\x70 \x74 \x68 \x65 \x20 \x6c \x61 \x7a ' ),
436+ (RX , b'\x71 \x79 \x20 \x64 \x6f \x67 \x0a \x74 ' ),
437+ (RX , b'\x72 \x68 \x65 \x20 \x63 \x72 \x61 \x7a ' ),
438+ (RX , b'\x73 \x79 \x20 \x66 \x6f \x78 \x20 \x6a ' ),
439+ (RX , b'\x74 \x75 \x6d \x70 \x73 \x20 \x6f \x76 ' ),
440+ (RX , b'\x75 \x65 \x72 \x20 \x74 \x68 \x65 \x20 ' ),
441+ (RX , b'\x76 \x6c \x61 \x7a \x79 \x20 \x64 \x6f ' ),
442+ (RX , b'\x77 \x67 \x0a \x74 \x68 \x65 \x20 \x63 ' ),
443+ (RX , b'\x78 \x72 \x61 \x7a \x79 \x20 \x66 \x6f ' ),
444+ (RX , b'\x79 \x78 \x20 \x6a \x75 \x6d \x70 \x73 ' ),
445+ (RX , b'\x7a \x20 \x6f \x76 \x65 \x72 \x20 \x74 ' ),
446+ (RX , b'\x7b \x68 \x65 \x20 \x6c \x61 \x7a \x79 ' ),
447+ (RX , b'\x7c \x20 \x64 \x6f \x67 \x0a \x74 \x68 ' ),
448+ (RX , b'\x7d \x65 \x20 \x63 \x72 \x61 \x7a \x79 ' ),
449+ (RX , b'\x7e \x20 \x66 \x6f \x78 \x20 \x6a \x75 ' ),
450+ (RX , b'\x7f \x6d \x70 \x73 \x20 \x6f \x76 \x65 ' ),
451+ (TX , b'\xa2 \x7f \x7f \x00 \x00 \x00 \x00 \x00 ' ), # --> This block is acknowledged without issues
452+ (RX , b'\x01 \x72 \x20 \x74 \x68 \x65 \x20 \x6c ' ),
453+ (RX , b'\x02 \x61 \x7a \x79 \x20 \x64 \x6f \x67 ' ),
454+ (RX , b'\x03 \x0a \x74 \x68 \x65 \x20 \x63 \x72 ' ),
455+ (RX , b'\x04 \x61 \x7a \x79 \x20 \x66 \x6f \x78 ' ),
456+ (RX , b'\x05 \x20 \x6a \x75 \x6d \x70 \x73 \x20 ' ),
457+ (RX , b'\x06 \x6f \x76 \x65 \x72 \x20 \x74 \x68 ' ),
458+ (RX , b'\x07 \x65 \x20 \x6c \x61 \x7a \x79 \x20 ' ),
459+ (RX , b'\x08 \x64 \x6f \x67 \x0a \x74 \x68 \x65 ' ),
460+ (RX , b'\x09 \x20 \x63 \x72 \x61 \x7a \x79 \x20 ' ),
461+ (RX , b'\x0a \x66 \x6f \x78 \x20 \x6a \x75 \x6d ' ),
462+ (RX , b'\x0b \x70 \x73 \x20 \x6f \x76 \x65 \x72 ' ),
463+ (RX , b'\x0c \x20 \x74 \x68 \x65 \x20 \x6c \x61 ' ),
464+ (RX , b'\x0d \x7a \x79 \x20 \x64 \x6f \x67 \x0a ' ),
465+ (RX , b'\x0e \x74 \x68 \x65 \x20 \x63 \x72 \x61 ' ),
466+ (RX , b'\x0f \x7a \x79 \x20 \x66 \x6f \x78 \x20 ' ),
467+ (RX , b'\x10 \x6a \x75 \x6d \x70 \x73 \x20 \x6f ' ),
468+ (RX , b'\x11 \x76 \x65 \x72 \x20 \x74 \x68 \x65 ' ),
469+ (RX , b'\x12 \x20 \x6c \x61 \x7a \x79 \x20 \x64 ' ),
470+ (RX , b'\x13 \x6f \x67 \x0a \x74 \x68 \x65 \x20 ' ),
471+ (RX , b'\x14 \x63 \x72 \x61 \x7a \x79 \x20 \x66 ' ),
472+ (RX , b'\x15 \x6f \x78 \x20 \x6a \x75 \x6d \x70 ' ),
473+ (RX , b'\x16 \x73 \x20 \x6f \x76 \x65 \x72 \x20 ' ),
474+ (RX , b'\x17 \x74 \x68 \x65 \x20 \x6c \x61 \x7a ' ),
475+ (RX , b'\x18 \x79 \x20 \x64 \x6f \x67 \x0a \x74 ' ),
476+ (RX , b'\x19 \x68 \x65 \x20 \x63 \x72 \x61 \x7a ' ),
477+ (RX , b'\x1a \x79 \x20 \x66 \x6f \x78 \x20 \x6a ' ),
478+ (RX , b'\x1b \x75 \x6d \x70 \x73 \x20 \x6f \x76 ' ),
479+ (RX , b'\x1c \x65 \x72 \x20 \x74 \x68 \x65 \x20 ' ),
480+ (RX , b'\x1d \x6c \x61 \x7a \x79 \x20 \x64 \x6f ' ),
481+ (RX , b'\x1e \x67 \x0a \x74 \x68 \x65 \x20 \x63 ' ),
482+ (RX , b'\x1f \x72 \x61 \x7a \x79 \x20 \x66 \x6f ' ),
483+ (RX , b'\x20 \x78 \x20 \x6a \x75 \x6d \x70 \x73 ' ),
484+ (RX , b'\x21 \x20 \x6f \x76 \x65 \x72 \x20 \x74 ' ),
485+ (RX , b'\x22 \x68 \x65 \x20 \x6c \x61 \x7a \x79 ' ),
486+ (RX , b'\xa3 \x20 \x64 \x6f \x67 \x0a \x00 \x00 ' ),
487+ (TX , b'\xa2 \x23 \x7f \x00 \x00 \x00 \x00 \x00 ' ),
488+ (RX , b'\xc9 \x3b \x49 \x00 \x00 \x00 \x00 \x00 ' ),
489+ (TX , b'\xa1 \x00 \x00 \x00 \x00 \x00 \x00 \x00 ' ), # --> Transfer ends without issues
490+ ]
491+ with self .network [2 ].sdo [0x1008 ].open ('r' , block_transfer = True ) as fp :
492+ data = fp .read ()
493+ self .assertEqual (data , 39 * 'the crazy fox jumps over the lazy dog\n ' )
494+
190495 def test_writable_file (self ):
191496 self .data = [
192497 (TX , b'\x20 \x00 \x20 \x00 \x00 \x00 \x00 \x00 ' ),
0 commit comments