You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2022/05/18 09:23:54 UTC

[plc4x] branch develop updated: fix(plc4j/bacnet): only dump packages when flag is set to true

This is an automated email from the ASF dual-hosted git repository.

sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new 9278ac72a7 fix(plc4j/bacnet): only dump packages when flag is set to true
9278ac72a7 is described below

commit 9278ac72a7f3307b305dc141a02e9e963b2f3d88
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Wed May 18 11:23:41 2022 +0200

    fix(plc4j/bacnet): only dump packages when flag is set to true
---
 .../plc4x/java/bacnetip/TrickyPackagesTest.java    | 147 ++++++++++-----------
 1 file changed, 67 insertions(+), 80 deletions(-)

diff --git a/plc4j/drivers/bacnet/src/test/java/org/apache/plc4x/java/bacnetip/TrickyPackagesTest.java b/plc4j/drivers/bacnet/src/test/java/org/apache/plc4x/java/bacnetip/TrickyPackagesTest.java
index 26c5b010c3..d9ee13cef2 100644
--- a/plc4j/drivers/bacnet/src/test/java/org/apache/plc4x/java/bacnetip/TrickyPackagesTest.java
+++ b/plc4j/drivers/bacnet/src/test/java/org/apache/plc4x/java/bacnetip/TrickyPackagesTest.java
@@ -20,6 +20,7 @@ package org.apache.plc4x.java.bacnetip;
 
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.plc4x.java.bacnetip.readwrite.BVLC;
+import org.apache.plc4x.java.spi.generation.ParseException;
 import org.apache.plc4x.java.spi.generation.ReadBufferByteBased;
 import org.junit.jupiter.api.Test;
 
