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 2018/01/26 17:54:02 UTC

[incubator-plc4x] branch feature/Beckhoff_ADS_protocol updated: cleanup accessors

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

sruehl pushed a commit to branch feature/Beckhoff_ADS_protocol
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git


The following commit(s) were added to refs/heads/feature/Beckhoff_ADS_protocol by this push:
     new e0f11f1  cleanup accessors
e0f11f1 is described below

commit e0f11f1718eb08b0dbcc359dc24b5db73da724ce
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Fri Jan 26 18:53:57 2018 +0100

    cleanup accessors
---
 .../commands/ADSAddDeviceNotificationRequest.java  | 32 +++++++++---------
 .../commands/ADSAddDeviceNotificationResponse.java |  8 ++---
 .../ADSDeleteDeviceNotificationRequest.java        |  4 +--
 .../ADSDeleteDeviceNotificationResponse.java       |  4 +--
 .../commands/ADSDeviceNotificationRequest.java     | 38 +++++++++++-----------
 .../model/commands/ADSReadDeviceInfoResponse.java  | 20 ++++++------
 .../java/ads/model/commands/ADSReadRequest.java    | 12 +++----
 .../java/ads/model/commands/ADSReadResponse.java   | 12 +++----
 .../ads/model/commands/ADSReadStateResponse.java   |  4 +--
 .../ads/model/commands/ADSReadWriteRequest.java    | 20 ++++++------
 .../ads/model/commands/ADSReadWriteResponse.java   | 12 +++----
 .../ads/model/commands/ADSWriteControlRequest.java | 16 ++++-----
 .../model/commands/ADSWriteControlResponse.java    |  4 +--
 .../java/ads/model/commands/ADSWriteRequest.java   | 16 ++++-----
 .../java/ads/model/commands/ADSWriteResponse.java  |  4 +--
 .../plc4x/java/ads/model/generic/AMSHeader.java    | 20 ++++++------
 .../plc4x/java/ads/model/generic/AMSTCPHeader.java |  4 +--
 .../plc4x/java/ads/model/generic/AMSTCPPaket.java  |  6 ++--
 18 files changed, 118 insertions(+), 118 deletions(-)

diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSAddDeviceNotificationRequest.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSAddDeviceNotificationRequest.java
index 389c0b6..d2d54fe 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSAddDeviceNotificationRequest.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSAddDeviceNotificationRequest.java
@@ -35,31 +35,31 @@ public class ADSAddDeviceNotificationRequest extends AMSTCPPaket {
     /**
      * 4 bytes	Index Group of the data, which should be sent per notification.
      */
-    final IndexGroup indexGroup;
+    private final IndexGroup indexGroup;
     /**
      * 4 bytes	Index Offset of the data, which should be sent per notification.
      */
-    final IndexOffset indexOffset;
+    private final IndexOffset indexOffset;
     /**
      * 4 bytes	Length of data in bytes, which should be sent per notification.
      */
-    final Length length;
+    private final Length length;
     /**
      * 4 bytes	See description of the structure ADSTRANSMODE at the ADS-DLL.
      */
-    final TransmissionMode transmissionMode;
+    private final TransmissionMode transmissionMode;
     /**
      * 4 bytes	At the latest after this time, the ADS Device Notification is called. The unit is 1ms.
      */
-    final MaxDelay maxDelay;
+    private final MaxDelay maxDelay;
     /**
      * 4 bytes	The ADS server checks if the value changes in this time slice. The unit is 1ms
      */
-    final CycleTime cycleTime;
+    private final CycleTime cycleTime;
     /**
      * 16bytes	Must be set to 0
      */
-    final Reserved reserved = Reserved.INSTANCE;
+    private final Reserved reserved = Reserved.INSTANCE;
 
     public ADSAddDeviceNotificationRequest(AMSTCPHeader amstcpHeader, AMSHeader amsHeader, IndexGroup indexGroup, IndexOffset indexOffset, Length length, TransmissionMode transmissionMode, MaxDelay maxDelay, CycleTime cycleTime) {
         super(amstcpHeader, amsHeader);
@@ -76,53 +76,53 @@ public class ADSAddDeviceNotificationRequest extends AMSTCPPaket {
         return buildADSData(indexGroup, indexOffset, length, transmissionMode, maxDelay, cycleTime, reserved);
     }
 
-    class IndexGroup extends ByteValue {
+    public static class IndexGroup extends ByteValue {
         public IndexGroup(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-    class IndexOffset extends ByteValue {
+    public static class IndexOffset extends ByteValue {
         public IndexOffset(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-  class Length extends ByteValue {
+    public static class Length extends ByteValue {
         public Length(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-   class TransmissionMode extends ByteValue {
+    public static class TransmissionMode extends ByteValue {
         public TransmissionMode(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-    static class MaxDelay extends ByteValue {
+    public static class MaxDelay extends ByteValue {
         public MaxDelay(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-    static class CycleTime extends ByteValue {
+    public static class CycleTime extends ByteValue {
         public CycleTime(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-     static class Reserved extends ByteValue {
+    public static class Reserved extends ByteValue {
 
-        static final Reserved INSTANCE = new Reserved();
+        private static final Reserved INSTANCE = new Reserved();
 
-        public Reserved() {
+        private Reserved() {
             super((byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00);
             assertLength(16);
         }
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSAddDeviceNotificationResponse.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSAddDeviceNotificationResponse.java
index 33297e2..111f7ef 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSAddDeviceNotificationResponse.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSAddDeviceNotificationResponse.java
@@ -32,12 +32,12 @@ public class ADSAddDeviceNotificationResponse extends AMSTCPPaket {
     /**
      * 4 bytes	ADS error number
      */
-    final Result result;
+    private final Result result;
 
     /**
      * 4 bytes	Handle of notification
      */
-    final NotificationHandle notificationHandle;
+    private final NotificationHandle notificationHandle;
 
     public ADSAddDeviceNotificationResponse(AMSTCPHeader amstcpHeader, AMSHeader amsHeader, Result result, NotificationHandle notificationHandle) {
         super(amstcpHeader, amsHeader);
@@ -50,14 +50,14 @@ public class ADSAddDeviceNotificationResponse extends AMSTCPPaket {
         return buildADSData(result, notificationHandle);
     }
 
-   class Result extends ByteValue {
+    public static class Result extends ByteValue {
         public Result(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-   class NotificationHandle extends ByteValue {
+    public static class NotificationHandle extends ByteValue {
         public NotificationHandle(byte... value) {
             super(value);
             assertLength(4);
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSDeleteDeviceNotificationRequest.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSDeleteDeviceNotificationRequest.java
index 61970e4..2abe0dd 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSDeleteDeviceNotificationRequest.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSDeleteDeviceNotificationRequest.java
@@ -32,7 +32,7 @@ public class ADSDeleteDeviceNotificationRequest extends AMSTCPPaket {
     /**
      * 4 bytes	Handle of notification
      */
-    final NotificationHandle notificationHandle;
+    private final NotificationHandle notificationHandle;
 
     public ADSDeleteDeviceNotificationRequest(AMSTCPHeader amstcpHeader, AMSHeader amsHeader, NotificationHandle notificationHandle) {
         super(amstcpHeader, amsHeader);
@@ -45,7 +45,7 @@ public class ADSDeleteDeviceNotificationRequest extends AMSTCPPaket {
     }
 
 
-   class NotificationHandle extends ByteValue {
+    public static class NotificationHandle extends ByteValue {
         public NotificationHandle(byte... value) {
             super(value);
             assertLength(4);
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSDeleteDeviceNotificationResponse.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSDeleteDeviceNotificationResponse.java
index b9536d2..9c07616 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSDeleteDeviceNotificationResponse.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSDeleteDeviceNotificationResponse.java
@@ -32,7 +32,7 @@ public class ADSDeleteDeviceNotificationResponse extends AMSTCPPaket {
     /**
      * 4 bytes	ADS error number
      */
-    final Result result;
+    private final Result result;
 
     public ADSDeleteDeviceNotificationResponse(AMSTCPHeader amstcpHeader, AMSHeader amsHeader, Result result) {
         super(amstcpHeader, amsHeader);
@@ -44,7 +44,7 @@ public class ADSDeleteDeviceNotificationResponse extends AMSTCPPaket {
         return buildADSData(result);
     }
 
-   class Result extends ByteValue {
+    public static class Result extends ByteValue {
         public Result(byte... value) {
             super(value);
             assertLength(4);
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSDeviceNotificationRequest.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSDeviceNotificationRequest.java
index 99421b5..3b0b69b 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSDeviceNotificationRequest.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSDeviceNotificationRequest.java
@@ -36,15 +36,15 @@ public class ADSDeviceNotificationRequest extends AMSTCPPaket {
     /**
      * 4 bytes	Size of data in byte.
      */
-    final Length length;
+    private final Length length;
     /**
      * 4 bytes	Number of elements of type AdsStampHeader.
      */
-    final Stamps stamps;
+    private final Stamps stamps;
     /**
      * n bytes	Array with elements of type AdsStampHeader.
      */
-    final AdsStampHeader adsStampHeader;
+    private final AdsStampHeader adsStampHeader;
 
     public ADSDeviceNotificationRequest(AMSTCPHeader amstcpHeader, AMSHeader amsHeader, Length length, Stamps stamps, AdsStampHeader adsStampHeader) {
         super(amstcpHeader, amsHeader);
@@ -58,34 +58,34 @@ public class ADSDeviceNotificationRequest extends AMSTCPPaket {
         return buildADSData(length, stamps, adsStampHeader);
     }
 
-    class Length extends ByteValue {
+    public static class Length extends ByteValue {
         public Length(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-    class Stamps extends ByteValue {
+    public static class Stamps extends ByteValue {
         public Stamps(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-    class AdsStampHeader implements ByteReadable {
+    public static class AdsStampHeader implements ByteReadable {
 
         /**
          * 8 bytes	The timestamp is coded after the Windos FILETIME format. I.e. the value contains the number of the nano seconds, which passed since 1.1.1601. In addition, the local time change is not considered. Thus the time stamp is present as universal Coordinated time (UTC).
          */
-        final TimeStamp timeStamp;
+        private final TimeStamp timeStamp;
         /**
          * 4 bytes	Number of elements of type AdsNotificationSample.
          */
-        final Samples samples;
+        private final Samples samples;
         /**
          * n bytes	Array with elements of type AdsNotificationSample.
          */
-        final AdsNotificationSample adsNotificationSample;
+        private final AdsNotificationSample adsNotificationSample;
 
         public AdsStampHeader(TimeStamp timeStamp, Samples samples, AdsNotificationSample adsNotificationSample) {
             this.timeStamp = timeStamp;
@@ -93,7 +93,7 @@ public class ADSDeviceNotificationRequest extends AMSTCPPaket {
             this.adsNotificationSample = adsNotificationSample;
         }
 
-        class TimeStamp extends ByteValue {
+        public static class TimeStamp extends ByteValue {
 
             public TimeStamp(byte... value) {
                 super(value);
@@ -101,7 +101,7 @@ public class ADSDeviceNotificationRequest extends AMSTCPPaket {
             }
         }
 
-        class Samples extends ByteValue {
+        public static class Samples extends ByteValue {
 
             public Samples(byte... value) {
                 super(value);
@@ -109,20 +109,20 @@ public class ADSDeviceNotificationRequest extends AMSTCPPaket {
             }
         }
 
-        class AdsNotificationSample implements ByteReadable {
+        public static class AdsNotificationSample implements ByteReadable {
 
             /**
              * 4 Bytes	Handle of notification.
              */
-            final NotificationHandle notificationHandle;
+            private final NotificationHandle notificationHandle;
             /**
              * 4 Bytes	Size of data range in bytes.
              */
-            final SampleSize sampleSize;
+            private final SampleSize sampleSize;
             /**
              * n Bytes	Data
              */
-            final Data data;
+            private final Data data;
 
             public AdsNotificationSample(NotificationHandle notificationHandle, SampleSize sampleSize, Data data) {
                 this.notificationHandle = notificationHandle;
@@ -140,7 +140,7 @@ public class ADSDeviceNotificationRequest extends AMSTCPPaket {
                 return buildByteBuff(notificationHandle, sampleSize, data);
             }
 
-            class NotificationHandle extends ByteValue {
+            public static class NotificationHandle extends ByteValue {
 
                 public NotificationHandle(byte... value) {
                     super(value);
@@ -151,12 +151,12 @@ public class ADSDeviceNotificationRequest extends AMSTCPPaket {
             /**
              * Notice: If your handle becomes invalid, one notification without data will be send once as advice.
              */
-            class InvalidationNotificationHandle extends NotificationHandle {
+            public static class InvalidationNotificationHandle extends NotificationHandle {
                 public InvalidationNotificationHandle() {
                 }
             }
 
-            class SampleSize extends ByteValue {
+            public static class SampleSize extends ByteValue {
 
                 public SampleSize(byte... value) {
                     super(value);
@@ -164,7 +164,7 @@ public class ADSDeviceNotificationRequest extends AMSTCPPaket {
                 }
             }
 
-            class Data extends ByteValue {
+            public static class Data extends ByteValue {
 
                 public Data(byte... value) {
                     super(value);
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadDeviceInfoResponse.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadDeviceInfoResponse.java
index b2c5385..8a843c2 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadDeviceInfoResponse.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadDeviceInfoResponse.java
@@ -31,23 +31,23 @@ public class ADSReadDeviceInfoResponse extends AMSTCPPaket {
     /**
      * 4 bytes	ADS error number.
      */
-    final Result result;
+    private final Result result;
     /**
      * Version	1 byte	Major version number
      */
-    final MajorVersion majorVersion;
+    private final MajorVersion majorVersion;
     /**
      * Version	1 byte	Minor version number
      */
-    final MinorVersion minorVersion;
+    private final MinorVersion minorVersion;
     /**
      * Build	2 bytes	Build number
      */
-    final Version version;
+    private final Version version;
     /**
      * Name	16 bytes	Name of ADS device
      */
-    final Device device;
+    private final Device device;
 
     public ADSReadDeviceInfoResponse(AMSTCPHeader amstcpHeader, AMSHeader amsHeader, Result result, MajorVersion majorVersion, MinorVersion minorVersion, Version version, Device device) {
         super(amstcpHeader, amsHeader);
@@ -63,35 +63,35 @@ public class ADSReadDeviceInfoResponse extends AMSTCPPaket {
         return buildADSData(result, majorVersion, minorVersion, version, device);
     }
 
-    static class Result extends ByteValue {
+    public static class Result extends ByteValue {
         public Result(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-    static class MajorVersion extends ByteValue {
+    public static class MajorVersion extends ByteValue {
         public MajorVersion(byte... value) {
             super(value);
             assertLength(1);
         }
     }
 
-    static class MinorVersion extends ByteValue {
+    public static class MinorVersion extends ByteValue {
         public MinorVersion(byte... value) {
             super(value);
             assertLength(1);
         }
     }
 
-    static class Version extends ByteValue {
+    public static class Version extends ByteValue {
         public Version(byte... value) {
             super(value);
             assertLength(2);
         }
     }
 
-    static class Device extends ByteValue {
+    public static class Device extends ByteValue {
         public Device(byte... value) {
             super(value);
             assertLength(16);
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadRequest.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadRequest.java
index a5746d6..39ef966 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadRequest.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadRequest.java
@@ -32,17 +32,17 @@ public class ADSReadRequest extends AMSTCPPaket {
     /**
      * 4 bytes	Index Group of the data which should be read.
      */
-    final IndexGroup indexGroup;
+    private final IndexGroup indexGroup;
 
     /**
      * 4 bytes	Index Offset of the data which should be read.
      */
-    final IndexOffset indexOffset;
+    private final IndexOffset indexOffset;
 
     /**
      * 4 bytes	Length of the data (in bytes) which should be read.
      */
-    final Length length;
+    private final Length length;
 
     public ADSReadRequest(AMSTCPHeader amstcpHeader, AMSHeader amsHeader, IndexGroup indexGroup, IndexOffset indexOffset, Length length) {
         super(amstcpHeader, amsHeader);
@@ -56,21 +56,21 @@ public class ADSReadRequest extends AMSTCPPaket {
         return buildADSData(indexGroup, indexOffset, length);
     }
 
-    class IndexGroup extends ByteValue {
+    public static class IndexGroup extends ByteValue {
         public IndexGroup(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-    class IndexOffset extends ByteValue {
+    public static class IndexOffset extends ByteValue {
         public IndexOffset(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-   class Length extends ByteValue {
+    public static class Length extends ByteValue {
         public Length(byte... value) {
             super(value);
             assertLength(4);
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadResponse.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadResponse.java
index 8be3bb8..ae9672c 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadResponse.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadResponse.java
@@ -32,15 +32,15 @@ public class ADSReadResponse extends AMSTCPPaket {
     /**
      * 4 bytes	ADS error number
      */
-    final Result result;
+    private final Result result;
     /**
      * 4 bytes	Length of data which are supplied back.
      */
-    final Length length;
+    private final Length length;
     /**
      * n bytes	Data which are supplied back.
      */
-    final Data data;
+    private final Data data;
 
     public ADSReadResponse(AMSTCPHeader amstcpHeader, AMSHeader amsHeader, Result result, Length length, Data data) {
         super(amstcpHeader, amsHeader);
@@ -54,21 +54,21 @@ public class ADSReadResponse extends AMSTCPPaket {
         return buildADSData(result, length, data);
     }
 
-    class Result extends ByteValue {
+    public static class Result extends ByteValue {
         public Result(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-    class Length extends ByteValue {
+    public static class Length extends ByteValue {
         public Length(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-    class Data extends ByteValue {
+    public static class Data extends ByteValue {
         public Data(byte... value) {
             super(value);
         }
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadStateResponse.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadStateResponse.java
index ed334c7..2159293 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadStateResponse.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadStateResponse.java
@@ -32,7 +32,7 @@ public class ADSReadStateResponse extends AMSTCPPaket {
     /**
      * 4 bytes	ADS error number
      */
-    final Result result;
+    private final Result result;
 
     public ADSReadStateResponse(AMSTCPHeader amstcpHeader, AMSHeader amsHeader, Result result) {
         super(amstcpHeader, amsHeader);
@@ -44,7 +44,7 @@ public class ADSReadStateResponse extends AMSTCPPaket {
         return buildADSData(result);
     }
 
-    class Result extends ByteValue {
+    public static class Result extends ByteValue {
         public Result(byte... value) {
             super(value);
             assertLength(4);
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadWriteRequest.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadWriteRequest.java
index db1a7eb..3654d46 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadWriteRequest.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadWriteRequest.java
@@ -34,23 +34,23 @@ public class ADSReadWriteRequest extends AMSTCPPaket {
     /**
      * 4 bytes	Index Group, in which the data should be written.
      */
-    final IndexGroup indexGroup;
+    private final IndexGroup indexGroup;
     /**
      * 4 bytes	Index Offset, in which the data should be written
      */
-    final IndexOffset indexOffset;
+    private final IndexOffset indexOffset;
     /**
      * 4 bytes	Length of data in bytes, which should be read.
      */
-    final ReadLength readLength;
+    private final ReadLength readLength;
     /**
      * 4 bytes	Length of data in bytes, which should be written
      */
-    final WriteLength writeLength;
+    private final WriteLength writeLength;
     /**
      * n bytes	Data which are written in the ADS device.
      */
-    final Data data;
+    private final Data data;
 
     public ADSReadWriteRequest(AMSTCPHeader amstcpHeader, AMSHeader amsHeader, IndexGroup indexGroup, IndexOffset indexOffset, ReadLength readLength, WriteLength writeLength, Data data) {
         super(amstcpHeader, amsHeader);
@@ -66,35 +66,35 @@ public class ADSReadWriteRequest extends AMSTCPPaket {
         return ADSData.EMPTY;
     }
 
-    class IndexGroup extends ByteValue {
+    public static class IndexGroup extends ByteValue {
         public IndexGroup(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-    class IndexOffset extends ByteValue {
+    public static class IndexOffset extends ByteValue {
         public IndexOffset(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-    class ReadLength extends ByteValue {
+    public static class ReadLength extends ByteValue {
         public ReadLength(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-    class WriteLength extends ByteValue {
+    public static class WriteLength extends ByteValue {
         public WriteLength(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-    class Data extends ByteValue {
+    public static class Data extends ByteValue {
         public Data(byte... value) {
             super(value);
         }
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadWriteResponse.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadWriteResponse.java
index 3b0409c..7137194 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadWriteResponse.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSReadWriteResponse.java
@@ -32,17 +32,17 @@ public class ADSReadWriteResponse extends AMSTCPPaket {
     /**
      * 4 bytes	ADS error number
      */
-    final Result result;
+    private final Result result;
 
     /**
      * 4 bytes	Length of data which are supplied back.
      */
-    final Length length;
+    private final Length length;
 
     /**
      * n bytes	Data which are supplied back.
      */
-    final Data data;
+    private final Data data;
 
     public ADSReadWriteResponse(AMSTCPHeader amstcpHeader, AMSHeader amsHeader, Result result, Length length, Data data) {
         super(amstcpHeader, amsHeader);
@@ -56,21 +56,21 @@ public class ADSReadWriteResponse extends AMSTCPPaket {
         return ADSData.EMPTY;
     }
 
-    class Result extends ByteValue {
+    public static class Result extends ByteValue {
         public Result(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-    class Length extends ByteValue {
+    public static class Length extends ByteValue {
         public Length(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-    class Data extends ByteValue {
+    public static class Data extends ByteValue {
         public Data(byte... value) {
             super(value);
         }
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSWriteControlRequest.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSWriteControlRequest.java
index b3c42ab..356241a 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSWriteControlRequest.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSWriteControlRequest.java
@@ -34,19 +34,19 @@ public class ADSWriteControlRequest extends AMSTCPPaket {
     /**
      * 2 bytes	New ADS status (see data type ADSSTATE of the ADS-DLL).
      */
-    final ADSState adsState;
+    private final ADSState adsState;
     /**
      * 2 bytes	New device status.
      */
-    final DeviceState deviceState;
+    private final DeviceState deviceState;
     /**
      * 4 bytes	Length of data in byte.
      */
-    final Length length;
+    private final Length length;
     /**
      * n bytes	Additional data which are sent to the ADS device
      */
-    final Data data;
+    private final Data data;
 
     public ADSWriteControlRequest(AMSTCPHeader amstcpHeader, AMSHeader amsHeader, ADSState adsState, DeviceState deviceState, Length length, Data data) {
         super(amstcpHeader, amsHeader);
@@ -61,28 +61,28 @@ public class ADSWriteControlRequest extends AMSTCPPaket {
         return buildADSData(adsState, deviceState, length, data);
     }
 
-    class ADSState extends ByteValue {
+    public static class ADSState extends ByteValue {
         public ADSState(byte... value) {
             super(value);
             assertLength(2);
         }
     }
 
-    class DeviceState extends ByteValue {
+    public static class DeviceState extends ByteValue {
         public DeviceState(byte... value) {
             super(value);
             assertLength(2);
         }
     }
 
-    class Length extends ByteValue {
+    public static class Length extends ByteValue {
         public Length(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-    class Data extends ByteValue {
+    public static class Data extends ByteValue {
         public Data(byte... value) {
             super(value);
         }
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSWriteControlResponse.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSWriteControlResponse.java
index 04b1032..869527c 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSWriteControlResponse.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSWriteControlResponse.java
@@ -31,7 +31,7 @@ public class ADSWriteControlResponse extends AMSTCPPaket {
     /**
      * 4 bytes	ADS error number
      */
-    final ADSReadResponse.Result result;
+    private final ADSReadResponse.Result result;
 
     public ADSWriteControlResponse(AMSTCPHeader amstcpHeader, AMSHeader amsHeader, ADSReadResponse.Result result) {
         super(amstcpHeader, amsHeader);
@@ -43,7 +43,7 @@ public class ADSWriteControlResponse extends AMSTCPPaket {
         return buildADSData(result);
     }
 
-    class Result extends ByteValue {
+    public static class Result extends ByteValue {
         public Result(byte... value) {
             super(value);
             assertLength(4);
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSWriteRequest.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSWriteRequest.java
index ac7b48d..8fee327 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSWriteRequest.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSWriteRequest.java
@@ -32,19 +32,19 @@ public class ADSWriteRequest extends AMSTCPPaket {
     /**
      * 4 bytes	Index Group in which the data should be written
      */
-    final IndexGroup indexGroup;
+    private final IndexGroup indexGroup;
     /**
      * 4 bytes	Index Offset, in which the data should be written
      */
-    final IndexOffset indexOffset;
+    private final IndexOffset indexOffset;
     /**
      * 4 bytes	Length of data in bytes which are written
      */
-    final Length length;
+    private final Length length;
     /**
      * n bytes	Data which are written in the ADS device.
      */
-    final Data data;
+    private final Data data;
 
     public ADSWriteRequest(AMSTCPHeader amstcpHeader, AMSHeader amsHeader, IndexGroup indexGroup, IndexOffset indexOffset, Length length, Data data) {
         super(amstcpHeader, amsHeader);
@@ -60,28 +60,28 @@ public class ADSWriteRequest extends AMSTCPPaket {
         return buildADSData(indexGroup, indexOffset, length, data);
     }
 
-    class IndexGroup extends ByteValue {
+    public static class IndexGroup extends ByteValue {
         public IndexGroup(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-    class IndexOffset extends ByteValue {
+    public static class IndexOffset extends ByteValue {
         public IndexOffset(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-    class Length extends ByteValue {
+    public static class Length extends ByteValue {
         public Length(byte... value) {
             super(value);
             assertLength(4);
         }
     }
 
-    class Data extends ByteValue {
+    public static class Data extends ByteValue {
         public Data(byte... value) {
             super(value);
         }
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSWriteResponse.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSWriteResponse.java
index a440d92..3e8174a 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSWriteResponse.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/commands/ADSWriteResponse.java
@@ -32,7 +32,7 @@ public class ADSWriteResponse extends AMSTCPPaket {
     /**
      * 4 bytes	ADS error number
      */
-    final ADSReadResponse.Result result;
+    private final ADSReadResponse.Result result;
 
     public ADSWriteResponse(AMSTCPHeader amstcpHeader, AMSHeader amsHeader, ADSReadResponse.Result result) {
         super(amstcpHeader, amsHeader);
@@ -44,7 +44,7 @@ public class ADSWriteResponse extends AMSTCPPaket {
         return buildADSData(result);
     }
 
-    class Result extends ByteValue {
+    public static class Result extends ByteValue {
         public Result(byte... value) {
             super(value);
             assertLength(4);
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/generic/AMSHeader.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/generic/AMSHeader.java
index 2dfd667..e9258d6 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/generic/AMSHeader.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/generic/AMSHeader.java
@@ -32,31 +32,31 @@ public class AMSHeader implements ByteReadable {
     /**
      * This is the AMSNetId of the station, for which the packet is intended. Remarks see below.
      */
-    final AMSNetId targetAmsNetId;
+    private final AMSNetId targetAmsNetId;
     /**
      * This is the AMSPort of the station, for which the packet is intended.
      */
-    final AMSPort targetAmsPort;
+    private final AMSPort targetAmsPort;
     /**
      * This contains the AMSNetId of the station, from which the packet was sent.
      */
-    final AMSNetId sourceAmsNetId;
+    private final AMSNetId sourceAmsNetId;
     /**
      * This contains the AMSPort of the station, from which the packet was sent.
      */
-    final AMSPort sourceAmsPort;
+    private final AMSPort sourceAmsPort;
 
-    final Command commandId;
+    private final Command commandId;
 
-    final State stateFlags;
+    private final State stateFlags;
 
-    final DataLength dataLength;
+    private final DataLength dataLength;
 
-    final Error code;
+    private final Error code;
 
-    final Invoke invokeId;
+    private final Invoke invokeId;
 
-    final Data nData;
+    private final Data nData;
 
     public AMSHeader(AMSNetId targetAmsNetId, AMSPort targetAmsPort, AMSNetId sourceAmsNetId, AMSPort sourceAmsPort, Command commandId, State stateFlags, DataLength dataLength, Error code, Invoke invokeId, Data nData) {
         this.targetAmsNetId = targetAmsNetId;
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/generic/AMSTCPHeader.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/generic/AMSTCPHeader.java
index 6f04d6b..9391de4 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/generic/AMSTCPHeader.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/generic/AMSTCPHeader.java
@@ -28,9 +28,9 @@ import org.apache.plc4x.java.ads.model.util.ByteValue;
  */
 public class AMSTCPHeader implements ByteReadable {
 
-    final Reserved reserved;
+    private final Reserved reserved;
 
-    final Length length;
+    private final Length length;
 
     public AMSTCPHeader(Length length) {
         this.reserved = Reserved.CONSTANT;
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/generic/AMSTCPPaket.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/generic/AMSTCPPaket.java
index 08896ca..22078e3 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/generic/AMSTCPPaket.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/model/generic/AMSTCPPaket.java
@@ -23,9 +23,9 @@ import io.netty.buffer.Unpooled;
 import org.apache.plc4x.java.ads.model.util.ByteReadable;
 
 public abstract class AMSTCPPaket implements ByteReadable {
-    final AMSTCPHeader amstcpHeader;
+    private final AMSTCPHeader amstcpHeader;
 
-    final AMSHeader amsHeader;
+    private final AMSHeader amsHeader;
 
     public AMSTCPPaket(AMSTCPHeader amstcpHeader, AMSHeader amsHeader) {
         this.amstcpHeader = amstcpHeader;
@@ -56,7 +56,7 @@ public abstract class AMSTCPPaket implements ByteReadable {
         return () -> buildByteBuff(byteReadables).array();
     }
 
-    protected ByteBuf buildByteBuff(ByteReadable... byteReadables) {
+    protected static ByteBuf buildByteBuff(ByteReadable... byteReadables) {
         ByteBuf buffer = Unpooled.buffer();
         for (ByteReadable byteReadable : byteReadables) {
             buffer.writeBytes(byteReadable.getByteBuf());

-- 
To stop receiving notification emails like this one, please contact
sruehl@apache.org.