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 19:19:03 UTC

[incubator-plc4x] branch feature/Beckhoff_ADS_protocol updated: added some convinience methods

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 f8faeb0  added some convinience methods
f8faeb0 is described below

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

    added some convinience methods
---
 .../java/ads/netty/model/messages/ADSMessage.java  | 82 ++++++++++++++++++++++
 .../netty/model/messages/ADSRequestMessage.java    | 33 +++++++++
 .../netty/model/messages/ADSResponseMessage.java   | 47 +++++++++++++
 .../messages/SetupCommunicationRequestMessage.java | 33 +++++++++
 .../java/ads/netty/model/params/ADSParameter.java  | 27 +++++++
 .../netty/model/params/CpuServicesParameter.java   | 31 ++++++++
 .../model/params/SetupCommunicationParameter.java  | 52 ++++++++++++++
 .../java/ads/netty/model/params/VarParameter.java  | 45 ++++++++++++
 .../model/params/items/ADSAnyVarParameterItem.java | 79 +++++++++++++++++++++
 .../netty/model/params/items/VarParameterItem.java | 27 +++++++
 .../java/ads/netty/model/payloads/ADSPayload.java  | 27 +++++++
 .../java/ads/netty/model/payloads/VarPayload.java  | 46 ++++++++++++
 .../netty/model/payloads/items/VarPayloadItem.java | 48 +++++++++++++
 .../netty/model/types/DataTransportErrorCode.java  | 61 ++++++++++++++++
 .../ads/netty/model/types/DataTransportSize.java   | 64 +++++++++++++++++
 .../ads/netty/model/types/HeaderErrorClass.java    | 40 +++++++++++
 .../java/ads/netty/model/types/MemoryArea.java     | 67 ++++++++++++++++++
 .../java/ads/netty/model/types/MessageType.java    | 55 +++++++++++++++
 .../java/ads/netty/model/types/ParameterError.java | 55 +++++++++++++++
 .../java/ads/netty/model/types/ParameterType.java  | 71 +++++++++++++++++++
 .../ads/netty/model/types/SpecificationType.java   | 52 ++++++++++++++
 .../java/ads/netty/model/types/TransportSize.java  | 68 ++++++++++++++++++
 .../netty/model/types/VariableAddressingMode.java  | 63 +++++++++++++++++
 23 files changed, 1173 insertions(+)

diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/messages/ADSMessage.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/messages/ADSMessage.java
new file mode 100644
index 0000000..c3d8706
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/messages/ADSMessage.java
@@ -0,0 +1,82 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.messages;
+
+import org.apache.plc4x.java.ads.netty.model.params.ADSParameter;
+import org.apache.plc4x.java.ads.netty.model.payloads.ADSPayload;
+import org.apache.plc4x.java.ads.netty.model.types.MessageType;
+import org.apache.plc4x.java.netty.Message;
+
+import java.util.List;
+import java.util.Optional;
+
+public abstract class ADSMessage extends Message {
+
+    private final MessageType messageType;
+    private final short tpduReference;
+    private final List<ADSParameter> parameters;
+    private final List<ADSPayload> payloads;
+
+    protected ADSMessage(MessageType messageType, short tpduReference, List<ADSParameter> parameters, List<ADSPayload> payloads) {
+        super(null);
+        this.messageType = messageType;
+        this.tpduReference = tpduReference;
+        this.parameters = parameters;
+        this.payloads = payloads;
+    }
+
+    public MessageType getMessageType() {
+        return messageType;
+    }
+
+    public short getTpduReference() {
+        return tpduReference;
+    }
+
+    public List<ADSParameter> getParameters() {
+        return parameters;
+    }
+
+    public <T> Optional<T> getParameter(Class<T> parameterType) {
+        if (parameters != null) {
+            for (ADSParameter adsParameter : parameters) {
+                if (adsParameter.getClass() == parameterType) {
+                    return Optional.of(parameterType.cast(adsParameter));
+                }
+            }
+        }
+        return Optional.empty();
+    }
+
+    public List<ADSPayload> getPayloads() {
+        return payloads;
+    }
+
+    public <T> Optional<T> getPayload(Class<T> payloadType) {
+        if (payloads != null) {
+            for (ADSPayload adsPayload : payloads) {
+                if (adsPayload.getClass() == payloadType) {
+                    return Optional.of(payloadType.cast(adsPayload));
+                }
+            }
+        }
+        return Optional.empty();
+    }
+
+}
\ No newline at end of file
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/messages/ADSRequestMessage.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/messages/ADSRequestMessage.java
new file mode 100644
index 0000000..b2d3df5
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/messages/ADSRequestMessage.java
@@ -0,0 +1,33 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.messages;
+
+import org.apache.plc4x.java.ads.netty.model.params.ADSParameter;
+import org.apache.plc4x.java.ads.netty.model.payloads.ADSPayload;
+import org.apache.plc4x.java.ads.netty.model.types.MessageType;
+
+import java.util.List;
+
+public class ADSRequestMessage extends ADSMessage {
+
+    public ADSRequestMessage(MessageType messageType, short tpduReference, List<ADSParameter> adsParameters, List<ADSPayload> adsPayloads) {
+        super(messageType, tpduReference, adsParameters, adsPayloads);
+    }
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/messages/ADSResponseMessage.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/messages/ADSResponseMessage.java
new file mode 100644
index 0000000..83491d2
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/messages/ADSResponseMessage.java
@@ -0,0 +1,47 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.messages;
+
+import org.apache.plc4x.java.ads.netty.model.params.ADSParameter;
+import org.apache.plc4x.java.ads.netty.model.payloads.ADSPayload;
+import org.apache.plc4x.java.ads.netty.model.types.MessageType;
+
+import java.util.List;
+
+public class ADSResponseMessage extends ADSMessage {
+
+    private final byte errorClass;
+    private final byte errorCode;
+
+    public ADSResponseMessage(MessageType messageType, short tpduReference, List<ADSParameter> adsParameters, List<ADSPayload> adsPayloads,
+                             byte errorClass, byte errorCode) {
+        super(messageType, tpduReference, adsParameters, adsPayloads);
+        this.errorClass = errorClass;
+        this.errorCode = errorCode;
+    }
+
+    public byte getErrorClass() {
+        return errorClass;
+    }
+
+    public byte getErrorCode() {
+        return errorCode;
+    }
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/messages/SetupCommunicationRequestMessage.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/messages/SetupCommunicationRequestMessage.java
new file mode 100644
index 0000000..316149c
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/messages/SetupCommunicationRequestMessage.java
@@ -0,0 +1,33 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.messages;
+
+import org.apache.plc4x.java.ads.netty.model.params.SetupCommunicationParameter;
+import org.apache.plc4x.java.ads.netty.model.types.MessageType;
+
+import java.util.Collections;
+
+public class SetupCommunicationRequestMessage extends ADSRequestMessage {
+
+    public SetupCommunicationRequestMessage(short tpduReference, short maxAmqCaller, short maxAmqCallee, short pduLength) {
+        super(MessageType.JOB, tpduReference, Collections.singletonList(
+            new SetupCommunicationParameter(maxAmqCaller, maxAmqCallee, pduLength)), Collections.emptyList());
+    }
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/params/ADSParameter.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/params/ADSParameter.java
new file mode 100644
index 0000000..3781d9c
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/params/ADSParameter.java
@@ -0,0 +1,27 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.params;
+
+import org.apache.plc4x.java.ads.netty.model.types.ParameterType;
+
+public interface ADSParameter {
+
+    ParameterType getType();
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/params/CpuServicesParameter.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/params/CpuServicesParameter.java
new file mode 100644
index 0000000..b17ca4f
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/params/CpuServicesParameter.java
@@ -0,0 +1,31 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.params;
+
+import org.apache.plc4x.java.ads.netty.model.types.ParameterType;
+
+public class CpuServicesParameter implements ADSParameter {
+
+    @Override
+    public ParameterType getType() {
+        return ParameterType.CPU_SERVICES;
+    }
+
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/params/SetupCommunicationParameter.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/params/SetupCommunicationParameter.java
new file mode 100644
index 0000000..a4969bb
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/params/SetupCommunicationParameter.java
@@ -0,0 +1,52 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.params;
+
+import org.apache.plc4x.java.ads.netty.model.types.ParameterType;
+
+public class SetupCommunicationParameter implements ADSParameter {
+
+    private final short maxAmqCaller;
+    private final short maxAmqCallee;
+    private final short pduLength;
+
+    public SetupCommunicationParameter(short maxAmqCaller, short maxAmqCallee, short pduLength) {
+        this.maxAmqCaller = maxAmqCaller;
+        this.maxAmqCallee = maxAmqCallee;
+        this.pduLength = pduLength;
+    }
+
+    @Override
+    public ParameterType getType() {
+        return ParameterType.SETUP_COMMUNICATION;
+    }
+
+    public short getMaxAmqCaller() {
+        return maxAmqCaller;
+    }
+
+    public short getMaxAmqCallee() {
+        return maxAmqCallee;
+    }
+
+    public short getPduLength() {
+        return pduLength;
+    }
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/params/VarParameter.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/params/VarParameter.java
new file mode 100644
index 0000000..7a0ebf0
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/params/VarParameter.java
@@ -0,0 +1,45 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.params;
+
+import org.apache.plc4x.java.ads.netty.model.params.items.VarParameterItem;
+import org.apache.plc4x.java.ads.netty.model.types.ParameterType;
+
+import java.util.List;
+
+public class VarParameter implements ADSParameter {
+
+    private final ParameterType type;
+    private final List<VarParameterItem> items;
+
+    public VarParameter(ParameterType type, List<VarParameterItem> items) {
+        this.type = type;
+        this.items = items;
+    }
+
+    @Override
+    public ParameterType getType() {
+        return type;
+    }
+
+    public List<VarParameterItem> getItems() {
+        return items;
+    }
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/params/items/ADSAnyVarParameterItem.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/params/items/ADSAnyVarParameterItem.java
new file mode 100644
index 0000000..23e01ad
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/params/items/ADSAnyVarParameterItem.java
@@ -0,0 +1,79 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.params.items;
+
+import org.apache.plc4x.java.ads.netty.model.types.MemoryArea;
+import org.apache.plc4x.java.ads.netty.model.types.SpecificationType;
+import org.apache.plc4x.java.ads.netty.model.types.TransportSize;
+import org.apache.plc4x.java.ads.netty.model.types.VariableAddressingMode;
+
+public class ADSAnyVarParameterItem implements VarParameterItem {
+
+    private final SpecificationType specificationType;
+    private final MemoryArea memoryArea;
+    private final TransportSize transportSize;
+    private final short numElements;
+    private final short dataBlockNumber;
+    private final short byteOffset;
+    private final byte bitOffset;
+
+    public ADSAnyVarParameterItem(SpecificationType specificationType, MemoryArea memoryArea, TransportSize transportSize, short numElements, short dataBlockNumber, short byteOffset, byte bitOffset) {
+        this.specificationType = specificationType;
+        this.memoryArea = memoryArea;
+        this.transportSize = transportSize;
+        this.numElements = numElements;
+        this.dataBlockNumber = dataBlockNumber;
+        this.byteOffset = byteOffset;
+        this.bitOffset = bitOffset;
+    }
+
+    @Override
+    public VariableAddressingMode getAddressingMode() {
+        return VariableAddressingMode.ADSANY;
+    }
+
+    public SpecificationType getSpecificationType() {
+        return specificationType;
+    }
+
+    public MemoryArea getMemoryArea() {
+        return memoryArea;
+    }
+
+    public TransportSize getTransportSize() {
+        return transportSize;
+    }
+
+    public short getNumElements() {
+        return numElements;
+    }
+
+    public short getDataBlockNumber() {
+        return dataBlockNumber;
+    }
+
+    public short getByteOffset() {
+        return byteOffset;
+    }
+
+    public byte getBitOffset() {
+        return bitOffset;
+    }
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/params/items/VarParameterItem.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/params/items/VarParameterItem.java
new file mode 100644
index 0000000..9e5f9ba
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/params/items/VarParameterItem.java
@@ -0,0 +1,27 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.params.items;
+
+import org.apache.plc4x.java.ads.netty.model.types.VariableAddressingMode;
+
+public interface VarParameterItem {
+
+    VariableAddressingMode getAddressingMode();
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/payloads/ADSPayload.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/payloads/ADSPayload.java
new file mode 100644
index 0000000..c4aa6ef
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/payloads/ADSPayload.java
@@ -0,0 +1,27 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.payloads;
+
+import org.apache.plc4x.java.ads.netty.model.types.ParameterType;
+
+public interface ADSPayload {
+
+    ParameterType getType();
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/payloads/VarPayload.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/payloads/VarPayload.java
new file mode 100644
index 0000000..6bcc00c
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/payloads/VarPayload.java
@@ -0,0 +1,46 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.payloads;
+
+import org.apache.plc4x.java.ads.netty.model.payloads.items.VarPayloadItem;
+import org.apache.plc4x.java.ads.netty.model.types.ParameterType;
+
+import java.util.List;
+
+public class VarPayload implements ADSPayload {
+
+    private final ParameterType parameterType;
+
+    private final List<VarPayloadItem> payloadItems;
+
+    public VarPayload(ParameterType parameterType, List<VarPayloadItem> payloadItems) {
+        this.parameterType = parameterType;
+        this.payloadItems = payloadItems;
+    }
+
+    @Override
+    public ParameterType getType() {
+        return parameterType;
+    }
+
+    public List<VarPayloadItem> getPayloadItems() {
+        return payloadItems;
+    }
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/payloads/items/VarPayloadItem.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/payloads/items/VarPayloadItem.java
new file mode 100644
index 0000000..9220cd4
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/payloads/items/VarPayloadItem.java
@@ -0,0 +1,48 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.payloads.items;
+
+import org.apache.plc4x.java.ads.netty.model.types.DataTransportErrorCode;
+import org.apache.plc4x.java.ads.netty.model.types.DataTransportSize;
+
+public class VarPayloadItem {
+
+    private final DataTransportErrorCode returnCode;
+    private final DataTransportSize dataTransportSize;
+    private final byte[] data;
+
+    public VarPayloadItem(DataTransportErrorCode returnCode, DataTransportSize dataTransportSize, byte[] data) {
+        this.returnCode = returnCode;
+        this.dataTransportSize = dataTransportSize;
+        this.data = data;
+    }
+
+    public DataTransportErrorCode getReturnCode() {
+        return returnCode;
+    }
+
+    public DataTransportSize getDataTransportSize() {
+        return dataTransportSize;
+    }
+
+    public byte[] getData() {
+        return data;
+    }
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/DataTransportErrorCode.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/DataTransportErrorCode.java
new file mode 100644
index 0000000..fd32c42
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/DataTransportErrorCode.java
@@ -0,0 +1,61 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.types;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum DataTransportErrorCode {
+    RESERVED((byte) 0x00),
+    ACCESS_DENIED((byte) 0x03),
+    INVALID_ADDRESS((byte) 0x05),
+    NOT_FOUND((byte) 0x0A),
+    OK((byte) 0xFF);
+
+    private static final Logger logger = LoggerFactory.getLogger(DataTransportErrorCode.class);
+
+    private static Map<Byte, DataTransportErrorCode> map = null;
+    
+    private byte code;
+
+    DataTransportErrorCode(byte code) {
+        this.code = code;
+    }
+
+    public byte getCode() {
+        return code;
+    }
+
+    public static DataTransportErrorCode valueOf(byte code) {
+        if (map == null) {
+            map = new HashMap<>();
+            for (DataTransportErrorCode dataTransportErrorCode : DataTransportErrorCode.values()) {
+                map.put(dataTransportErrorCode.code, dataTransportErrorCode);
+            }
+        }
+        if (!map.containsKey(code)) {
+            logger.error("No DataTransportErrorCode for code {}", code);
+        }
+        return map.get(code);
+    }
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/DataTransportSize.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/DataTransportSize.java
new file mode 100644
index 0000000..a03af60
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/DataTransportSize.java
@@ -0,0 +1,64 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.types;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * (Values determined by evaluating generated ".pcapng" files)
+ */
+public enum DataTransportSize {
+    NULL((byte) 0x00, false),
+    BIT((byte) 0x03, true),
+    BYTE_WORD_DWORD((byte) 0x04, true),
+    INTEGER((byte) 0x05, true),
+    DINTEGER((byte) 0x06, false),
+    REAL((byte) 0x07, false),
+    OCTET_STRING((byte) 0x09, false);
+
+    private static Map<Byte, DataTransportSize> map = null;
+    
+    private final byte code;
+    private final boolean sizeInBits;
+
+    DataTransportSize(byte code, boolean sizeInBits) {
+        this.code = code;
+        this.sizeInBits = sizeInBits;
+    }
+
+    public byte getCode() {
+        return code;
+    }
+
+    public boolean isSizeInBits() {
+        return sizeInBits;
+    }
+
+    public static DataTransportSize valueOf(byte code) {
+        if (map == null) {
+            map = new HashMap<>();
+            for (DataTransportSize dataTransportSize : DataTransportSize.values()) {
+                map.put(dataTransportSize.code, dataTransportSize);
+            }
+        }
+        return map.get(code);
+    }
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/HeaderErrorClass.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/HeaderErrorClass.java
new file mode 100644
index 0000000..0b4f481
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/HeaderErrorClass.java
@@ -0,0 +1,40 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.types;
+
+public enum HeaderErrorClass {
+    NO_ERROR((byte) 0x00),
+    APPLICATION_RELATIONSHIP_ERROR((byte) 0x81),
+    OBJECT_DEFINITION_ERROR((byte) 0x82),
+    NO_RESSOURCES_AVAILABLE_ERROR((byte) 0x83),
+    ERROR_ON_SERVICE_PROCESSING((byte) 0x84),
+    ERROR_ON_SUPPLIES((byte) 0x85),
+    ACCESS_ERROR((byte) 0x87);
+
+    private final byte code;
+
+    HeaderErrorClass(byte code) {
+        this.code = code;
+    }
+
+    public byte getCode() {
+        return code;
+    }
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/MemoryArea.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/MemoryArea.java
new file mode 100644
index 0000000..9ea22d3
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/MemoryArea.java
@@ -0,0 +1,67 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.types;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * (Values determined by evaluating generated ".pcapng" files)
+ */
+public enum MemoryArea {
+    COUNTERS((byte) 0x1C), /* Renamed from "ADS Counters" */
+    TIMERS((byte) 0x1D), /* Renamed from "ADS Timers" */
+    DIRECT_PERIPHERAL_ACCESS((byte) 0x80),
+    INPUTS((byte) 0x81),
+    OUTPUTS((byte) 0x82),
+    FLAGS((byte) 0x83),
+    DATA_BLOCKS((byte) 0x84),
+    INSTANCE_DATA_BLOCKS((byte) 0x85),
+    LOCAL_DATA((byte) 0x86),
+
+    ADS_200_SYSTEM_INFO((byte) 0x03), /* Renamed from "System info of 200 family" */
+    ADS_200_FLAGS((byte) 0x05), /* Renamed from "System flags of 200 family" */
+    ADS_200_INPUTS((byte) 0x06), /* Renamed from "System inputs of 200 family" */
+    ADS_200_OUTPUTS((byte) 0x07), /* Renamed from "System outputs of 200 family" */
+    ADS_200_IEC_COUNTERS((byte) 0x1E), /* Renamed from "IEC counters (200 family)" */
+    ADS_200_IEC_TIMERS((byte) 0x1F); /* Renamed from "IEC timers (200 family)" */
+    
+    private static Map<Byte, MemoryArea> map = null;
+
+    private final byte code;
+
+    MemoryArea(byte code) {
+        this.code = code;
+    }
+
+    public byte getCode() {
+        return code;
+    }
+
+    public static MemoryArea valueOf(byte code) {
+        if (map == null) {
+            map = new HashMap<>();
+            for (MemoryArea memoryArea : MemoryArea.values()) {
+                map.put(memoryArea.code, memoryArea);
+            }
+        }
+        return map.get(code);
+    }
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/MessageType.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/MessageType.java
new file mode 100644
index 0000000..6e41f13
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/MessageType.java
@@ -0,0 +1,55 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.types;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * (Values determined by evaluating generated ".pcapng" files)
+ */
+public enum MessageType {
+    JOB((byte) 0x01),
+    ACK((byte) 0x02),
+    ACK_DATA((byte) 0x03),
+    USER_DATA((byte) 0x07); /* Renamed from "Userdata" */
+
+    private static Map<Byte, MessageType> map = null;
+    
+    private final byte code;
+
+    MessageType(byte code) {
+        this.code = code;
+    }
+
+    public byte getCode() {
+        return code;
+    }
+
+    public static MessageType valueOf(byte code) {
+        if (map == null) {
+            map = new HashMap<>();
+            for (MessageType messageType : MessageType.values()) {
+                map.put(messageType.code, messageType);
+            }
+        }
+        return map.get(code);
+    }
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/ParameterError.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/ParameterError.java
new file mode 100644
index 0000000..ff8a637
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/ParameterError.java
@@ -0,0 +1,55 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.types;
+
+public enum ParameterError {
+    NO_ERROR((short) 0x0000),
+    INVALID_BLOCK_TYPE_NUMBER((short) 0x0110),
+    INVALID_PARAMETER((short) 0x0112),
+    PG_RESSOURCE_ERROR((short) 0x011A),
+    PLC_RESSOURCE_ERROR((short) 0x011B),
+    PROTOCOL_ERROR((short) 0x011C),
+    USER_BUFFER_TOO_SHORT((short) 0x011F),
+    REQUEST_ERROR((short) 0x0141),
+    VERSION_MISMATCH((short) 0x01C0),
+    NOT_IMPLEMENTED((short) 0x01F0),
+    L7_INVALID_CPU_STATE((short) 0x8001),
+    L7_PDU_SIZE_ERROR((short) 0x8500),
+    L7_INVALID_SZL_ID((short) 0xD401),
+    L7_INVALID_INDEX((short) 0xD402),
+    L7_DGS_CONNECTION_ALREADY_ANNOUNCED((short) 0xD403),
+    L7_MAX_USER_NB((short) 0xD404),
+    L7_DGS_FUNCTION_PARAMETER_SYNTAX_ERROR((short) 0xD405),
+    L7_NO_INFO((short) 0xD406),
+    L7_PRT_FUNCTION_PARAMETER_SYNTAX_ERROR((short) 0xD601),
+    L7_INVALID_VARIABLE_ADDRESS((short) 0xD801),
+    L7_UNKNOWN_REQUEST((short) 0xD802),
+    L7_INVALID_REQUEST_STATUS((short) 0xD803);
+
+    private final short code;
+
+    ParameterError(short code) {
+        this.code = code;
+    }
+
+    public short getCode() {
+        return code;
+    }
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/ParameterType.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/ParameterType.java
new file mode 100644
index 0000000..9ee0bbc
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/ParameterType.java
@@ -0,0 +1,71 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.types;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * (Values determined by evaluating generated ".pcapng" files)
+ */
+public enum ParameterType {
+    CPU_SERVICES((byte) 0x00),
+    READ_VAR((byte) 0x04),
+    WRITE_VAR((byte) 0x05),
+    REQUEST_DOWNLOAD((byte) 0x1A),
+    DOWNLOAD_BLOCK((byte) 0x1B),
+    DOWNLOAD_ENDED((byte) 0x1C),
+    START_UPLOAD((byte) 0x1D),
+    UPLOAD((byte) 0x1E),
+    END_UPLOAD((byte) 0x1F),
+    PI_SERVICE((byte) 0x28),
+    PLC_STOP((byte) 0x29),
+    SETUP_COMMUNICATION((byte) 0xF0);
+
+    private static final Logger logger = LoggerFactory.getLogger(ParameterType.class);
+
+    private static Map<Byte, ParameterType> map = null;
+    
+    private final byte code;
+
+    ParameterType(byte code) {
+        this.code = code;
+    }
+
+    public byte getCode() {
+        return code;
+    }
+
+    public static ParameterType valueOf(byte code) {
+        if (map == null) {
+            map = new HashMap<>();
+            for (ParameterType parameterType : ParameterType.values()) {
+                map.put(parameterType.code, parameterType);
+            }
+        }
+        if(!map.containsKey(code)) {
+            logger.error("ParameterType for code {} not found", code);
+        }
+        return map.get(code);
+    }
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/SpecificationType.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/SpecificationType.java
new file mode 100644
index 0000000..8f55e53
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/SpecificationType.java
@@ -0,0 +1,52 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.types;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * (Values determined by evaluating generated ".pcapng" files)
+ */
+public enum SpecificationType {
+    VARIABLE_SPECIFICATION((byte) 0x12);
+
+    private static Map<Byte, SpecificationType> map = null;
+    
+    private final byte code;
+
+    SpecificationType(byte code) {
+        this.code = code;
+    }
+
+    public byte getCode() {
+        return code;
+    }
+
+    public static SpecificationType valueOf(byte code) {
+        if (map == null) {
+            map = new HashMap<>();
+            for (SpecificationType specificationType : SpecificationType.values()) {
+                map.put(specificationType.code, specificationType);
+            }
+        }
+        return map.get(code);
+    }
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/TransportSize.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/TransportSize.java
new file mode 100644
index 0000000..e3e2c8c
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/TransportSize.java
@@ -0,0 +1,68 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.types;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * (Values determined by evaluating generated ".pcapng" files)
+ */
+public enum TransportSize {
+    BIT((byte) 0x01),
+    BYTE((byte) 0x02),
+    CHAR((byte) 0x03),
+    WORD((byte) 0x04),
+    INT((byte) 0x05),
+    DWORD((byte) 0x06),
+    DINT((byte) 0x07),
+    REAL((byte) 0x08),
+    TOD((byte) 0x0A),
+    TIME((byte) 0x0B),
+    S5TIME((byte) 0x0C),
+    DATE_AND_TIME((byte) 0x0F),
+    COUNTER((byte) 0x1C),
+    TIMER((byte) 0x1D),
+    IEC_TIMER((byte) 0x1E),
+    IEC_COUNTER((byte) 0x1F),
+    HS_COUNTER((byte) 0x20);
+
+    private static Map<Byte, TransportSize> map = null;
+    
+    private final byte code;
+
+    TransportSize(byte code) {
+        this.code = code;
+    }
+
+    public byte getCode() {
+        return code;
+    }
+
+    public static TransportSize valueOf(byte code) {
+        if (map == null) {
+            map = new HashMap<>();
+            for (TransportSize transportSize : TransportSize.values()) {
+                map.put(transportSize.code, transportSize);
+            }
+        }
+        return map.get(code);
+    }
+
+}
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/VariableAddressingMode.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/VariableAddressingMode.java
new file mode 100644
index 0000000..a23ac8c
--- /dev/null
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/netty/model/types/VariableAddressingMode.java
@@ -0,0 +1,63 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.ads.netty.model.types;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * (Values determined by evaluating generated ".pcapng" files)
+ * Renamed from "SyntaxId".
+ */
+public enum VariableAddressingMode {
+    ADSANY((byte) 0x10),
+    PBC_R_ID((byte) 0x13),
+    ALARM_LOCKFREE((byte) 0x15),
+    ALARM_IND((byte) 0x16),
+    ALARM_ACK((byte) 0x19),
+    ALARM_QUERYREQ((byte) 0x1a),
+    NOTIFY_IND((byte) 0x1c),
+    NIC((byte) 0x82),
+    DRIVEESANY((byte) 0xa2),
+    DBREAD((byte) 0xb0),
+    SYM1200((byte) 0xb2); /* Renamed from "1200SYM" */
+
+    private static Map<Byte, VariableAddressingMode> map = null;
+    
+    private final byte code;
+
+    VariableAddressingMode(byte code) {
+        this.code = code;
+    }
+
+    public byte getCode() {
+        return code;
+    }
+
+    public static VariableAddressingMode valueOf(byte code) {
+        if (map == null) {
+            map = new HashMap<>();
+            for (VariableAddressingMode variableAddressingMode : VariableAddressingMode.values()) {
+                map.put(variableAddressingMode.code, variableAddressingMode);
+            }
+        }
+        return map.get(code);
+    }
+
+}

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