@@ -29,6 +30,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 public class TrickyPackagesTest {
 
+    public static final boolean dumpPackages = false;
+
     // from plugfest-tridium-1.pcap
     @Test
     public void testTridium255() throws Exception {
@@ -67,11 +70,7 @@ public class TrickyPackagesTest {
             /*01f0*/   0x21, 0x07, 0xb4, 0x11, 0x1e, 0x00, 0x00, 0x00, 0xb4, 0x13, 0x00, 0x00, 0x00, 0x21, 0x07, 0xb4,
             /*0200*/   0x14, 0x1e, 0x00, 0x00, 0x00, 0x2f, 0x39, 0x10, 0x4f, 0x1f,
         };
-        var rawBytes = (byte[]) ArrayUtils.toPrimitive(IntStream.of(rawBytesAsInts).boxed().map(Integer::byteValue).toArray(Byte[]::new));
-        rawBytes = ArrayUtils.subarray(rawBytes, 42, rawBytes.length);
-        BVLC bvlc = BVLC.staticParse(new ReadBufferByteBased(rawBytes));
-        assertNotNull(bvlc);
-        System.out.println(bvlc);
+        tryParseBytes(rawBytesAsInts);
     }
 
     // from plugfest-delta-2b.cap
@@ -102,77 +101,69 @@ public class TrickyPackagesTest {
             /*0150*/   0x01, 0x59, 0x05, 0x69, 0x01, 0x79, 0x07, 0x8e, 0x0a, 0x26, 0xe1, 0x19, 0x00, 0x2a, 0x25, 0xb9,
             /*0160*/   0x39, 0x00, 0x49, 0x00, 0x8f, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x1f,
         };
-        var rawBytes = (byte[]) ArrayUtils.toPrimitive(IntStream.of(rawBytesAsInts).boxed().map(Integer::byteValue).toArray(Byte[]::new));
-        rawBytes = ArrayUtils.subarray(rawBytes, 42, rawBytes.length);
-        BVLC bvlc = BVLC.staticParse(new ReadBufferByteBased(rawBytes));
-        assertNotNull(bvlc);
-        System.out.println(bvlc);
+        tryParseBytes(rawBytesAsInts);
     }
 
     // from TrendLogMultipleReadRangeSimple.pcap
     @Test
     public void testMultiReadProperty() throws Exception {
         int[] rawBytesAsInts = new int[]{
-            /*00000000*/  0x00, 0x24, 0xe8, 0xf9, 0x21, 0xa0, 0x00, 0x22,  0x5f, 0x07, 0xcc, 0x90, 0x08, 0x00, 0x45, 0x00,  //|.$..!.."_.....E.|
-            /*00000010*/  0x03, 0x3b, 0xe6, 0x0a, 0x00, 0x00, 0x80, 0x11,  0xcd, 0x87, 0xc0, 0xa8, 0x01, 0x67, 0xc0, 0xa8,  //|.;...........g..|
-            /*00000020*/  0x01, 0x68, 0xba, 0xc0, 0xba, 0xc0, 0x03, 0x27,  0xe7, 0x1d, 0x81, 0x0a, 0x03, 0x1f, 0x01, 0x00,  //|.h.....'........|
-            /*00000030*/  0x30, 0x14, 0x0e, 0x0c, 0x02, 0x00, 0x0f, 0xa0,  0x1e, 0x29, 0x4d, 0x4e, 0x75, 0x07, 0x00, 0x44,  //|0........)MNu..D|
-            /*00000040*/  0x45, 0x34, 0x30, 0x30, 0x30, 0x4f, 0x1f, 0x0c,  0x05, 0xc0, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|E4000O.......)MN|
-            /*00000050*/  0x74, 0x00, 0x41, 0x43, 0x31, 0x4f, 0x1f, 0x0c,  0x00, 0x00, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.AC1O.......)MN|
-            /*00000060*/  0x74, 0x00, 0x41, 0x49, 0x31, 0x4f, 0x1f, 0x0c,  0x00, 0x40, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.AI1O...@...)MN|
-            /*00000070*/  0x74, 0x00, 0x41, 0x4f, 0x31, 0x4f, 0x1f, 0x0c,  0x00, 0x80, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.AO1O.......)MN|
-            /*00000080*/  0x74, 0x00, 0x41, 0x56, 0x31, 0x4f, 0x1f, 0x0c,  0x00, 0x80, 0x00, 0x02, 0x1e, 0x29, 0x4d, 0x4e,  //|t.AV1O.......)MN|
-            /*00000090*/  0x74, 0x00, 0x41, 0x56, 0x32, 0x4f, 0x1f, 0x0c,  0x04, 0x80, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.AV2O.......)MN|
-            /*000000a0*/  0x74, 0x00, 0x41, 0x47, 0x31, 0x4f, 0x1f, 0x0c,  0x00, 0xc0, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.AG1O.......)MN|
-            /*000000b0*/  0x74, 0x00, 0x42, 0x49, 0x31, 0x4f, 0x1f, 0x0c,  0x01, 0x00, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.BI1O.......)MN|
-            /*000000c0*/  0x74, 0x00, 0x42, 0x4f, 0x31, 0x4f, 0x1f, 0x0c,  0x01, 0x40, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.BO1O...@...)MN|
-            /*000000d0*/  0x74, 0x00, 0x42, 0x56, 0x31, 0x4f, 0x1f, 0x0c,  0x01, 0x80, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.BV1O.......)MN|
-            /*000000e0*/  0x74, 0x00, 0x43, 0x41, 0x31, 0x4f, 0x1f, 0x0c,  0x01, 0xc0, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.CA1O.......)MN|
-            /*000000f0*/  0x74, 0x00, 0x43, 0x4f, 0x31, 0x4f, 0x1f, 0x0c,  0x02, 0x40, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.CO1O...@...)MN|
-            /*00000100*/  0x74, 0x00, 0x45, 0x45, 0x31, 0x4f, 0x1f, 0x0c,  0x02, 0x40, 0x00, 0x02, 0x1e, 0x29, 0x4d, 0x4e,  //|t.EE1O...@...)MN|
-            /*00000110*/  0x74, 0x00, 0x45, 0x45, 0x32, 0x4f, 0x1f, 0x0c,  0x02, 0x40, 0x00, 0x03, 0x1e, 0x29, 0x4d, 0x4e,  //|t.EE2O...@...)MN|
-            /*00000120*/  0x74, 0x00, 0x45, 0x45, 0x33, 0x4f, 0x1f, 0x0c,  0x02, 0x40, 0x00, 0x04, 0x1e, 0x29, 0x4d, 0x4e,  //|t.EE3O...@...)MN|
-            /*00000130*/  0x74, 0x00, 0x45, 0x45, 0x34, 0x4f, 0x1f, 0x0c,  0x02, 0x40, 0x00, 0x05, 0x1e, 0x29, 0x4d, 0x4e,  //|t.EE4O...@...)MN|
-            /*00000140*/  0x74, 0x00, 0x45, 0x45, 0x35, 0x4f, 0x1f, 0x0c,  0x02, 0x40, 0x00, 0x06, 0x1e, 0x29, 0x4d, 0x4e,  //|t.EE5O...@...)MN|
-            /*00000150*/  0x74, 0x00, 0x45, 0x45, 0x36, 0x4f, 0x1f, 0x0c,  0x02, 0x40, 0x00, 0x07, 0x1e, 0x29, 0x4d, 0x4e,  //|t.EE6O...@...)MN|
-            /*00000160*/  0x74, 0x00, 0x45, 0x45, 0x37, 0x4f, 0x1f, 0x0c,  0x02, 0x40, 0x00, 0x08, 0x1e, 0x29, 0x4d, 0x4e,  //|t.EE7O...@...)MN|
-            /*00000170*/  0x74, 0x00, 0x45, 0x45, 0x38, 0x4f, 0x1f, 0x0c,  0x02, 0x40, 0x00, 0x09, 0x1e, 0x29, 0x4d, 0x4e,  //|t.EE8O...@...)MN|
-            /*00000180*/  0x74, 0x00, 0x45, 0x45, 0x39, 0x4f, 0x1f, 0x0c,  0x02, 0x40, 0x00, 0x0a, 0x1e, 0x29, 0x4d, 0x4e,  //|t.EE9O...@...)MN|
-            /*00000190*/  0x75, 0x05, 0x00, 0x45, 0x45, 0x31, 0x30, 0x4f,  0x1f, 0x0c, 0x02, 0x80, 0x00, 0x01, 0x1e, 0x29,  //|u..EE10O.......)|
-            /*000001a0*/  0x4d, 0x4e, 0x74, 0x00, 0x46, 0x49, 0x31, 0x4f,  0x1f, 0x0c, 0x02, 0x80, 0x00, 0x02, 0x1e, 0x29,  //|MNt.FI1O.......)|
-            /*000001b0*/  0x4d, 0x4e, 0x74, 0x00, 0x46, 0x49, 0x32, 0x4f,  0x1f, 0x0c, 0x02, 0xc0, 0x00, 0x01, 0x1e, 0x29,  //|MNt.FI2O.......)|
-            /*000001c0*/  0x4d, 0x4e, 0x74, 0x00, 0x47, 0x52, 0x31, 0x4f,  0x1f, 0x0c, 0x05, 0x40, 0x00, 0x01, 0x1e, 0x29,  //|MNt.GR1O...@...)|
-            /*000001d0*/  0x4d, 0x4e, 0x74, 0x00, 0x4c, 0x50, 0x31, 0x4f,  0x1f, 0x0c, 0x05, 0x80, 0x00, 0x01, 0x1e, 0x29,  //|MNt.LP1O.......)|
-            /*000001e0*/  0x4d, 0x4e, 0x74, 0x00, 0x4c, 0x5a, 0x31, 0x4f,  0x1f, 0x0c, 0x03, 0x00, 0x00, 0x01, 0x1e, 0x29,  //|MNt.LZ1O.......)|
-            /*000001f0*/  0x4d, 0x4e, 0x74, 0x00, 0x4c, 0x4f, 0x31, 0x4f,  0x1f, 0x0c, 0x03, 0x40, 0x00, 0x01, 0x1e, 0x29,  //|MNt.LO1O...@...)|
-            /*00000200*/  0x4d, 0x4e, 0x74, 0x00, 0x4d, 0x49, 0x31, 0x4f,  0x1f, 0x0c, 0x03, 0x80, 0x00, 0x01, 0x1e, 0x29,  //|MNt.MI1O.......)|
-            /*00000210*/  0x4d, 0x4e, 0x74, 0x00, 0x4d, 0x4f, 0x31, 0x4f,  0x1f, 0x0c, 0x04, 0xc0, 0x00, 0x01, 0x1e, 0x29,  //|MNt.MO1O.......)|
-            /*00000220*/  0x4d, 0x4e, 0x74, 0x00, 0x4d, 0x56, 0x31, 0x4f,  0x1f, 0x0c, 0x03, 0xc0, 0x00, 0x01, 0x1e, 0x29,  //|MNt.MV1O.......)|
-            /*00000230*/  0x4d, 0x4e, 0x74, 0x00, 0x4e, 0x43, 0x31, 0x4f,  0x1f, 0x0c, 0x04, 0x00, 0x00, 0x01, 0x1e, 0x29,  //|MNt.NC1O.......)|
-            /*00000240*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x52, 0x31, 0x4f,  0x1f, 0x0c, 0x04, 0x00, 0x00, 0x02, 0x1e, 0x29,  //|MNt.PR1O.......)|
-            /*00000250*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x52, 0x32, 0x4f,  0x1f, 0x0c, 0x04, 0x00, 0x00, 0x03, 0x1e, 0x29,  //|MNt.PR2O.......)|
-            /*00000260*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x52, 0x33, 0x4f,  0x1f, 0x0c, 0x04, 0x00, 0x00, 0x04, 0x1e, 0x29,  //|MNt.PR3O.......)|
-            /*00000270*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x52, 0x34, 0x4f,  0x1f, 0x0c, 0x04, 0x00, 0x00, 0x05, 0x1e, 0x29,  //|MNt.PR4O.......)|
-            /*00000280*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x52, 0x35, 0x4f,  0x1f, 0x0c, 0x04, 0x00, 0x00, 0x06, 0x1e, 0x29,  //|MNt.PR5O.......)|
-            /*00000290*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x52, 0x36, 0x4f,  0x1f, 0x0c, 0x04, 0x00, 0x00, 0x07, 0x1e, 0x29,  //|MNt.PR6O.......)|
-            /*000002a0*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x52, 0x37, 0x4f,  0x1f, 0x0c, 0x04, 0x00, 0x00, 0x08, 0x1e, 0x29,  //|MNt.PR7O.......)|
-            /*000002b0*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x52, 0x38, 0x4f,  0x1f, 0x0c, 0x06, 0x00, 0x00, 0x01, 0x1e, 0x29,  //|MNt.PR8O.......)|
-            /*000002c0*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x43, 0x31, 0x4f,  0x1f, 0x0c, 0x06, 0x00, 0x00, 0x02, 0x1e, 0x29,  //|MNt.PC1O.......)|
-            /*000002d0*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x43, 0x32, 0x4f,  0x1f, 0x0c, 0x04, 0x40, 0x00, 0x01, 0x1e, 0x29,  //|MNt.PC2O...@...)|
-            /*000002e0*/  0x4d, 0x4e, 0x74, 0x00, 0x53, 0x43, 0x31, 0x4f,  0x1f, 0x0c, 0x05, 0x00, 0x00, 0x01, 0x1e, 0x29,  //|MNt.SC1O.......)|
-            /*000002f0*/  0x4d, 0x4e, 0x74, 0x00, 0x54, 0x4c, 0x31, 0x4f,  0x1f, 0x0c, 0x07, 0x80, 0x00, 0x01, 0x1e, 0x29,  //|MNt.TL1O.......)|
-            /*00000300*/  0x4d, 0x4e, 0x74, 0x00, 0x41, 0x44, 0x31, 0x4f,  0x1f, 0x0c, 0x06, 0x40, 0x00, 0x01, 0x1e, 0x29,  //|MNt.AD1O...@...)|
-            /*00000310*/  0x4d, 0x4e, 0x74, 0x00, 0x45, 0x4c, 0x31, 0x4f,  0x1f, 0x0c, 0x07, 0x00, 0x00, 0x01, 0x1e, 0x29,  //|MNt.EL1O.......)|
-            /*00000320*/  0x4d, 0x4e, 0x74, 0x00, 0x4c, 0x43, 0x31, 0x4f,  0x1f, 0x0c, 0x07, 0x40, 0x00, 0x01, 0x1e, 0x29,  //|MNt.LC1O...@...)|
-            /*00000330*/  0x4d, 0x4e, 0x74, 0x00, 0x53, 0x56, 0x31, 0x4f,  0x1f, 0x0c, 0x06, 0xc0, 0x00, 0x01, 0x1e, 0x29,  //|MNt.SV1O.......)|
-            /*00000340*/  0x4d, 0x4e, 0x74, 0x00, 0x54, 0x4d, 0x31, 0x4f,  0x1f                                             //|MNt.TM1O.|
+            /*00000000*/  0x00, 0x24, 0xe8, 0xf9, 0x21, 0xa0, 0x00, 0x22, 0x5f, 0x07, 0xcc, 0x90, 0x08, 0x00, 0x45, 0x00,  //|.$..!.."_.....E.|
+            /*00000010*/  0x03, 0x3b, 0xe6, 0x0a, 0x00, 0x00, 0x80, 0x11, 0xcd, 0x87, 0xc0, 0xa8, 0x01, 0x67, 0xc0, 0xa8,  //|.;...........g..|
+            /*00000020*/  0x01, 0x68, 0xba, 0xc0, 0xba, 0xc0, 0x03, 0x27, 0xe7, 0x1d, 0x81, 0x0a, 0x03, 0x1f, 0x01, 0x00,  //|.h.....'........|
+            /*00000030*/  0x30, 0x14, 0x0e, 0x0c, 0x02, 0x00, 0x0f, 0xa0, 0x1e, 0x29, 0x4d, 0x4e, 0x75, 0x07, 0x00, 0x44,  //|0........)MNu..D|
+            /*00000040*/  0x45, 0x34, 0x30, 0x30, 0x30, 0x4f, 0x1f, 0x0c, 0x05, 0xc0, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|E4000O.......)MN|
+            /*00000050*/  0x74, 0x00, 0x41, 0x43, 0x31, 0x4f, 0x1f, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.AC1O.......)MN|
+            /*00000060*/  0x74, 0x00, 0x41, 0x49, 0x31, 0x4f, 0x1f, 0x0c, 0x00, 0x40, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.AI1O...@...)MN|
+            /*00000070*/  0x74, 0x00, 0x41, 0x4f, 0x31, 0x4f, 0x1f, 0x0c, 0x00, 0x80, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.AO1O.......)MN|
+            /*00000080*/  0x74, 0x00, 0x41, 0x56, 0x31, 0x4f, 0x1f, 0x0c, 0x00, 0x80, 0x00, 0x02, 0x1e, 0x29, 0x4d, 0x4e,  //|t.AV1O.......)MN|
+            /*00000090*/  0x74, 0x00, 0x41, 0x56, 0x32, 0x4f, 0x1f, 0x0c, 0x04, 0x80, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.AV2O.......)MN|
+            /*000000a0*/  0x74, 0x00, 0x41, 0x47, 0x31, 0x4f, 0x1f, 0x0c, 0x00, 0xc0, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.AG1O.......)MN|
+            /*000000b0*/  0x74, 0x00, 0x42, 0x49, 0x31, 0x4f, 0x1f, 0x0c, 0x01, 0x00, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.BI1O.......)MN|
+            /*000000c0*/  0x74, 0x00, 0x42, 0x4f, 0x31, 0x4f, 0x1f, 0x0c, 0x01, 0x40, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.BO1O...@...)MN|
+            /*000000d0*/  0x74, 0x00, 0x42, 0x56, 0x31, 0x4f, 0x1f, 0x0c, 0x01, 0x80, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.BV1O.......)MN|
+            /*000000e0*/  0x74, 0x00, 0x43, 0x41, 0x31, 0x4f, 0x1f, 0x0c, 0x01, 0xc0, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.CA1O.......)MN|
+            /*000000f0*/  0x74, 0x00, 0x43, 0x4f, 0x31, 0x4f, 0x1f, 0x0c, 0x02, 0x40, 0x00, 0x01, 0x1e, 0x29, 0x4d, 0x4e,  //|t.CO1O...@...)MN|
+            /*00000100*/  0x74, 0x00, 0x45, 0x45, 0x31, 0x4f, 0x1f, 0x0c, 0x02, 0x40, 0x00, 0x02, 0x1e, 0x29, 0x4d, 0x4e,  //|t.EE1O...@...)MN|
+            /*00000110*/  0x74, 0x00, 0x45, 0x45, 0x32, 0x4f, 0x1f, 0x0c, 0x02, 0x40, 0x00, 0x03, 0x1e, 0x29, 0x4d, 0x4e,  //|t.EE2O...@...)MN|
+            /*00000120*/  0x74, 0x00, 0x45, 0x45, 0x33, 0x4f, 0x1f, 0x0c, 0x02, 0x40, 0x00, 0x04, 0x1e, 0x29, 0x4d, 0x4e,  //|t.EE3O...@...)MN|
+            /*00000130*/  0x74, 0x00, 0x45, 0x45, 0x34, 0x4f, 0x1f, 0x0c, 0x02, 0x40, 0x00, 0x05, 0x1e, 0x29, 0x4d, 0x4e,  //|t.EE4O...@...)MN|
+            /*00000140*/  0x74, 0x00, 0x45, 0x45, 0x35, 0x4f, 0x1f, 0x0c, 0x02, 0x40, 0x00, 0x06, 0x1e, 0x29, 0x4d, 0x4e,  //|t.EE5O...@...)MN|
+            /*00000150*/  0x74, 0x00, 0x45, 0x45, 0x36, 0x4f, 0x1f, 0x0c, 0x02, 0x40, 0x00, 0x07, 0x1e, 0x29, 0x4d, 0x4e,  //|t.EE6O...@...)MN|
+            /*00000160*/  0x74, 0x00, 0x45, 0x45, 0x37, 0x4f, 0x1f, 0x0c, 0x02, 0x40, 0x00, 0x08, 0x1e, 0x29, 0x4d, 0x4e,  //|t.EE7O...@...)MN|
+            /*00000170*/  0x74, 0x00, 0x45, 0x45, 0x38, 0x4f, 0x1f, 0x0c, 0x02, 0x40, 0x00, 0x09, 0x1e, 0x29, 0x4d, 0x4e,  //|t.EE8O...@...)MN|
+            /*00000180*/  0x74, 0x00, 0x45, 0x45, 0x39, 0x4f, 0x1f, 0x0c, 0x02, 0x40, 0x00, 0x0a, 0x1e, 0x29, 0x4d, 0x4e,  //|t.EE9O...@...)MN|
+            /*00000190*/  0x75, 0x05, 0x00, 0x45, 0x45, 0x31, 0x30, 0x4f, 0x1f, 0x0c, 0x02, 0x80, 0x00, 0x01, 0x1e, 0x29,  //|u..EE10O.......)|
+            /*000001a0*/  0x4d, 0x4e, 0x74, 0x00, 0x46, 0x49, 0x31, 0x4f, 0x1f, 0x0c, 0x02, 0x80, 0x00, 0x02, 0x1e, 0x29,  //|MNt.FI1O.......)|
+            /*000001b0*/  0x4d, 0x4e, 0x74, 0x00, 0x46, 0x49, 0x32, 0x4f, 0x1f, 0x0c, 0x02, 0xc0, 0x00, 0x01, 0x1e, 0x29,  //|MNt.FI2O.......)|
+            /*000001c0*/  0x4d, 0x4e, 0x74, 0x00, 0x47, 0x52, 0x31, 0x4f, 0x1f, 0x0c, 0x05, 0x40, 0x00, 0x01, 0x1e, 0x29,  //|MNt.GR1O...@...)|
+            /*000001d0*/  0x4d, 0x4e, 0x74, 0x00, 0x4c, 0x50, 0x31, 0x4f, 0x1f, 0x0c, 0x05, 0x80, 0x00, 0x01, 0x1e, 0x29,  //|MNt.LP1O.......)|
+            /*000001e0*/  0x4d, 0x4e, 0x74, 0x00, 0x4c, 0x5a, 0x31, 0x4f, 0x1f, 0x0c, 0x03, 0x00, 0x00, 0x01, 0x1e, 0x29,  //|MNt.LZ1O.......)|
+            /*000001f0*/  0x4d, 0x4e, 0x74, 0x00, 0x4c, 0x4f, 0x31, 0x4f, 0x1f, 0x0c, 0x03, 0x40, 0x00, 0x01, 0x1e, 0x29,  //|MNt.LO1O...@...)|
+            /*00000200*/  0x4d, 0x4e, 0x74, 0x00, 0x4d, 0x49, 0x31, 0x4f, 0x1f, 0x0c, 0x03, 0x80, 0x00, 0x01, 0x1e, 0x29,  //|MNt.MI1O.......)|
+            /*00000210*/  0x4d, 0x4e, 0x74, 0x00, 0x4d, 0x4f, 0x31, 0x4f, 0x1f, 0x0c, 0x04, 0xc0, 0x00, 0x01, 0x1e, 0x29,  //|MNt.MO1O.......)|
+            /*00000220*/  0x4d, 0x4e, 0x74, 0x00, 0x4d, 0x56, 0x31, 0x4f, 0x1f, 0x0c, 0x03, 0xc0, 0x00, 0x01, 0x1e, 0x29,  //|MNt.MV1O.......)|
+            /*00000230*/  0x4d, 0x4e, 0x74, 0x00, 0x4e, 0x43, 0x31, 0x4f, 0x1f, 0x0c, 0x04, 0x00, 0x00, 0x01, 0x1e, 0x29,  //|MNt.NC1O.......)|
+            /*00000240*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x52, 0x31, 0x4f, 0x1f, 0x0c, 0x04, 0x00, 0x00, 0x02, 0x1e, 0x29,  //|MNt.PR1O.......)|
+            /*00000250*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x52, 0x32, 0x4f, 0x1f, 0x0c, 0x04, 0x00, 0x00, 0x03, 0x1e, 0x29,  //|MNt.PR2O.......)|
+            /*00000260*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x52, 0x33, 0x4f, 0x1f, 0x0c, 0x04, 0x00, 0x00, 0x04, 0x1e, 0x29,  //|MNt.PR3O.......)|
+            /*00000270*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x52, 0x34, 0x4f, 0x1f, 0x0c, 0x04, 0x00, 0x00, 0x05, 0x1e, 0x29,  //|MNt.PR4O.......)|
+            /*00000280*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x52, 0x35, 0x4f, 0x1f, 0x0c, 0x04, 0x00, 0x00, 0x06, 0x1e, 0x29,  //|MNt.PR5O.......)|
+            /*00000290*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x52, 0x36, 0x4f, 0x1f, 0x0c, 0x04, 0x00, 0x00, 0x07, 0x1e, 0x29,  //|MNt.PR6O.......)|
+            /*000002a0*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x52, 0x37, 0x4f, 0x1f, 0x0c, 0x04, 0x00, 0x00, 0x08, 0x1e, 0x29,  //|MNt.PR7O.......)|
+            /*000002b0*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x52, 0x38, 0x4f, 0x1f, 0x0c, 0x06, 0x00, 0x00, 0x01, 0x1e, 0x29,  //|MNt.PR8O.......)|
+            /*000002c0*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x43, 0x31, 0x4f, 0x1f, 0x0c, 0x06, 0x00, 0x00, 0x02, 0x1e, 0x29,  //|MNt.PC1O.......)|
+            /*000002d0*/  0x4d, 0x4e, 0x74, 0x00, 0x50, 0x43, 0x32, 0x4f, 0x1f, 0x0c, 0x04, 0x40, 0x00, 0x01, 0x1e, 0x29,  //|MNt.PC2O...@...)|
+            /*000002e0*/  0x4d, 0x4e, 0x74, 0x00, 0x53, 0x43, 0x31, 0x4f, 0x1f, 0x0c, 0x05, 0x00, 0x00, 0x01, 0x1e, 0x29,  //|MNt.SC1O.......)|
+            /*000002f0*/  0x4d, 0x4e, 0x74, 0x00, 0x54, 0x4c, 0x31, 0x4f, 0x1f, 0x0c, 0x07, 0x80, 0x00, 0x01, 0x1e, 0x29,  //|MNt.TL1O.......)|
+            /*00000300*/  0x4d, 0x4e, 0x74, 0x00, 0x41, 0x44, 0x31, 0x4f, 0x1f, 0x0c, 0x06, 0x40, 0x00, 0x01, 0x1e, 0x29,  //|MNt.AD1O...@...)|
+            /*00000310*/  0x4d, 0x4e, 0x74, 0x00, 0x45, 0x4c, 0x31, 0x4f, 0x1f, 0x0c, 0x07, 0x00, 0x00, 0x01, 0x1e, 0x29,  //|MNt.EL1O.......)|
+            /*00000320*/  0x4d, 0x4e, 0x74, 0x00, 0x4c, 0x43, 0x31, 0x4f, 0x1f, 0x0c, 0x07, 0x40, 0x00, 0x01, 0x1e, 0x29,  //|MNt.LC1O...@...)|
+            /*00000330*/  0x4d, 0x4e, 0x74, 0x00, 0x53, 0x56, 0x31, 0x4f, 0x1f, 0x0c, 0x06, 0xc0, 0x00, 0x01, 0x1e, 0x29,  //|MNt.SV1O.......)|
+            /*00000340*/  0x4d, 0x4e, 0x74, 0x00, 0x54, 0x4d, 0x31, 0x4f, 0x1f                                             //|MNt.TM1O.|
         };
-        var rawBytes = (byte[]) ArrayUtils.toPrimitive(IntStream.of(rawBytesAsInts).boxed().map(Integer::byteValue).toArray(Byte[]::new));
-        rawBytes = ArrayUtils.subarray(rawBytes, 42, rawBytes.length);
-        BVLC bvlc = BVLC.staticParse(new ReadBufferByteBased(rawBytes));
-        assertNotNull(bvlc);
-        System.out.println(bvlc);
-    } // from TrendLogMultipleReadRangeSimple.pcap
+        tryParseBytes(rawBytesAsInts);
+    }
 
     // from TrendLogMultipleReadRangeSimple.pcap
     @Test
@@ -207,11 +198,7 @@ public class TrickyPackagesTest {
             /*000001a0*/  0x4f, 0x29, 0x4b, 0x4e, 0xc4, 0x00, 0x00, 0x00, 0x01, 0x4f, 0x29, 0x4f, 0x4e, 0x91, 0x00, 0x4f,  //|O)KN.....O)ON..O|
             /*000001b0*/  0x29, 0x75, 0x4e, 0x91, 0x3e, 0x4f, 0x1f,                                                        //|)uN.>O.|
         };
-        var rawBytes = (byte[]) ArrayUtils.toPrimitive(IntStream.of(rawBytesAsInts).boxed().map(Integer::byteValue).toArray(Byte[]::new));
-        rawBytes = ArrayUtils.subarray(rawBytes, 42, rawBytes.length);
-        BVLC bvlc = BVLC.staticParse(new ReadBufferByteBased(rawBytes));
-        assertNotNull(bvlc);
-        System.out.println(bvlc);
+        tryParseBytes(rawBytesAsInts);
     }
 
     // from plugfest-2011-siemens-1.pcap
@@ -224,11 +211,7 @@ public class TrickyPackagesTest {
             /*00000030*/  0x21, 0x99, 0x01, 0x3f, 0x02, 0xbf, 0x06, 0xac, 0x10, 0x07, 0xc9, 0xba, 0xc0, 0xfe, 0x02, 0x55,  //|!..?...........U|
             /*00000040*/  0xb7, 0x05, 0x0a, 0x02, 0x58, 0x1c, 0x00, 0xc0, 0x00, 0x65,                                      //|....X....e|
         };
-        var rawBytes = (byte[]) ArrayUtils.toPrimitive(IntStream.of(rawBytesAsInts).boxed().map(Integer::byteValue).toArray(Byte[]::new));
-        rawBytes = ArrayUtils.subarray(rawBytes, 42, rawBytes.length);
-        BVLC bvlc = BVLC.staticParse(new ReadBufferByteBased(rawBytes));
-        assertNotNull(bvlc);
-        System.out.println(bvlc);
+        tryParseBytes(rawBytesAsInts);
     }
 
     // from plugfest-tridium-1.pcap
@@ -255,10 +238,14 @@ public class TrickyPackagesTest {
             /*00000110*/  0x4e, 0x44, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x29, 0x16, 0x4e, 0x44, 0x00, 0x00, 0x00, 0x00, 0x4f,  //|ND....O).ND....O|
             /*00000120*/  0x1f,                                                //|.|
         };
+        tryParseBytes(rawBytesAsInts);
+    }
+
+    private void tryParseBytes(int[] rawBytesAsInts) throws ParseException {
         var rawBytes = (byte[]) ArrayUtils.toPrimitive(IntStream.of(rawBytesAsInts).boxed().map(Integer::byteValue).toArray(Byte[]::new));
         rawBytes = ArrayUtils.subarray(rawBytes, 42, rawBytes.length);
         BVLC bvlc = BVLC.staticParse(new ReadBufferByteBased(rawBytes));
         assertNotNull(bvlc);
-        System.out.println(bvlc);
+        if (dumpPackages) System.out.println(bvlc);
     }
 }