You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2019/05/08 20:32:17 UTC

[plc4x] branch feature/code-gen updated (8fffe60 -> e96d3da)

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

cdutz pushed a change to branch feature/code-gen
in repository https://gitbox.apache.org/repos/asf/plc4x.git.


    from 8fffe60  - Fixed some things broken after updating the branch.
     new 4e437ff  - Refactored the S7 spec to be used easier in the code-generators
     new e96d3da  - Refactored the schema definitions to be split up into simple types and complex types.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 protocols/knxnet-ip/pom.xml                        |   11 +-
 protocols/knxnet-ip/src/main/java/.keepMe          |   20 -
 .../plc4x/protocols/knxnetip/protocol.dfdl.xsd     |  275 ++--
 protocols/{proxy => plc4x}/pom.xml                 |    6 +-
 .../main/resources/daffodil-built-in-catalog.xml   |    6 +-
 .../org/apache/plc4x/protocols/protocol.dfdl.xsd   |  227 ++++
 protocols/pom.xml                                  |    3 +
 protocols/s7/pom.xml                               |    7 +
 protocols/s7/src/main/java/.keepMe                 |   20 -
 .../main/resources/daffodil-built-in-catalog.xml   |    5 +
 .../org/apache/plc4x/protocols/protocol.dfdl.xsd   |  227 ++++
 .../apache/plc4x/protocols/s7/protocol.dfdl.xsd    | 1386 ++++++++++----------
 .../apache/plc4x/protocols/s7/protocol.scxml.xml   |   86 +-
 .../org/apache/plc4x/protocols/s7/ManualTest.java  |    1 +
 .../org/apache/plc4x/protocols/s7/protocol.tdml    |  638 ++++-----
 15 files changed, 1651 insertions(+), 1267 deletions(-)
 delete mode 100644 protocols/knxnet-ip/src/main/java/.keepMe
 copy protocols/{proxy => plc4x}/pom.xml (86%)
 copy protocols/{knxnet-ip => plc4x}/src/main/resources/daffodil-built-in-catalog.xml (87%)
 create mode 100644 protocols/plc4x/src/main/resources/org/apache/plc4x/protocols/protocol.dfdl.xsd
 delete mode 100644 protocols/s7/src/main/java/.keepMe
 create mode 100644 protocols/s7/src/main/resources/org/apache/plc4x/protocols/protocol.dfdl.xsd


[plc4x] 01/02: - Refactored the S7 spec to be used easier in the code-generators

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch feature/code-gen
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit 4e437ff7cabfc29a3a45edc343e59cf6cc16577f
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed May 8 12:59:19 2019 +0200

    - Refactored the S7 spec to be used easier in the code-generators
---
 protocols/s7/src/main/java/.keepMe                 |   20 -
 .../apache/plc4x/protocols/s7/protocol.dfdl.xsd    | 1346 ++++++++++----------
 .../apache/plc4x/protocols/s7/protocol.scxml.xml   |   86 +-
 .../org/apache/plc4x/protocols/s7/ManualTest.java  |    1 +
 .../org/apache/plc4x/protocols/s7/protocol.tdml    |  592 ++++-----
 5 files changed, 1022 insertions(+), 1023 deletions(-)

diff --git a/protocols/s7/src/main/java/.keepMe b/protocols/s7/src/main/java/.keepMe
deleted file mode 100644
index 97c6314..0000000
--- a/protocols/s7/src/main/java/.keepMe
+++ /dev/null
@@ -1,20 +0,0 @@
-
-  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.
-
-This file is required to force the existence of the src/main/java directory
-which activates the "java-module" maven profile.
-
-PLEASE DO NOT DELETE ... it will break the build.
\ No newline at end of file
diff --git a/protocols/s7/src/main/resources/org/apache/plc4x/protocols/s7/protocol.dfdl.xsd b/protocols/s7/src/main/resources/org/apache/plc4x/protocols/s7/protocol.dfdl.xsd
index 1cb2922..5d46c8d 100644
--- a/protocols/s7/src/main/resources/org/apache/plc4x/protocols/s7/protocol.dfdl.xsd
+++ b/protocols/s7/src/main/resources/org/apache/plc4x/protocols/s7/protocol.dfdl.xsd
@@ -20,6 +20,7 @@
            xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/"
            xmlns:s7="http://plc4x.apache.org/s7"
            xmlns:fn="http://www.w3.org/2005/xpath-functions"
+           xmlns:plc4x="http://plc4x.apache.org/schemas/dfdl"
            targetNamespace="http://plc4x.apache.org/s7">
 
     <xs:annotation>
@@ -79,15 +80,24 @@
     <xs:complexType name="TpktMessageType">
         <xs:sequence>
             <!-- TPKT Magic Byte always 0x03 -->
-            <xs:element name="magicByte" type="s7:byte">
+            <xs:element name="magicByte" type="s7:byte" fixed="3">
                 <xs:annotation>
+                    <xs:appinfo source="http://plc4x.apache.org/dfdl">
+                        <plc4x:noProperty/>
+                    </xs:appinfo>
                     <xs:appinfo source="http://www.ogf.org/dfdl/">
                         <dfdl:assert message="Magic number was not 0x03."
                                      test="{. eq 3}"/>
                     </xs:appinfo>
                 </xs:annotation>
             </xs:element>
-            <xs:element name="reserved" type="s7:byte"/>
+            <xs:element name="reserved" type="s7:byte">
+                <xs:annotation>
+                    <xs:appinfo source="http://plc4x.apache.org/dfdl">
+                        <plc4x:noProperty/>
+                    </xs:appinfo>
+                </xs:annotation>
+            </xs:element>
             <xs:element name="length" type="s7:short"/>
             <xs:element name="userData" type="s7:CotpMessageType"/>
         </xs:sequence>
@@ -170,12 +180,16 @@
             <xs:element name="headerLength" type="s7:byte"/>
             <xs:element name="type" type="s7:CotpTpduType"/>
             <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
-                <xs:element dfdl:choiceBranchKey="224" ref="s7:CotpTpduConnectionRequest"/>
-                <xs:element dfdl:choiceBranchKey="208" ref="s7:CotpTpduConnectionResponse"/>
-                <xs:element dfdl:choiceBranchKey="128" ref="s7:CotpTpduDisconnectRequest"/>
-                <xs:element dfdl:choiceBranchKey="192" ref="s7:CotpTpduDisconnectResponse"/>
-                <xs:element dfdl:choiceBranchKey="112" ref="s7:CotpTpduError"/>
-                <xs:element dfdl:choiceBranchKey="240" ref="s7:CotpTpduData"/>
+                <xs:element dfdl:choiceBranchKey="224" name="cotpTpduConnectionRequest"
+                            type="s7:CotpTpduConnectionRequest"/>
+                <xs:element dfdl:choiceBranchKey="208" name="cotpTpduConnectionResponse"
+                            type="s7:CotpTpduConnectionResponse"/>
+                <xs:element dfdl:choiceBranchKey="128" name="cotpTpduDisconnectRequest"
+                            type="s7:CotpTpduDisconnectRequest"/>
+                <xs:element dfdl:choiceBranchKey="192" name="cotpTpduDisconnectResponse"
+                            type="s7:CotpTpduDisconnectResponse"/>
+                <xs:element dfdl:choiceBranchKey="112" name="cotpTpduError" type="s7:CotpTpduError"/>
+                <xs:element dfdl:choiceBranchKey="240" name="cotpTpduData" type="s7:CotpTpduData"/>
             </xs:choice>
             <xs:element name="userData" type="s7:S7MessageType" minOccurs="0"
                         dfdl:occursCountKind="expression"
@@ -183,149 +197,149 @@
         </xs:sequence>
     </xs:complexType>
 
-    <xs:element name="CotpTpduConnectionRequest">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="destinationReference" type="s7:short"/>
-                <xs:element name="sourceReference" type="s7:short"/>
-                <xs:element name="protocolClass" type="s7:byte"/>
-                <xs:element ref="s7:parameters" minOccurs="0"
-                            dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../../headerLength - 6}"
-                            dfdl:occursCountKind="expression"
-                            dfdl:occursCount="{if(../../headerLength gt 6) then 1 else 0}"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="CotpTpduConnectionResponse">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="destinationReference" type="s7:short"/>
-                <xs:element name="sourceReference" type="s7:short"/>
-                <xs:element name="protocolClass" type="s7:byte"/>
-                <xs:element ref="s7:parameters" minOccurs="0"
-                            dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../../headerLength - 6}"
-                            dfdl:occursCountKind="expression"
-                            dfdl:occursCount="{if(../../headerLength gt 6) then 1 else 0}"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="CotpTpduDisconnectRequest">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="destinationReference" type="s7:short"/>
-                <xs:element name="sourceReference" type="s7:short"/>
-                <xs:element name="disconnectReason" type="s7:byte"/>
-                <xs:element ref="s7:parameters" minOccurs="0"
-                            dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../../headerLength - 6}"
-                            dfdl:occursCountKind="expression"
-                            dfdl:occursCount="{if(../../headerLength gt 6) then 1 else 0}"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="CotpTpduDisconnectResponse">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="destinationReference" type="s7:short"/>
-                <xs:element name="sourceReference" type="s7:short"/>
-                <xs:element ref="s7:parameters" minOccurs="0"
-                            dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../../headerLength - 5}"
-                            dfdl:occursCountKind="expression"
-                            dfdl:occursCount="{if(../../headerLength gt 5) then 1 else 0}"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="CotpTpduError">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="destinationReference" type="s7:short"/>
-                <xs:element name="rejectCause" type="s7:byte"/>
-                <xs:element ref="s7:parameters" minOccurs="0"
-                            dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../../headerLength - 4}"
-                            dfdl:occursCountKind="expression"
-                            dfdl:occursCount="{if(../../headerLength gt 4) then 1 else 0}"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="CotpTpduData">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="endOfTransmission" type="xs:unsignedInt"
-                            dfdl:lengthKind="explicit" dfdl:lengthUnits="bits" dfdl:length="1"/>
-                <xs:element name="tpduRef" type="xs:unsignedInt"
-                            dfdl:lengthKind="explicit" dfdl:lengthUnits="bits" dfdl:length="7"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="parameters">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="parameter" maxOccurs="unbounded">
-                    <xs:complexType>
-                        <xs:sequence>
-                            <xs:element name="type" type="s7:CotpParameterType"/>
-                            <xs:element name="parameterLength" type="s7:byte"/>
-                            <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
-                                <xs:element dfdl:choiceBranchKey="192" ref="s7:CotpParameterTpduSize"/>
-                                <xs:element dfdl:choiceBranchKey="193" ref="s7:CotpParameterCallingTsap"/>
-                                <xs:element dfdl:choiceBranchKey="194" ref="s7:CotpParameterCalledTsap"/>
-                                <xs:element dfdl:choiceBranchKey="195" ref="s7:CotpParameterChecksum"/>
-                                <xs:element dfdl:choiceBranchKey="224"
-                                            ref="s7:CotpParameterDisconnectAdditionalInformation"/>
-                            </xs:choice>
-                        </xs:sequence>
-                    </xs:complexType>
-                </xs:element>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="CotpParameterTpduSize">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="tpduSize" type="s7:byte"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="CotpParameterCallingTsap">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="tsapId" type="s7:short"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="CotpParameterCalledTsap">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="tsapId" type="s7:short"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="CotpParameterChecksum">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="checksum" type="s7:byte"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="CotpParameterDisconnectAdditionalInformation">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="data" type="xs:hexBinary"
-                            dfdl:byteOrder="bigEndian" dfdl:lengthUnits="bytes" dfdl:lengthKind="explicit"
-                            dfdl:length="{../../parameterLength}"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
+    <xs:complexType name="CotpTpduConnectionRequest">
+        <xs:sequence>
+            <xs:element name="destinationReference" type="s7:short"/>
+            <xs:element name="sourceReference" type="s7:short"/>
+            <xs:element name="protocolClass" type="s7:byte"/>
+            <xs:element name="parameters" minOccurs="0"
+                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../../headerLength - 6}"
+                        dfdl:occursCountKind="expression"
+                        dfdl:occursCount="{if(../../headerLength gt 6) then 1 else 0}">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="parameter" type="s7:Parameter" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="CotpTpduConnectionResponse">
+        <xs:sequence>
+            <xs:element name="destinationReference" type="s7:short"/>
+            <xs:element name="sourceReference" type="s7:short"/>
+            <xs:element name="protocolClass" type="s7:byte"/>
+            <xs:element name="parameters" minOccurs="0"
+                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../../headerLength - 6}"
+                        dfdl:occursCountKind="expression"
+                        dfdl:occursCount="{if(../../headerLength gt 6) then 1 else 0}">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="parameter" type="s7:Parameter" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="CotpTpduDisconnectRequest">
+        <xs:sequence>
+            <xs:element name="destinationReference" type="s7:short"/>
+            <xs:element name="sourceReference" type="s7:short"/>
+            <xs:element name="disconnectReason" type="s7:byte"/>
+            <xs:element name="parameters" minOccurs="0"
+                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../../headerLength - 6}"
+                        dfdl:occursCountKind="expression"
+                        dfdl:occursCount="{if(../../headerLength gt 6) then 1 else 0}">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="parameter" type="s7:Parameter" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="CotpTpduDisconnectResponse">
+        <xs:sequence>
+            <xs:element name="destinationReference" type="s7:short"/>
+            <xs:element name="sourceReference" type="s7:short"/>
+            <xs:element name="parameters" minOccurs="0"
+                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../../headerLength - 5}"
+                        dfdl:occursCountKind="expression"
+                        dfdl:occursCount="{if(../../headerLength gt 5) then 1 else 0}">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="parameter" type="s7:Parameter" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="CotpTpduError">
+        <xs:sequence>
+            <xs:element name="destinationReference" type="s7:short"/>
+            <xs:element name="rejectCause" type="s7:byte"/>
+            <xs:element name="parameters" minOccurs="0"
+                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../../headerLength - 4}"
+                        dfdl:occursCountKind="expression"
+                        dfdl:occursCount="{if(../../headerLength gt 4) then 1 else 0}">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="parameter" type="s7:Parameter" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="CotpTpduData">
+        <xs:sequence>
+            <xs:element name="endOfTransmission" type="xs:unsignedInt"
+                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bits" dfdl:length="1"/>
+            <xs:element name="tpduRef" type="xs:unsignedInt"
+                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bits" dfdl:length="7"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="Parameter">
+        <xs:sequence>
+            <xs:element name="type" type="s7:CotpParameterType"/>
+            <xs:element name="parameterLength" type="s7:byte"/>
+            <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
+                <xs:element dfdl:choiceBranchKey="192" name="cotpParameterTpduSize" type="s7:CotpParameterTpduSize"/>
+                <xs:element dfdl:choiceBranchKey="193" name="cotpParameterCallingTsap" type="s7:CotpParameterCallingTsap"/>
+                <xs:element dfdl:choiceBranchKey="194" name="cotpParameterCalledTsap" type="s7:CotpParameterCalledTsap"/>
+                <xs:element dfdl:choiceBranchKey="195" name="cotpParameterChecksum" type="s7:CotpParameterChecksum"/>
+                <xs:element dfdl:choiceBranchKey="224" name="cotpParameterDisconnectAdditionalInformation"
+                            type="s7:CotpParameterDisconnectAdditionalInformation"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="CotpParameterTpduSize">
+        <xs:sequence>
+            <xs:element name="tpduSize" type="s7:byte"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="CotpParameterCallingTsap">
+        <xs:sequence>
+            <xs:element name="tsapId" type="s7:short"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="CotpParameterCalledTsap">
+        <xs:sequence>
+            <xs:element name="tsapId" type="s7:short"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="CotpParameterChecksum">
+        <xs:sequence>
+            <xs:element name="checksum" type="s7:byte"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="CotpParameterDisconnectAdditionalInformation">
+        <xs:sequence>
+            <xs:element name="data" type="xs:hexBinary"
+                        dfdl:byteOrder="bigEndian" dfdl:lengthUnits="bytes" dfdl:lengthKind="explicit"
+                        dfdl:length="{../../parameterLength}"/>
+        </xs:sequence>
+    </xs:complexType>
 
     <!--
 
@@ -352,227 +366,229 @@
                 we map to strings and use that as choice-key.
             -->
             <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
-                <xs:element dfdl:choiceBranchKey="1" ref="s7:S7RequestMessage"/>
-                <xs:element dfdl:choiceBranchKey="3" ref="s7:S7ResponseMessage"/>
-                <xs:element dfdl:choiceBranchKey="7" ref="s7:S7UserDataMessage"/>
+                <xs:element dfdl:choiceBranchKey="1" name="s7RequestMessage" type="s7:S7RequestMessage"/>
+                <xs:element dfdl:choiceBranchKey="3" name="s7ResponseMessage" type="s7:S7ResponseMessage"/>
+                <xs:element dfdl:choiceBranchKey="7" name="s7UserDataMessage" type="s7:S7UserDataMessage"/>
             </xs:choice>
         </xs:sequence>
     </xs:complexType>
 
-    <xs:element name="S7RequestMessage">
-        <xs:complexType>
-            <xs:sequence>
-                <!-- Reserved value always 0x0000 -->
-                <xs:element name="reserved" type="s7:short" fixed="0"/>
-                <xs:element name="tpduReference" type="s7:short"/>
-                <xs:element name="parametersLength" type="s7:short"/>
-                <xs:element name="payloadsLength" type="s7:short"/>
-                <xs:element name="parameters" minOccurs="0"
-                            dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../parametersLength}"
-                            dfdl:occursCountKind="expression"
-                            dfdl:occursCount="{if(../parametersLength gt 0) then 1 else 0}">
-                    <xs:complexType>
-                        <xs:sequence>
-                            <xs:element name="parameter" maxOccurs="unbounded">
-                                <xs:complexType>
-                                    <xs:sequence>
-                                        <xs:element name="type" type="s7:byte"/>
-                                        <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
-                                            <xs:element dfdl:choiceBranchKey="240"
-                                                        ref="s7:S7GeneralParameterSetupCommunication"/>
-                                            <xs:element dfdl:choiceBranchKey="4" ref="s7:S7RequestParameterReadVar"/>
-                                            <xs:element dfdl:choiceBranchKey="5" ref="s7:S7RequestParameterWriteVar"/>
-                                        </xs:choice>
-                                    </xs:sequence>
-                                </xs:complexType>
-                            </xs:element>
-                        </xs:sequence>
-                    </xs:complexType>
-                </xs:element>
-                <!--
-                   As we might be outputting an empty payload block for a parameter that might not have a payload,
-                   we have to output this element if the parameters are not empty. The case that the payloads are
-                   not empty but the parameters are can't happen during normal operation.
-               -->
-                <xs:element name="payloads" minOccurs="0"
-                            dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../payloadsLength}"
-                            dfdl:occursCountKind="expression"
-                            dfdl:occursCount="{if(../parametersLength gt 0) then 1 else 0}">
-                    <xs:complexType>
-                        <xs:sequence>
-                            <!--
-                                For every parameter we'll be outputting a payload block, even if this might be empty.
-                                This is required in order to find the matching parameter for every payload we might
-                                be having. We need to match these as otherwise we couldn't determine the type of a
-                                payload as this has no type information and we need to be able to access the number
-                                of items for a read/write request in order to process the correct number of items in
-                                the payload.
-                            -->
-                            <xs:element name="payload" maxOccurs="unbounded"
-                                        dfdl:occursCountKind="expression"
-                                        dfdl:occursCount="{fn:count(../../parameters[1]/parameter)}">
-                                <xs:complexType>
-                                    <xs:sequence>
-                                        <xs:choice
-                                            dfdl:choiceDispatchKey="{xs:string(../../parameters[1]/parameter[dfdl:occursIndex()]/type)}">
-                                            <xs:element dfdl:choiceBranchKey="240"
-                                                        ref="s7:S7GeneralPayloadSetupCommunication"/>
-                                            <xs:element dfdl:choiceBranchKey="4" ref="s7:S7RequestPayloadReadVar"/>
-                                            <xs:element dfdl:choiceBranchKey="5" ref="s7:S7RequestPayloadWriteVar"/>
-                                        </xs:choice>
-                                    </xs:sequence>
-                                </xs:complexType>
-                            </xs:element>
-                        </xs:sequence>
-                    </xs:complexType>
-                </xs:element>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="S7ResponseMessage">
-        <xs:complexType>
-            <xs:sequence>
-                <!-- Reserved value always 0x0000 -->
-                <xs:element name="reserved" type="s7:short" fixed="0"/>
-                <xs:element name="tpduReference" type="s7:short"/>
-                <xs:element name="parametersLength" type="s7:short"/>
-                <xs:element name="payloadsLength" type="s7:short"/>
-                <!-- UserData (type 7) responses don't have the error class and code -->
-                <xs:element name="errorClass" type="s7:byte" minOccurs="0"
-                            dfdl:occursCountKind="expression" dfdl:occursCount="{if(../../type eq 3) then 1 else 0}"/>
-                <xs:element name="errorCode" type="s7:byte" minOccurs="0"
-                            dfdl:occursCountKind="expression" dfdl:occursCount="{if(../../type eq 3) then 1 else 0}"/>
-                <xs:element name="parameters" minOccurs="0"
-                            dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../parametersLength}"
-                            dfdl:occursCountKind="expression"
-                            dfdl:occursCount="{if(../parametersLength gt 0) then 1 else 0}">
-                    <xs:complexType>
-                        <xs:sequence>
-                            <xs:element name="parameter" maxOccurs="unbounded">
-                                <xs:complexType>
-                                    <xs:sequence>
-                                        <xs:element name="type" type="s7:byte"/>
-                                        <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
-                                            <xs:element dfdl:choiceBranchKey="240"
-                                                        ref="s7:S7GeneralParameterSetupCommunication"/>
-                                            <xs:element dfdl:choiceBranchKey="4" ref="s7:S7ResponseParameterReadVar"/>
-                                            <xs:element dfdl:choiceBranchKey="5" ref="s7:S7ResponseParameterWriteVar"/>
-                                        </xs:choice>
-                                    </xs:sequence>
-                                </xs:complexType>
-                            </xs:element>
-                        </xs:sequence>
-                    </xs:complexType>
-                </xs:element>
-                <!--
-                    As we might be outputting an empty payload block for a parameter that might not have a payload,
-                    we have to output this element if the parameters are not empty. The case that the payloads are
-                    not empty but the parameters are can't happen during normal operation.
-                -->
-                <xs:element name="payloads" minOccurs="0"
-                            dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../payloadsLength}"
-                            dfdl:occursCountKind="expression"
-                            dfdl:occursCount="{if(../parametersLength gt 0) then 1 else 0}">
-                    <xs:complexType>
-                        <xs:sequence>
-                            <!--
-                                For every parameter we'll be outputting a payload block, even if this might be empty.
-                                This is required in order to find the matching parameter for every payload we might
-                                be having. We need to match these as otherwise we couldn't determin the type of a
-                                payload as this has no type information and we need to be able to access the number
-                                of items for a read/write request in order to process the correct number of items in
-                                the payload.
-                            -->
-                            <xs:element name="payload" maxOccurs="unbounded"
-                                        dfdl:occursCountKind="expression"
-                                        dfdl:occursCount="{fn:count(../../parameters[1]/parameter)}">
-                                <xs:complexType>
-                                    <xs:sequence>
-                                        <xs:choice
-                                            dfdl:choiceDispatchKey="{xs:string(../../parameters[1]/parameter[dfdl:occursIndex()]/type)}">
-                                            <xs:element dfdl:choiceBranchKey="240"
-                                                        ref="s7:S7GeneralPayloadSetupCommunication"/>
-                                            <xs:element dfdl:choiceBranchKey="4" ref="s7:S7ResponsePayloadReadVar"/>
-                                            <xs:element dfdl:choiceBranchKey="5" ref="s7:S7ResponsePayloadWriteVar"/>
-                                        </xs:choice>
-                                    </xs:sequence>
-                                </xs:complexType>
-                            </xs:element>
-                        </xs:sequence>
-                    </xs:complexType>
-                </xs:element>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-
-    <xs:element name="S7UserDataMessage">
-        <xs:complexType>
-            <xs:sequence>
-                <!-- Reserved value always 0x0000 -->
-                <xs:element name="reserved" type="s7:short" fixed="0"/>
-                <xs:element name="tpduReference" type="s7:short"/>
-                <xs:element name="parametersLength" type="s7:short"/>
-                <xs:element name="payloadsLength" type="s7:short"/>
-                <xs:element name="parameters" minOccurs="0"
-                            dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../parametersLength}"
-                            dfdl:occursCountKind="expression"
-                            dfdl:occursCount="{if(../parametersLength gt 0) then 1 else 0}">
-                    <xs:complexType>
-                        <xs:sequence>
-                            <xs:element name="parameter" maxOccurs="unbounded">
-                                <xs:complexType>
-                                    <xs:sequence>
-                                        <xs:element name="type" type="s7:byte"/>
-                                        <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
-                                            <xs:element dfdl:choiceBranchKey="0"
-                                                        ref="s7:S7UserDataParameterCPUService"/>
-                                        </xs:choice>
-                                    </xs:sequence>
-                                </xs:complexType>
-                            </xs:element>
-                        </xs:sequence>
-                    </xs:complexType>
-                </xs:element>
-                <!--
-                   As we might be outputting an empty payload block for a parameter that might not have a payload,
-                   we have to output this element if the parameters are not empty. The case that the payloads are
-                   not empty but the parameters are can't happen during normal operation.
-               -->
-                <xs:element name="payloads" minOccurs="0"
-                            dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../payloadsLength}"
-                            dfdl:occursCountKind="expression"
-                            dfdl:occursCount="{if(../parametersLength gt 0) then 1 else 0}">
-                    <xs:complexType>
-                        <xs:sequence>
-                            <!--
-                                For every parameter we'll be outputting a payload block, even if this might be empty.
-                                This is required in order to find the matching parameter for every payload we might
-                                be having. We need to match these as otherwise we couldn't determine the type of a
-                                payload as this has no type information and we need to be able to access the number
-                                of items for a read/write request in order to process the correct number of items in
-                                the payload.
-                            -->
-                            <xs:element name="payload" maxOccurs="unbounded"
-                                        dfdl:occursCountKind="expression"
-                                        dfdl:occursCount="{fn:count(../../parameters[1]/parameter)}">
-                                <xs:complexType>
-                                    <xs:sequence>
-                                        <xs:choice
-                                            dfdl:choiceDispatchKey="{xs:string(../../parameters[1]/parameter[dfdl:occursIndex()]/type)}">
-                                            <xs:element dfdl:choiceBranchKey="0"
-                                                        ref="s7:S7UserDataPayloadCpuServices"/>
-                                        </xs:choice>
-                                    </xs:sequence>
-                                </xs:complexType>
-                            </xs:element>
-                        </xs:sequence>
-                    </xs:complexType>
-                </xs:element>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
+    <xs:complexType name="S7RequestMessage">
+        <xs:sequence>
+            <!-- Reserved value always 0x0000 -->
+            <xs:element name="reserved" type="s7:short" fixed="0"/>
+            <xs:element name="tpduReference" type="s7:short"/>
+            <xs:element name="parametersLength" type="s7:short"/>
+            <xs:element name="payloadsLength" type="s7:short"/>
+            <xs:element name="parameters" minOccurs="0"
+                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../parametersLength}"
+                        dfdl:occursCountKind="expression"
+                        dfdl:occursCount="{if(../parametersLength gt 0) then 1 else 0}">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="parameter" maxOccurs="unbounded">
+                            <xs:complexType>
+                                <xs:sequence>
+                                    <xs:element name="type" type="s7:byte"/>
+                                    <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
+                                        <xs:element dfdl:choiceBranchKey="240" name="s7GeneralParameterSetupCommunication"
+                                                    type="s7:S7GeneralParameterSetupCommunication"/>
+                                        <xs:element dfdl:choiceBranchKey="4" name="s7RequestParameterReadVar"
+                                                    type="s7:S7RequestParameterReadVar"/>
+                                        <xs:element dfdl:choiceBranchKey="5" name="s7RequestParameterWriteVar"
+                                                    type="s7:S7RequestParameterWriteVar"/>
+                                    </xs:choice>
+                                </xs:sequence>
+                            </xs:complexType>
+                        </xs:element>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <!--
+               As we might be outputting an empty payload block for a parameter that might not have a payload,
+               we have to output this element if the parameters are not empty. The case that the payloads are
+               not empty but the parameters are can't happen during normal operation.
+           -->
+            <xs:element name="payloads" minOccurs="0"
+                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../payloadsLength}"
+                        dfdl:occursCountKind="expression"
+                        dfdl:occursCount="{if(../parametersLength gt 0) then 1 else 0}">
+                <xs:complexType>
+                    <xs:sequence>
+                        <!--
+                            For every parameter we'll be outputting a payload block, even if this might be empty.
+                            This is required in order to find the matching parameter for every payload we might
+                            be having. We need to match these as otherwise we couldn't determine the type of a
+                            payload as this has no type information and we need to be able to access the number
+                            of items for a read/write request in order to process the correct number of items in
+                            the payload.
+                        -->
+                        <xs:element name="payload" maxOccurs="unbounded"
+                                    dfdl:occursCountKind="expression"
+                                    dfdl:occursCount="{fn:count(../../parameters[1]/parameter)}">
+                            <xs:complexType>
+                                <xs:sequence>
+                                    <xs:choice
+                                        dfdl:choiceDispatchKey="{xs:string(../../parameters[1]/parameter[dfdl:occursIndex()]/type)}">
+                                        <xs:element dfdl:choiceBranchKey="240" name="s7GeneralPayloadSetupCommunication"
+                                                    type="s7:S7GeneralPayloadSetupCommunication"/>
+                                        <xs:element dfdl:choiceBranchKey="4" name="s7RequestPayloadReadVar"
+                                                    type="s7:S7RequestPayloadReadVar"/>
+                                        <xs:element dfdl:choiceBranchKey="5" name="s7RequestPayloadWriteVar"
+                                                    type="s7:S7RequestPayloadWriteVar"/>
+                                    </xs:choice>
+                                </xs:sequence>
+                            </xs:complexType>
+                        </xs:element>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="S7ResponseMessage">
+        <xs:sequence>
+            <!-- Reserved value always 0x0000 -->
+            <xs:element name="reserved" type="s7:short" fixed="0"/>
+            <xs:element name="tpduReference" type="s7:short"/>
+            <xs:element name="parametersLength" type="s7:short"/>
+            <xs:element name="payloadsLength" type="s7:short"/>
+            <!-- UserData (type 7) responses don't have the error class and code -->
+            <xs:element name="errorClass" type="s7:byte" minOccurs="0"
+                        dfdl:occursCountKind="expression" dfdl:occursCount="{if(../../type eq 3) then 1 else 0}"/>
+            <xs:element name="errorCode" type="s7:byte" minOccurs="0"
+                        dfdl:occursCountKind="expression" dfdl:occursCount="{if(../../type eq 3) then 1 else 0}"/>
+            <xs:element name="parameters" minOccurs="0"
+                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../parametersLength}"
+                        dfdl:occursCountKind="expression"
+                        dfdl:occursCount="{if(../parametersLength gt 0) then 1 else 0}">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="parameter" maxOccurs="unbounded">
+                            <xs:complexType>
+                                <xs:sequence>
+                                    <xs:element name="type" type="s7:byte"/>
+                                    <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
+                                        <xs:element dfdl:choiceBranchKey="240" name="s7GeneralParameterSetupCommunication"
+                                                    type="s7:S7GeneralParameterSetupCommunication"/>
+                                        <xs:element dfdl:choiceBranchKey="4" name="s7ResponseParameterReadVar"
+                                                    type="s7:S7ResponseParameterReadVar"/>
+                                        <xs:element dfdl:choiceBranchKey="5" name="s7ResponseParameterWriteVar"
+                                                    type="s7:S7ResponseParameterWriteVar"/>
+                                    </xs:choice>
+                                </xs:sequence>
+                            </xs:complexType>
+                        </xs:element>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <!--
+                As we might be outputting an empty payload block for a parameter that might not have a payload,
+                we have to output this element if the parameters are not empty. The case that the payloads are
+                not empty but the parameters are can't happen during normal operation.
+            -->
+            <xs:element name="payloads" minOccurs="0"
+                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../payloadsLength}"
+                        dfdl:occursCountKind="expression"
+                        dfdl:occursCount="{if(../parametersLength gt 0) then 1 else 0}">
+                <xs:complexType>
+                    <xs:sequence>
+                        <!--
+                            For every parameter we'll be outputting a payload block, even if this might be empty.
+                            This is required in order to find the matching parameter for every payload we might
+                            be having. We need to match these as otherwise we couldn't determin the type of a
+                            payload as this has no type information and we need to be able to access the number
+                            of items for a read/write request in order to process the correct number of items in
+                            the payload.
+                        -->
+                        <xs:element name="payload" maxOccurs="unbounded"
+                                    dfdl:occursCountKind="expression"
+                                    dfdl:occursCount="{fn:count(../../parameters[1]/parameter)}">
+                            <xs:complexType>
+                                <xs:sequence>
+                                    <xs:choice
+                                        dfdl:choiceDispatchKey="{xs:string(../../parameters[1]/parameter[dfdl:occursIndex()]/type)}">
+                                        <xs:element dfdl:choiceBranchKey="240" name="s7GeneralPayloadSetupCommunication"
+                                                    type="s7:S7GeneralPayloadSetupCommunication"/>
+                                        <xs:element dfdl:choiceBranchKey="4" name="s7ResponsePayloadReadVar"
+                                                    type="s7:S7ResponsePayloadReadVar"/>
+                                        <xs:element dfdl:choiceBranchKey="5" name="s7ResponsePayloadWriteVar"
+                                                    type="s7:S7ResponsePayloadWriteVar"/>
+                                    </xs:choice>
+                                </xs:sequence>
+                            </xs:complexType>
+                        </xs:element>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+
+    <xs:complexType name="S7UserDataMessage">
+        <xs:sequence>
+            <!-- Reserved value always 0x0000 -->
+            <xs:element name="reserved" type="s7:short" fixed="0"/>
+            <xs:element name="tpduReference" type="s7:short"/>
+            <xs:element name="parametersLength" type="s7:short"/>
+            <xs:element name="payloadsLength" type="s7:short"/>
+            <xs:element name="parameters" minOccurs="0"
+                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../parametersLength}"
+                        dfdl:occursCountKind="expression"
+                        dfdl:occursCount="{if(../parametersLength gt 0) then 1 else 0}">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="parameter" maxOccurs="unbounded">
+                            <xs:complexType>
+                                <xs:sequence>
+                                    <xs:element name="type" type="s7:byte"/>
+                                    <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
+                                        <xs:element dfdl:choiceBranchKey="0" name="s7UserDataParameterCPUService"
+                                                    type="s7:S7UserDataParameterCPUService"/>
+                                    </xs:choice>
+                                </xs:sequence>
+                            </xs:complexType>
+                        </xs:element>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <!--
+               As we might be outputting an empty payload block for a parameter that might not have a payload,
+               we have to output this element if the parameters are not empty. The case that the payloads are
+               not empty but the parameters are can't happen during normal operation.
+           -->
+            <xs:element name="payloads" minOccurs="0"
+                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../payloadsLength}"
+                        dfdl:occursCountKind="expression"
+                        dfdl:occursCount="{if(../parametersLength gt 0) then 1 else 0}">
+                <xs:complexType>
+                    <xs:sequence>
+                        <!--
+                            For every parameter we'll be outputting a payload block, even if this might be empty.
+                            This is required in order to find the matching parameter for every payload we might
+                            be having. We need to match these as otherwise we couldn't determine the type of a
+                            payload as this has no type information and we need to be able to access the number
+                            of items for a read/write request in order to process the correct number of items in
+                            the payload.
+                        -->
+                        <xs:element name="payload" maxOccurs="unbounded"
+                                    dfdl:occursCountKind="expression"
+                                    dfdl:occursCount="{fn:count(../../parameters[1]/parameter)}">
+                            <xs:complexType>
+                                <xs:sequence>
+                                    <xs:choice
+                                        dfdl:choiceDispatchKey="{xs:string(../../parameters[1]/parameter[dfdl:occursIndex()]/type)}">
+                                        <xs:element dfdl:choiceBranchKey="0" name="s7UserDataPayloadCpuServices"
+                                                    type="s7:S7UserDataPayloadCpuServices"/>
+                                    </xs:choice>
+                                </xs:sequence>
+                            </xs:complexType>
+                        </xs:element>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
 
     <!--
 
@@ -580,162 +596,146 @@
 
     -->
 
-    <xs:element name="S7GeneralParameterSetupCommunication">
-        <xs:complexType>
-            <xs:sequence>
-                <!-- Reserved value always 0x00 -->
-                <xs:element name="reserved" type="s7:byte" fixed="0"/>
-                <xs:element name="maxAmqCaller" type="s7:short"/>
-                <xs:element name="maxAmqCallee" type="s7:short"/>
-                <xs:element name="pduLength" type="s7:short"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="S7UserDataParameterCPUService">
-        <xs:complexType>
-            <xs:sequence>
-                <!-- Fixed header 0x0112 274 -> -->
-                <xs:element name="header" type="s7:short"/><!-- fixed="274"-->
-                <xs:element name="paramLength" type="s7:byte"/><!-- fixed="4"-->
-                <!-- Request: 0x11 -> 17 -->
-                <xs:element name="typeCode" type="s7:byte"/><!-- fixed="17"-->
-                <xs:element name="type" type="xs:unsignedByte" dfdl:lengthKind="explicit" dfdl:lengthUnits="bits"
-                            dfdl:length="4"/>
-                <!-- First 4 bits: Request 0x40, last 4 bits: Function Group 0x04 = 0x44 -> 68 -->
-                <xs:element name="functionGroup" type="xs:unsignedByte" dfdl:lengthKind="explicit"
-                            dfdl:lengthUnits="bits" dfdl:length="4"/><!-- fixed="68"-->
-                <!-- READ SSL = 0x01 -->
-                <xs:element name="subFunctionGroup" type="s7:byte"/><!-- fixed="1"-->
-                <xs:element name="sequenceNumber" type="s7:byte"/>
-                <xs:element name="dataUnitReferenceNumber" type="s7:byte" minOccurs="0"
-                            dfdl:occursCountKind="expression"
-                            dfdl:occursCount="{if(../sequenceNumber eq 2) then 1 else 0}"/>
-                <xs:element name="lastDataUnit" type="s7:byte" minOccurs="0"
-                            dfdl:occursCountKind="expression"
-                            dfdl:occursCount="{if(../sequenceNumber eq 2) then 1 else 0}"/>
-                <xs:element name="errorCode" type="s7:short" minOccurs="0"
-                            dfdl:occursCountKind="expression"
-                            dfdl:occursCount="{if(../sequenceNumber eq 2) then 1 else 0}"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="S7RequestParameterReadVar">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="numItems" type="s7:byte"/>
-                <xs:element name="items" minOccurs="0"
-                            dfdl:occursCountKind="expression" dfdl:occursCount="{if(../numItems gt 0) then 1 else 0}">
-                    <xs:complexType>
-                        <xs:sequence>
-                            <xs:element name="item" minOccurs="0" maxOccurs="unbounded"
-                                        dfdl:occursCountKind="expression" dfdl:occursCount="{../../numItems}">
-                                <xs:complexType>
-                                    <xs:sequence>
-                                        <xs:element name="type" type="s7:byte"/>
-                                        <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
-                                            <xs:element dfdl:choiceBranchKey="18"
-                                                        ref="s7:S7RequestParameterReadVarAnyItem"/>
-                                        </xs:choice>
-                                    </xs:sequence>
-                                </xs:complexType>
-                            </xs:element>
-                        </xs:sequence>
-                    </xs:complexType>
-                </xs:element>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="S7RequestParameterReadVarAnyItem">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="paramLength" type="s7:byte"/><!-- fixed="10"-->
-                <!-- Addressing Mode: Any 0x10 -> 16 -->
-                <xs:element name="addressingMode" type="s7:byte"/><!-- fixed="16"-->
-                <xs:element name="dataType" type="s7:byte"/>
-                <xs:element name="numElements" type="s7:short"/>
-                <xs:element name="dataBlockNumber" type="s7:short"/>
-                <xs:element name="memoryArea" type="s7:byte"/>
-                <!--
-                 The next 3 bytes (24 bits) contain the byte- and bit-offset,
-                 were the last byte contains the bit-offset in the last 3 bits
-                 and the byteOffset is encoded in the higher level 21 bits
-                -->
-                <xs:element name="byteOffset" type="xs:unsignedInt"
-                            dfdl:lengthKind="explicit" dfdl:lengthUnits="bits" dfdl:length="21"/>
-                <xs:element name="bitOffset" type="xs:unsignedInt"
-                            dfdl:lengthKind="explicit" dfdl:lengthUnits="bits" dfdl:length="3"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="S7ResponseParameterReadVar">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="numItems" type="s7:byte"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="S7RequestParameterWriteVar">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="numItems" type="s7:byte"/>
-                <xs:element name="items" minOccurs="0"
-                            dfdl:occursCountKind="expression" dfdl:occursCount="{if(../numItems gt 0) then 1 else 0}">
-                    <xs:complexType>
-                        <xs:sequence>
-                            <xs:element name="item" minOccurs="0" maxOccurs="unbounded"
-                                        dfdl:occursCountKind="expression" dfdl:occursCount="{../../numItems}">
-                                <xs:complexType>
-                                    <xs:sequence>
-                                        <xs:element name="type" type="s7:byte"/>
-                                        <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
-                                            <xs:element dfdl:choiceBranchKey="18"
-                                                        ref="s7:S7RequestParameterWriteVarAnyItem"/>
-                                        </xs:choice>
-                                    </xs:sequence>
-                                </xs:complexType>
-                            </xs:element>
-                        </xs:sequence>
-                    </xs:complexType>
-                </xs:element>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="S7RequestParameterWriteVarAnyItem">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="itemLength" type="s7:byte"/><!-- fixed="10"-->
-                <!-- Addressing Mode: Any 0x10 -> 16 -->
-                <xs:element name="addressingMode" type="s7:byte"/><!-- fixed="16"-->
-                <xs:element name="dataType" type="s7:byte"/>
-                <xs:element name="numElements" type="s7:short"/>
-                <xs:element name="dataBlockNumber" type="s7:short"/>
-                <xs:element name="memoryArea" type="s7:byte"/>
-                <!--
-                 The next 3 bytes (24 bits) contain the byte- and bit-offset,
-                 were the last byte contains the bit-offset in the last 3 bits
-                 and the byteOffset is encoded in the higher level 21 bits
-                -->
-                <xs:element name="byteOffset" type="xs:unsignedInt"
-                            dfdl:lengthKind="explicit" dfdl:lengthUnits="bits" dfdl:length="21"/>
-                <xs:element name="bitOffset" type="xs:unsignedInt"
-                            dfdl:lengthKind="explicit" dfdl:lengthUnits="bits" dfdl:length="3"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="S7ResponseParameterWriteVar">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="numItems" type="s7:byte"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
+    <xs:complexType name="S7GeneralParameterSetupCommunication">
+        <xs:sequence>
+            <!-- Reserved value always 0x00 -->
+            <xs:element name="reserved" type="s7:byte" fixed="0"/>
+            <xs:element name="maxAmqCaller" type="s7:short"/>
+            <xs:element name="maxAmqCallee" type="s7:short"/>
+            <xs:element name="pduLength" type="s7:short"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="S7UserDataParameterCPUService">
+        <xs:sequence>
+            <!-- Fixed header 0x0112 274 -> -->
+            <xs:element name="header" type="s7:short"/><!-- fixed="274"-->
+            <xs:element name="paramLength" type="s7:byte"/><!-- fixed="4"-->
+            <!-- Request: 0x11 -> 17 -->
+            <xs:element name="typeCode" type="s7:byte"/><!-- fixed="17"-->
+            <xs:element name="type" type="xs:unsignedByte" dfdl:lengthKind="explicit" dfdl:lengthUnits="bits"
+                        dfdl:length="4"/>
+            <!-- First 4 bits: Request 0x40, last 4 bits: Function Group 0x04 = 0x44 -> 68 -->
+            <xs:element name="functionGroup" type="xs:unsignedByte" dfdl:lengthKind="explicit"
+                        dfdl:lengthUnits="bits" dfdl:length="4"/><!-- fixed="68"-->
+            <!-- READ SSL = 0x01 -->
+            <xs:element name="subFunctionGroup" type="s7:byte"/><!-- fixed="1"-->
+            <xs:element name="sequenceNumber" type="s7:byte"/>
+            <xs:element name="dataUnitReferenceNumber" type="s7:byte" minOccurs="0"
+                        dfdl:occursCountKind="expression"
+                        dfdl:occursCount="{if(../sequenceNumber eq 2) then 1 else 0}"/>
+            <xs:element name="lastDataUnit" type="s7:byte" minOccurs="0"
+                        dfdl:occursCountKind="expression"
+                        dfdl:occursCount="{if(../sequenceNumber eq 2) then 1 else 0}"/>
+            <xs:element name="errorCode" type="s7:short" minOccurs="0"
+                        dfdl:occursCountKind="expression"
+                        dfdl:occursCount="{if(../sequenceNumber eq 2) then 1 else 0}"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="S7RequestParameterReadVar">
+        <xs:sequence>
+            <xs:element name="numItems" type="s7:byte"/>
+            <xs:element name="items" minOccurs="0"
+                        dfdl:occursCountKind="expression" dfdl:occursCount="{if(../numItems gt 0) then 1 else 0}">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="item" minOccurs="0" maxOccurs="unbounded"
+                                    dfdl:occursCountKind="expression" dfdl:occursCount="{../../numItems}">
+                            <xs:complexType>
+                                <xs:sequence>
+                                    <xs:element name="type" type="s7:byte"/>
+                                    <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
+                                        <xs:element dfdl:choiceBranchKey="18" name="s7RequestParameterReadVarAnyItem"
+                                                    type="s7:S7RequestParameterReadVarAnyItem"/>
+                                    </xs:choice>
+                                </xs:sequence>
+                            </xs:complexType>
+                        </xs:element>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="S7RequestParameterReadVarAnyItem">
+        <xs:sequence>
+            <xs:element name="paramLength" type="s7:byte"/><!-- fixed="10"-->
+            <!-- Addressing Mode: Any 0x10 -> 16 -->
+            <xs:element name="addressingMode" type="s7:byte"/><!-- fixed="16"-->
+            <xs:element name="dataType" type="s7:byte"/>
+            <xs:element name="numElements" type="s7:short"/>
+            <xs:element name="dataBlockNumber" type="s7:short"/>
+            <xs:element name="memoryArea" type="s7:byte"/>
+            <!--
+             The next 3 bytes (24 bits) contain the byte- and bit-offset,
+             were the last byte contains the bit-offset in the last 3 bits
+             and the byteOffset is encoded in the higher level 21 bits
+            -->
+            <xs:element name="byteOffset" type="xs:unsignedInt"
+                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bits" dfdl:length="21"/>
+            <xs:element name="bitOffset" type="xs:unsignedInt"
+                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bits" dfdl:length="3"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="S7ResponseParameterReadVar">
+        <xs:sequence>
+            <xs:element name="numItems" type="s7:byte"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="S7RequestParameterWriteVar">
+        <xs:sequence>
+            <xs:element name="numItems" type="s7:byte"/>
+            <xs:element name="items" minOccurs="0"
+                        dfdl:occursCountKind="expression" dfdl:occursCount="{if(../numItems gt 0) then 1 else 0}">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="item" minOccurs="0" maxOccurs="unbounded"
+                                    dfdl:occursCountKind="expression" dfdl:occursCount="{../../numItems}">
+                            <xs:complexType>
+                                <xs:sequence>
+                                    <xs:element name="type" type="s7:byte"/>
+                                    <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
+                                        <xs:element dfdl:choiceBranchKey="18" name="s7RequestParameterWriteVarAnyItem"
+                                                    type="s7:S7RequestParameterWriteVarAnyItem"/>
+                                    </xs:choice>
+                                </xs:sequence>
+                            </xs:complexType>
+                        </xs:element>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="S7RequestParameterWriteVarAnyItem">
+        <xs:sequence>
+            <xs:element name="itemLength" type="s7:byte"/><!-- fixed="10"-->
+            <!-- Addressing Mode: Any 0x10 -> 16 -->
+            <xs:element name="addressingMode" type="s7:byte"/><!-- fixed="16"-->
+            <xs:element name="dataType" type="s7:byte"/>
+            <xs:element name="numElements" type="s7:short"/>
+            <xs:element name="dataBlockNumber" type="s7:short"/>
+            <xs:element name="memoryArea" type="s7:byte"/>
+            <!--
+             The next 3 bytes (24 bits) contain the byte- and bit-offset,
+             were the last byte contains the bit-offset in the last 3 bits
+             and the byteOffset is encoded in the higher level 21 bits
+            -->
+            <xs:element name="byteOffset" type="xs:unsignedInt"
+                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bits" dfdl:length="21"/>
+            <xs:element name="bitOffset" type="xs:unsignedInt"
+                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bits" dfdl:length="3"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="S7ResponseParameterWriteVar">
+        <xs:sequence>
+            <xs:element name="numItems" type="s7:byte"/>
+        </xs:sequence>
+    </xs:complexType>
 
     <!--
 
@@ -743,167 +743,167 @@
 
     -->
 
-    <xs:element name="S7GeneralPayloadSetupCommunication"
-                type="xs:hexBinary" dfdl:lengthKind="explicit" dfdl:length="0"/>
-
-    <xs:element name="S7UserDataPayloadCpuServices">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="returnCode" type="s7:byte"/>
-                <xs:element name="transportSize" type="s7:byte"/><!-- fixed="9"-->
-                <xs:element name="length" type="s7:short"/>
-                <xs:element name="sslId" type="s7:short" minOccurs="0"
-                            dfdl:occursCountKind="expression"
-                            dfdl:occursCount="{if(../returnCode eq 255) then 1 else 0}"/>
-                <xs:element name="sslIndex" type="s7:short" minOccurs="0"
-                            dfdl:occursCountKind="expression"
-                            dfdl:occursCount="{if(../returnCode eq 255) then 1 else 0}"/>
-                <xs:element name="partialList" minOccurs="0"
-                            dfdl:occursCountKind="expression" dfdl:occursCount="{if((../returnCode eq 255) and (../length gt 4)) then 1 else 0}">
-                    <xs:complexType>
-                        <xs:sequence>
-                            <xs:element name="partialListLengthInBytes" type="s7:short"/>
-                            <xs:element name="partialListCount" type="s7:short"/>
-                            <xs:element name="sslDataRecords">
-                                <xs:complexType>
-                                    <xs:sequence>
-                                        <xs:element name="sslDataRecord" maxOccurs="unbounded"
-                                                    dfdl:occursCountKind="expression" dfdl:occursCount="{../../partialListCount}">
-                                            <xs:complexType>
-                                                <xs:sequence>
-                                                    <xs:choice dfdl:choiceDispatchKey="{xs:string(../../../sslId[1])}">
-                                                        <xs:element dfdl:choiceBranchKey="17"
-                                                                    ref="s7:S7ResponsePayloadCpuServicesSslDataRecordModuleIdentification"/>
-                                                    </xs:choice>
-                                                </xs:sequence>
-                                            </xs:complexType>
-                                        </xs:element>
-                                    </xs:sequence>
-                                </xs:complexType>
-                            </xs:element>
-                        </xs:sequence>
-                    </xs:complexType>
-                </xs:element>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="S7ResponsePayloadCpuServicesSslDataRecordModuleIdentification">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="index" type="s7:short"/>
-                <xs:element name="articleNumber" type="xs:string" dfdl:textTrimKind="none" dfdl:alignmentUnits="bytes"
-                            dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="20"/>
-                <xs:element name="bgType" type="s7:short"/>
-                <xs:element name="moduleOrOsVersion" type="s7:short"/>
-                <xs:element name="pgDescriptionFileVersion" type="s7:short"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="S7RequestPayloadReadVar"
-                type="xs:hexBinary" dfdl:lengthKind="explicit" dfdl:length="0"/>
-
-    <xs:element name="S7ResponsePayloadReadVar">
-        <xs:complexType>
-            <xs:sequence>
-                <!-- The number of items which should be read is transmitted in the matching parameter -->
-                <xs:element name="numItems" type="s7:byte"
-                            dfdl:inputValueCalc="{
-                                ../../../../parameters[1]/parameter[dfdl:occursIndex()]/s7:S7ResponseParameterReadVar/numItems
+    <xs:complexType name="S7GeneralPayloadSetupCommunication">
+        <xs:sequence>
+            <xs:element name="data" type="xs:hexBinary" dfdl:lengthKind="explicit" dfdl:length="0"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="S7UserDataPayloadCpuServices">
+        <xs:sequence>
+            <xs:element name="returnCode" type="s7:byte"/>
+            <xs:element name="transportSize" type="s7:byte"/><!-- fixed="9"-->
+            <xs:element name="length" type="s7:short"/>
+            <xs:element name="sslId" type="s7:short" minOccurs="0"
+                        dfdl:occursCountKind="expression"
+                        dfdl:occursCount="{if(../returnCode eq 255) then 1 else 0}"/>
+            <xs:element name="sslIndex" type="s7:short" minOccurs="0"
+                        dfdl:occursCountKind="expression"
+                        dfdl:occursCount="{if(../returnCode eq 255) then 1 else 0}"/>
+            <xs:element name="partialList" minOccurs="0"
+                        dfdl:occursCountKind="expression"
+                        dfdl:occursCount="{if((../returnCode eq 255) and (../length gt 4)) then 1 else 0}">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="partialListLengthInBytes" type="s7:short"/>
+                        <xs:element name="partialListCount" type="s7:short"/>
+                        <xs:element name="sslDataRecords">
+                            <xs:complexType>
+                                <xs:sequence>
+                                    <xs:element name="sslDataRecord" maxOccurs="unbounded"
+                                                dfdl:occursCountKind="expression"
+                                                dfdl:occursCount="{../../partialListCount}">
+                                        <xs:complexType>
+                                            <xs:sequence>
+                                                <xs:choice dfdl:choiceDispatchKey="{xs:string(../../../sslId[1])}">
+                                                    <xs:element dfdl:choiceBranchKey="17"
+                                                                name="s7ResponsePayloadCpuServicesSslDataRecordModuleIdentification"
+                                                                type="s7:S7ResponsePayloadCpuServicesSslDataRecordModuleIdentification"/>
+                                                </xs:choice>
+                                            </xs:sequence>
+                                        </xs:complexType>
+                                    </xs:element>
+                                </xs:sequence>
+                            </xs:complexType>
+                        </xs:element>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="S7ResponsePayloadCpuServicesSslDataRecordModuleIdentification">
+        <xs:sequence>
+            <xs:element name="index" type="s7:short"/>
+            <xs:element name="articleNumber" type="xs:string" dfdl:textTrimKind="none" dfdl:alignmentUnits="bytes"
+                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="20"/>
+            <xs:element name="bgType" type="s7:short"/>
+            <xs:element name="moduleOrOsVersion" type="s7:short"/>
+            <xs:element name="pgDescriptionFileVersion" type="s7:short"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="S7RequestPayloadReadVar">
+        <xs:sequence>
+            <xs:element name="data"
+                        type="xs:hexBinary" dfdl:lengthKind="explicit" dfdl:length="0"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="S7ResponsePayloadReadVar">
+        <xs:sequence>
+            <!-- The number of items which should be read is transmitted in the matching parameter -->
+            <xs:element name="numItems" type="s7:byte"
+                        dfdl:inputValueCalc="{
+                                ../../../../parameters[1]/parameter[dfdl:occursIndex()]/s7ResponseParameterReadVar/numItems
                             }"/>
-                <xs:element name="item" minOccurs="0" maxOccurs="unbounded"
-                            dfdl:occursCountKind="expression" dfdl:occursCount="{../numItems}">
-                    <xs:complexType>
-                        <xs:sequence>
-                            <xs:element name="returnCode" type="s7:byte"/>
-                            <xs:element name="transportSize" type="s7:byte"/>
-                            <xs:element name="rawLength" type="s7:short"/>
-                            <!--
-                                For some reason the types BIT, BYTE_WORD_DWORD and INTEGER are transferred in "bits",
-                                the rest is transferred in "bytes"
-                            -->
-                            <xs:element name="lengthInBytes" type="s7:short" dfdl:inputValueCalc="{
+            <xs:element name="item" minOccurs="0" maxOccurs="unbounded"
+                        dfdl:occursCountKind="expression" dfdl:occursCount="{../numItems}">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="returnCode" type="s7:byte"/>
+                        <xs:element name="transportSize" type="s7:byte"/>
+                        <xs:element name="rawLength" type="s7:short"/>
+                        <!--
+                            For some reason the types BIT, BYTE_WORD_DWORD and INTEGER are transferred in "bits",
+                            the rest is transferred in "bytes"
+                        -->
+                        <xs:element name="lengthInBytes" type="s7:short" dfdl:inputValueCalc="{
                                     xs:unsignedShort(if((../transportSize eq 3) or (../transportSize eq 4) or (../transportSize eq 5))
                                             then fn:ceiling(xs:double(../rawLength div 8))
                                             else ../rawLength)}"/>
-                            <xs:element name="data" type="xs:hexBinary"
-                                        dfdl:byteOrder="bigEndian" dfdl:lengthUnits="bytes" dfdl:lengthKind="explicit"
-                                        dfdl:length="{../lengthInBytes}"/>
-                            <!--
-                                Transport sizes: BIT, BYTE_WORD_DWORD and OCTET_STRING require a blank byte.
-                                However only if this is not the last item in the result.
-                            -->
-                            <xs:element name="fillByte" type="s7:byte" minOccurs="0"
-                                        dfdl:occursCountKind="expression" dfdl:occursCount="{
+                        <xs:element name="data" type="xs:hexBinary"
+                                    dfdl:byteOrder="bigEndian" dfdl:lengthUnits="bytes" dfdl:lengthKind="explicit"
+                                    dfdl:length="{../lengthInBytes}"/>
+                        <!--
+                            Transport sizes: BIT, BYTE_WORD_DWORD and OCTET_STRING require a blank byte.
+                            However only if this is not the last item in the result.
+                        -->
+                        <xs:element name="fillByte" type="s7:byte" minOccurs="0"
+                                    dfdl:occursCountKind="expression" dfdl:occursCount="{
                                             if(((../lengthInBytes mod 2) eq 1) and
                                                 (dfdl:occursIndex() ne ../../numItems)) then 1 else 0}"/>
-                        </xs:sequence>
-                    </xs:complexType>
-                </xs:element>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="S7RequestPayloadWriteVar">
-        <xs:complexType>
-            <xs:sequence>
-                <!-- The number of items which should be read is transmitted in the matching parameter -->
-                <xs:element name="numItems" type="s7:byte"
-                            dfdl:inputValueCalc="{
-                                ../../../../parameters[1]/parameter[dfdl:occursIndex()]/s7:S7RequestParameterWriteVar/numItems
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="S7RequestPayloadWriteVar">
+        <xs:sequence>
+            <!-- The number of items which should be read is transmitted in the matching parameter -->
+            <xs:element name="numItems" type="s7:byte"
+                        dfdl:inputValueCalc="{
+                                ../../../../parameters[1]/parameter[dfdl:occursIndex()]/s7RequestParameterWriteVar/numItems
                             }"/>
-                <xs:element name="item" minOccurs="0" maxOccurs="unbounded"
-                            dfdl:occursCountKind="expression" dfdl:occursCount="{../numItems}">
-                    <xs:complexType>
-                        <xs:sequence>
-                            <xs:element name="returnCode" type="s7:byte"/>
-                            <xs:element name="transportSize" type="s7:byte"/>
-                            <xs:element name="rawLength" type="s7:short"/>
-                            <!--
-                                For some reason the types BIT, BYTE_WORD_DWORD and INTEGER are transferred in "bits",
-                                the rest is transferred in "bytes"
-                            -->
-                            <xs:element name="lengthInBytes" type="s7:short" dfdl:inputValueCalc="{
+            <xs:element name="item" minOccurs="0" maxOccurs="unbounded"
+                        dfdl:occursCountKind="expression" dfdl:occursCount="{../numItems}">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="returnCode" type="s7:byte"/>
+                        <xs:element name="transportSize" type="s7:byte"/>
+                        <xs:element name="rawLength" type="s7:short"/>
+                        <!--
+                            For some reason the types BIT, BYTE_WORD_DWORD and INTEGER are transferred in "bits",
+                            the rest is transferred in "bytes"
+                        -->
+                        <xs:element name="lengthInBytes" type="s7:short" dfdl:inputValueCalc="{
                                     xs:unsignedShort(if((../transportSize eq 3) or (../transportSize eq 4) or (../transportSize eq 5))
                                             then fn:ceiling(../rawLength div 8)
                                             else ../rawLength)}"/>
-                            <xs:element name="data" type="xs:hexBinary"
-                                        dfdl:byteOrder="bigEndian" dfdl:lengthUnits="bytes" dfdl:lengthKind="explicit"
-                                        dfdl:length="{../lengthInBytes}"/>
-                            <!--
-                                It seems that the item payload must always be an even number of bytes. So if it's
-                                not an even number, add a fill byte.
-                            -->
-                            <xs:element name="fillByte" type="s7:byte" minOccurs="0"
-                                        dfdl:occursCountKind="expression" dfdl:occursCount="{
+                        <xs:element name="data" type="xs:hexBinary"
+                                    dfdl:byteOrder="bigEndian" dfdl:lengthUnits="bytes" dfdl:lengthKind="explicit"
+                                    dfdl:length="{../lengthInBytes}"/>
+                        <!--
+                            It seems that the item payload must always be an even number of bytes. So if it's
+                            not an even number, add a fill byte.
+                        -->
+                        <xs:element name="fillByte" type="s7:byte" minOccurs="0"
+                                    dfdl:occursCountKind="expression" dfdl:occursCount="{
                                             if(((../lengthInBytes mod 2) eq 1) and
                                                 (dfdl:occursIndex() ne ../../numItems)) then 1 else 0}"/>
-                        </xs:sequence>
-                    </xs:complexType>
-                </xs:element>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="S7ResponsePayloadWriteVar">
-        <xs:complexType>
-            <xs:sequence>
-                <!-- The number of items which should be read is transmitted in the matching parameter -->
-                <xs:element name="numItems" type="s7:byte"
-                            dfdl:inputValueCalc="{
-                                ../../../../parameters[1]/parameter[dfdl:occursIndex()]/s7:S7ResponseParameterWriteVar/numItems
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="S7ResponsePayloadWriteVar">
+        <xs:sequence>
+            <!-- The number of items which should be read is transmitted in the matching parameter -->
+            <xs:element name="numItems" type="s7:byte"
+                        dfdl:inputValueCalc="{
+                                ../../../../parameters[1]/parameter[dfdl:occursIndex()]/s7ResponseParameterWriteVar/numItems
                             }"/>
-                <xs:element name="item" minOccurs="0" maxOccurs="unbounded"
-                            dfdl:occursCountKind="expression" dfdl:occursCount="{../numItems}">
-                    <xs:complexType>
-                        <xs:sequence>
-                            <xs:element name="returnCode" type="s7:byte"/>
-                        </xs:sequence>
-                    </xs:complexType>
-                </xs:element>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
+            <xs:element name="item" minOccurs="0" maxOccurs="unbounded"
+                        dfdl:occursCountKind="expression" dfdl:occursCount="{../numItems}">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="returnCode" type="s7:byte"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
 
 </xs:schema>
\ No newline at end of file
diff --git a/protocols/s7/src/main/resources/org/apache/plc4x/protocols/s7/protocol.scxml.xml b/protocols/s7/src/main/resources/org/apache/plc4x/protocols/s7/protocol.scxml.xml
index da741d4..0f8e98f 100644
--- a/protocols/s7/src/main/resources/org/apache/plc4x/protocols/s7/protocol.scxml.xml
+++ b/protocols/s7/src/main/resources/org/apache/plc4x/protocols/s7/protocol.scxml.xml
@@ -98,7 +98,7 @@
             <userData>
               <headerLength>17</headerLength>
               <type>224</type>
-              <s7:CotpTpduConnectionRequest>
+              <cotpTpduConnectionRequest>
                 <destinationReference>0</destinationReference>
                 <!-- Insert the value for "cotpLocalReference" as short here -->
                 <sourceReference>${cotpLocalReference}</sourceReference>
@@ -107,26 +107,26 @@
                   <parameter>
                     <type>194</type>
                     <parameterLength>2</parameterLength>
-                    <s7:CotpParameterCalledTsap>
+                    <cotpParameterCalledTsap>
                       <tsapId>${cotpCalledTsap}</tsapId>
-                    </s7:CotpParameterCalledTsap>
+                    </cotpParameterCalledTsap>
                   </parameter>
                   <parameter>
                     <type>193</type>
                     <parameterLength>2</parameterLength>
-                    <s7:CotpParameterCallingTsap>
+                    <cotpParameterCallingTsap>
                       <tsapId>${cotpCallingTsap}</tsapId>
-                    </s7:CotpParameterCallingTsap>
+                    </cotpParameterCallingTsap>
                   </parameter>
                   <parameter>
                     <type>192</type>
                     <parameterLength>1</parameterLength>
-                    <s7:CotpParameterTpduSize>
+                    <cotpParameterTpduSize>
                       <tpduSize>${cotpTpduSize}</tpduSize>
-                    </s7:CotpParameterTpduSize>
+                    </cotpParameterTpduSize>
                   </parameter>
                 </s7:parameters>
-              </s7:CotpTpduConnectionRequest>
+              </cotpTpduConnectionRequest>
             </userData>
           </s7:TpktMessage>
         </plc4x:send>
@@ -171,14 +171,14 @@
             <userData>
               <headerLength>2</headerLength>
               <type>240</type>
-              <s7:CotpTpduData>
+              <cotpTpduData>
                 <endOfTransmission>1</endOfTransmission>
                 <tpduRef>0</tpduRef>
-              </s7:CotpTpduData>
+              </cotpTpduData>
               <userData>
                 <magicByte>50</magicByte>
                 <type>1</type>
-                <s7:S7RequestMessage>
+                <s7RequestMessage>
                   <reserved>0</reserved>
                   <tpduReference>0</tpduReference>
                   <parametersLength>8</parametersLength>
@@ -186,20 +186,22 @@
                   <parameters>
                     <parameter>
                       <type>240</type>
-                      <s7:S7GeneralParameterSetupCommunication>
+                      <s7GeneralParameterSetupCommunication>
                         <reserved>0</reserved>
                         <maxAmqCaller>${s7MaxAmqCaller}</maxAmqCaller>
                         <maxAmqCallee>${s7MaxAmqCallee}</maxAmqCallee>
                         <pduLength>${s7PduLength}</pduLength>
-                      </s7:S7GeneralParameterSetupCommunication>
+                      </s7GeneralParameterSetupCommunication>
                     </parameter>
                   </parameters>
                   <payloads>
                     <payload>
-                      <s7:S7GeneralPayloadSetupCommunication/>
+                      <s7GeneralPayloadSetupCommunication>
+                        <data/>
+                      </s7GeneralPayloadSetupCommunication>
                     </payload>
                   </payloads>
-                </s7:S7RequestMessage>
+                </s7RequestMessage>
               </userData>
             </userData>
           </s7:TpktMessage>
@@ -250,14 +252,14 @@
             <userData>
               <headerLength>2</headerLength>
               <type>240</type>
-              <s7:CotpTpduData>
+              <cotpTpduData>
                 <endOfTransmission>1</endOfTransmission>
                 <tpduRef>0</tpduRef>
-              </s7:CotpTpduData>
+              </cotpTpduData>
               <userData>
                 <magicByte>50</magicByte>
                 <type>7</type>
-                <s7:S7UserDataMessage>
+                <s7UserDataMessage>
                   <reserved>0</reserved>
                   <tpduReference>1</tpduReference>
                   <parametersLength>8</parametersLength>
@@ -265,7 +267,7 @@
                   <parameters>
                     <parameter>
                       <type>0</type>
-                      <s7:S7UserDataParameterCPUService>
+                      <s7UserDataParameterCPUService>
                         <header>274</header>
                         <paramLength>4</paramLength>
                         <typeCode>17</typeCode>
@@ -273,21 +275,21 @@
                         <functionGroup>4</functionGroup>
                         <subFunctionGroup>1</subFunctionGroup>
                         <sequenceNumber>0</sequenceNumber>
-                      </s7:S7UserDataParameterCPUService>
+                      </s7UserDataParameterCPUService>
                     </parameter>
                   </parameters>
                   <payloads>
                     <payload>
-                      <s7:S7UserDataPayloadCpuServices>
+                      <s7UserDataPayloadCpuServices>
                         <returnCode>255</returnCode>
                         <transportSize>9</transportSize>
                         <length>4</length>
                         <sslId>17</sslId>
                         <sslIndex>0</sslIndex>
-                      </s7:S7UserDataPayloadCpuServices>
+                      </s7UserDataPayloadCpuServices>
                     </payload>
                   </payloads>
-                </s7:S7UserDataMessage>
+                </s7UserDataMessage>
               </userData>
             </userData>
           </s7:TpktMessage>
@@ -346,14 +348,14 @@
             <userData>
               <headerLength>2</headerLength>
               <type>240</type>
-              <s7:CotpTpduData>
+              <cotpTpduData>
                 <endOfTransmission>1</endOfTransmission>
                 <tpduRef>0</tpduRef>
-              </s7:CotpTpduData>
+              </cotpTpduData>
               <userData>
                 <magicByte>50</magicByte>
                 <type>1</type>
-                <s7:S7RequestMessage>
+                <s7RequestMessage>
                   <reserved>0</reserved>
                   <tpduReference>${requestId}</tpduReference>
                   <parametersLength>14</parametersLength>
@@ -361,12 +363,12 @@
                   <parameters>
                     <parameter>
                       <type>4</type>
-                      <s7:S7RequestParameterReadVar>
+                      <s7RequestParameterReadVar>
                         <numItems>1</numItems>
                         <items>
                           <item>
                             <type>18</type>
-                            <s7:S7RequestParameterReadVarAnyItem>
+                            <s7RequestParameterReadVarAnyItem>
                               <paramLength>10</paramLength>
                               <addressingMode>16</addressingMode>
                               <dataType>${container.request.fields[0].dataType.typeCode}</dataType><!--8 ${s7ReadDataType}-->
@@ -375,18 +377,18 @@
                               <memoryArea>${container.request.fields[0].memoryArea.code}</memoryArea><!--131 ${s7ReadMemoryArea}-->
                               <byteOffset>${container.request.fields[0].byteOffset}</byteOffset><!--16 ${s7ReadByteOffset}-->
                               <bitOffset>${container.request.fields[0].bitOffset}</bitOffset><!--0 ${s7ReadBitOffset}-->
-                            </s7:S7RequestParameterReadVarAnyItem>
+                            </s7RequestParameterReadVarAnyItem>
                           </item>
                         </items>
-                      </s7:S7RequestParameterReadVar>
+                      </s7RequestParameterReadVar>
                     </parameter>
                   </parameters>
                   <payloads>
                     <payload>
-                      <s7:S7RequestPayloadReadVar/>
+                      <s7RequestPayloadReadVar/>
                     </payload>
                   </payloads>
-                </s7:S7RequestMessage>
+                </s7RequestMessage>
               </userData>
             </userData>
           </s7:TpktMessage>
@@ -423,14 +425,14 @@
             <userData>
               <headerLength>2</headerLength>
               <type>240</type>
-              <s7:CotpTpduData>
+              <cotpTpduData>
                 <endOfTransmission>1</endOfTransmission>
                 <tpduRef>0</tpduRef>
-              </s7:CotpTpduData>
+              </cotpTpduData>
               <userData>
                 <magicByte>50</magicByte>
                 <type>1</type>
-                <s7:S7RequestMessage>
+                <s7RequestMessage>
                   <reserved>0</reserved>
                   <tpduReference>${requestId}</tpduReference>
                   <parametersLength>14</parametersLength>
@@ -438,12 +440,12 @@
                   <parameters>
                     <parameter>
                       <type>5</type>
-                      <s7:S7RequestParameterWriteVar>
+                      <s7RequestParameterWriteVar>
                         <numItems>1</numItems>
                         <items>
                           <item>
                             <type>18</type>
-                            <s7:S7RequestParameterWriteVarAnyItem>
+                            <s7RequestParameterWriteVarAnyItem>
                               <itemLength>10</itemLength>
                               <addressingMode>16</addressingMode>
                               <dataType>8</dataType><!--8 ${s7WriteDataType}-->
@@ -452,15 +454,15 @@
                               <memoryArea>131</memoryArea><!--131 ${s7WriteMemoryArea}-->
                               <byteOffset>16</byteOffset><!--16 ${s7WriteByteOffset}-->
                               <bitOffset>0</bitOffset><!--0 ${s7WriteBitOffset}-->
-                            </s7:S7RequestParameterWriteVarAnyItem>
+                            </s7RequestParameterWriteVarAnyItem>
                           </item>
                         </items>
-                      </s7:S7RequestParameterWriteVar>
+                      </s7RequestParameterWriteVar>
                     </parameter>
                   </parameters>
                   <payloads>
                     <payload>
-                      <s7:S7RequestPayloadWriteVar>
+                      <s7RequestPayloadWriteVar>
                         <numItems>1</numItems>
                         <item>
                           <returnCode>0</returnCode>
@@ -469,10 +471,10 @@
                           <lengthInBytes>4</lengthInBytes><!--4 ${s7WriteLengthInBytes}-->
                           <data>79E9F642</data><!--79E9F642 ${s7WriteData}-->
                         </item>
-                      </s7:S7RequestPayloadWriteVar>
+                      </s7RequestPayloadWriteVar>
                     </payload>
                   </payloads>
-                </s7:S7RequestMessage>
+                </s7RequestMessage>
               </userData>
             </userData>
           </s7:TpktMessage>
diff --git a/protocols/s7/src/test/java/org/apache/plc4x/protocols/s7/ManualTest.java b/protocols/s7/src/test/java/org/apache/plc4x/protocols/s7/ManualTest.java
index f95251d..c671787 100644
--- a/protocols/s7/src/test/java/org/apache/plc4x/protocols/s7/ManualTest.java
+++ b/protocols/s7/src/test/java/org/apache/plc4x/protocols/s7/ManualTest.java
@@ -42,6 +42,7 @@ public class ManualTest {
         if (schemaUrl != null) {
             URI schemaUri = schemaUrl.toURI();
             ProcessorFactory pf = c.compileSource(schemaUri);
+            logDiagnosticInformation(pf);
             DataProcessor dp = pf.onPath("/");
             logDiagnosticInformation(dp);
 
diff --git a/protocols/s7/src/test/resources/org/apache/plc4x/protocols/s7/protocol.tdml b/protocols/s7/src/test/resources/org/apache/plc4x/protocols/s7/protocol.tdml
index 49e4a71..2a8c108 100644
--- a/protocols/s7/src/test/resources/org/apache/plc4x/protocols/s7/protocol.tdml
+++ b/protocols/s7/src/test/resources/org/apache/plc4x/protocols/s7/protocol.tdml
@@ -62,34 +62,34 @@
                     <userData>
                         <headerLength>17</headerLength>
                         <type>208</type>
-                        <s7:CotpTpduConnectionResponse>
+                        <cotpTpduConnectionResponse>
                             <destinationReference>1</destinationReference>
                             <sourceReference>2</sourceReference>
                             <protocolClass>0</protocolClass>
-                            <s7:parameters>
+                            <parameters>
                                 <parameter>
                                     <type>192</type>
                                     <parameterLength>1</parameterLength>
-                                    <s7:CotpParameterTpduSize>
+                                    <cotpParameterTpduSize>
                                         <tpduSize>9</tpduSize>
-                                    </s7:CotpParameterTpduSize>
+                                    </cotpParameterTpduSize>
                                 </parameter>
                                 <parameter>
                                     <type>193</type>
                                     <parameterLength>2</parameterLength>
-                                    <s7:CotpParameterCallingTsap>
+                                    <cotpParameterCallingTsap>
                                         <tsapId>256</tsapId>
-                                    </s7:CotpParameterCallingTsap>
+                                    </cotpParameterCallingTsap>
                                 </parameter>
                                 <parameter>
                                     <type>194</type>
                                     <parameterLength>2</parameterLength>
-                                    <s7:CotpParameterCalledTsap>
+                                    <cotpParameterCalledTsap>
                                         <tsapId>258</tsapId>
-                                    </s7:CotpParameterCalledTsap>
+                                    </cotpParameterCalledTsap>
                                 </parameter>
-                            </s7:parameters>
-                        </s7:CotpTpduConnectionResponse>
+                            </parameters>
+                        </cotpTpduConnectionResponse>
                     </userData>
                 </s7:TpktMessage>
             </tdml:dfdlInfoset>
@@ -166,11 +166,11 @@
                     <userData>
                         <headerLength>6</headerLength>
                         <type>224</type>
-                        <s7:CotpTpduConnectionRequest>
+                        <cotpTpduConnectionRequest>
                             <destinationReference>1</destinationReference>
                             <sourceReference>2</sourceReference>
                             <protocolClass>0</protocolClass>
-                        </s7:CotpTpduConnectionRequest>
+                        </cotpTpduConnectionRequest>
                     </userData>
                 </s7:TpktMessage>
             </tdml:dfdlInfoset>
@@ -194,11 +194,11 @@
                     <userData>
                         <headerLength>6</headerLength>
                         <type>208</type>
-                        <s7:CotpTpduConnectionResponse>
+                        <cotpTpduConnectionResponse>
                             <destinationReference>1</destinationReference>
                             <sourceReference>2</sourceReference>
                             <protocolClass>0</protocolClass>
-                        </s7:CotpTpduConnectionResponse>
+                        </cotpTpduConnectionResponse>
                     </userData>
                 </s7:TpktMessage>
             </tdml:dfdlInfoset>
@@ -224,11 +224,11 @@
                     <userData>
                         <headerLength>6</headerLength>
                         <type>128</type>
-                        <s7:CotpTpduDisconnectRequest>
+                        <cotpTpduDisconnectRequest>
                             <destinationReference>1</destinationReference>
                             <sourceReference>2</sourceReference>
                             <disconnectReason>0</disconnectReason>
-                        </s7:CotpTpduDisconnectRequest>
+                        </cotpTpduDisconnectRequest>
                     </userData>
                 </s7:TpktMessage>
             </tdml:dfdlInfoset>
@@ -254,10 +254,10 @@
                     <userData>
                         <headerLength>5</headerLength>
                         <type>192</type>
-                        <s7:CotpTpduDisconnectResponse>
+                        <cotpTpduDisconnectResponse>
                             <destinationReference>1</destinationReference>
                             <sourceReference>2</sourceReference>
-                        </s7:CotpTpduDisconnectResponse>
+                        </cotpTpduDisconnectResponse>
                     </userData>
                 </s7:TpktMessage>
             </tdml:dfdlInfoset>
@@ -283,10 +283,10 @@
                     <userData>
                         <headerLength>4</headerLength>
                         <type>112</type>
-                        <s7:CotpTpduError>
+                        <cotpTpduError>
                             <destinationReference>1</destinationReference>
                             <rejectCause>2</rejectCause>
-                        </s7:CotpTpduError>
+                        </cotpTpduError>
                     </userData>
                 </s7:TpktMessage>
             </tdml:dfdlInfoset>
@@ -312,10 +312,10 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>0</endOfTransmission>
                             <tpduRef>2</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                     </userData>
                 </s7:TpktMessage>
             </tdml:dfdlInfoset>
@@ -341,10 +341,10 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>2</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                     </userData>
                 </s7:TpktMessage>
             </tdml:dfdlInfoset>
@@ -389,20 +389,20 @@
                     <userData>
                         <headerLength>9</headerLength>
                         <type>224</type>
-                        <s7:CotpTpduConnectionRequest>
+                        <cotpTpduConnectionRequest>
                             <destinationReference>1</destinationReference>
                             <sourceReference>2</sourceReference>
                             <protocolClass>0</protocolClass>
-                            <s7:parameters>
+                            <parameters>
                                 <parameter>
                                     <type>192</type>
                                     <parameterLength>1</parameterLength>
-                                    <s7:CotpParameterTpduSize>
+                                    <cotpParameterTpduSize>
                                         <tpduSize>9</tpduSize>
-                                    </s7:CotpParameterTpduSize>
+                                    </cotpParameterTpduSize>
                                 </parameter>
-                            </s7:parameters>
-                        </s7:CotpTpduConnectionRequest>
+                            </parameters>
+                        </cotpTpduConnectionRequest>
                     </userData>
                 </s7:TpktMessage>
             </tdml:dfdlInfoset>
@@ -428,20 +428,20 @@
                     <userData>
                         <headerLength>10</headerLength>
                         <type>224</type>
-                        <s7:CotpTpduConnectionRequest>
+                        <cotpTpduConnectionRequest>
                             <destinationReference>1</destinationReference>
                             <sourceReference>2</sourceReference>
                             <protocolClass>0</protocolClass>
-                            <s7:parameters>
+                            <parameters>
                                 <parameter>
                                     <type>193</type>
                                     <parameterLength>2</parameterLength>
-                                    <s7:CotpParameterCallingTsap>
+                                    <cotpParameterCallingTsap>
                                         <tsapId>9</tsapId>
-                                    </s7:CotpParameterCallingTsap>
+                                    </cotpParameterCallingTsap>
                                 </parameter>
-                            </s7:parameters>
-                        </s7:CotpTpduConnectionRequest>
+                            </parameters>
+                        </cotpTpduConnectionRequest>
                     </userData>
                 </s7:TpktMessage>
             </tdml:dfdlInfoset>
@@ -467,20 +467,20 @@
                     <userData>
                         <headerLength>10</headerLength>
                         <type>224</type>
-                        <s7:CotpTpduConnectionRequest>
+                        <cotpTpduConnectionRequest>
                             <destinationReference>1</destinationReference>
                             <sourceReference>2</sourceReference>
                             <protocolClass>0</protocolClass>
-                            <s7:parameters>
+                            <parameters>
                                 <parameter>
                                     <type>194</type>
                                     <parameterLength>2</parameterLength>
-                                    <s7:CotpParameterCalledTsap>
+                                    <cotpParameterCalledTsap>
                                         <tsapId>9</tsapId>
-                                    </s7:CotpParameterCalledTsap>
+                                    </cotpParameterCalledTsap>
                                 </parameter>
-                            </s7:parameters>
-                        </s7:CotpTpduConnectionRequest>
+                            </parameters>
+                        </cotpTpduConnectionRequest>
                     </userData>
                 </s7:TpktMessage>
             </tdml:dfdlInfoset>
@@ -506,20 +506,20 @@
                     <userData>
                         <headerLength>9</headerLength>
                         <type>224</type>
-                        <s7:CotpTpduConnectionRequest>
+                        <cotpTpduConnectionRequest>
                             <destinationReference>1</destinationReference>
                             <sourceReference>2</sourceReference>
                             <protocolClass>0</protocolClass>
-                            <s7:parameters>
+                            <parameters>
                                 <parameter>
                                     <type>195</type>
                                     <parameterLength>1</parameterLength>
-                                    <s7:CotpParameterChecksum>
+                                    <cotpParameterChecksum>
                                         <checksum>9</checksum>
-                                    </s7:CotpParameterChecksum>
+                                    </cotpParameterChecksum>
                                 </parameter>
-                            </s7:parameters>
-                        </s7:CotpTpduConnectionRequest>
+                            </parameters>
+                        </cotpTpduConnectionRequest>
                     </userData>
                 </s7:TpktMessage>
             </tdml:dfdlInfoset>
@@ -545,20 +545,20 @@
                     <userData>
                         <headerLength>14</headerLength>
                         <type>224</type>
-                        <s7:CotpTpduConnectionRequest>
+                        <cotpTpduConnectionRequest>
                             <destinationReference>1</destinationReference>
                             <sourceReference>2</sourceReference>
                             <protocolClass>0</protocolClass>
-                            <s7:parameters>
+                            <parameters>
                                 <parameter>
                                     <type>224</type>
                                     <parameterLength>6</parameterLength>
-                                    <s7:CotpParameterDisconnectAdditionalInformation>
+                                    <cotpParameterDisconnectAdditionalInformation>
                                         <data>010203040506</data>
-                                    </s7:CotpParameterDisconnectAdditionalInformation>
+                                    </cotpParameterDisconnectAdditionalInformation>
                                 </parameter>
-                            </s7:parameters>
-                        </s7:CotpTpduConnectionRequest>
+                            </parameters>
+                        </cotpTpduConnectionRequest>
                     </userData>
                 </s7:TpktMessage>
             </tdml:dfdlInfoset>
@@ -603,34 +603,34 @@
                     <userData>
                         <headerLength>17</headerLength>
                         <type>224</type>
-                        <s7:CotpTpduConnectionRequest>
+                        <cotpTpduConnectionRequest>
                             <destinationReference>1</destinationReference>
                             <sourceReference>2</sourceReference>
                             <protocolClass>0</protocolClass>
-                            <s7:parameters>
+                            <parameters>
                                 <parameter>
                                     <type>193</type>
                                     <parameterLength>2</parameterLength>
-                                    <s7:CotpParameterCallingTsap>
+                                    <cotpParameterCallingTsap>
                                         <tsapId>256</tsapId>
-                                    </s7:CotpParameterCallingTsap>
+                                    </cotpParameterCallingTsap>
                                 </parameter>
                                 <parameter>
                                     <type>194</type>
                                     <parameterLength>2</parameterLength>
-                                    <s7:CotpParameterCalledTsap>
+                                    <cotpParameterCalledTsap>
                                         <tsapId>258</tsapId>
-                                    </s7:CotpParameterCalledTsap>
+                                    </cotpParameterCalledTsap>
                                 </parameter>
                                 <parameter>
                                     <type>192</type>
                                     <parameterLength>1</parameterLength>
-                                    <s7:CotpParameterTpduSize>
+                                    <cotpParameterTpduSize>
                                         <tpduSize>10</tpduSize>
-                                    </s7:CotpParameterTpduSize>
+                                    </cotpParameterTpduSize>
                                 </parameter>
-                            </s7:parameters>
-                        </s7:CotpTpduConnectionRequest>
+                            </parameters>
+                        </cotpTpduConnectionRequest>
                     </userData>
                 </s7:TpktMessage>
             </tdml:dfdlInfoset>
@@ -656,34 +656,34 @@
                     <userData>
                         <headerLength>17</headerLength>
                         <type>208</type>
-                        <s7:CotpTpduConnectionResponse>
+                        <cotpTpduConnectionResponse>
                             <destinationReference>1</destinationReference>
                             <sourceReference>2</sourceReference>
                             <protocolClass>0</protocolClass>
-                            <s7:parameters>
+                            <parameters>
                                 <parameter>
                                     <type>192</type>
                                     <parameterLength>1</parameterLength>
-                                    <s7:CotpParameterTpduSize>
+                                    <cotpParameterTpduSize>
                                         <tpduSize>9</tpduSize>
-                                    </s7:CotpParameterTpduSize>
+                                    </cotpParameterTpduSize>
                                 </parameter>
                                 <parameter>
                                     <type>193</type>
                                     <parameterLength>2</parameterLength>
-                                    <s7:CotpParameterCallingTsap>
+                                    <cotpParameterCallingTsap>
                                         <tsapId>256</tsapId>
-                                    </s7:CotpParameterCallingTsap>
+                                    </cotpParameterCallingTsap>
                                 </parameter>
                                 <parameter>
                                     <type>194</type>
                                     <parameterLength>2</parameterLength>
-                                    <s7:CotpParameterCalledTsap>
+                                    <cotpParameterCalledTsap>
                                         <tsapId>258</tsapId>
-                                    </s7:CotpParameterCalledTsap>
+                                    </cotpParameterCalledTsap>
                                 </parameter>
-                            </s7:parameters>
-                        </s7:CotpTpduConnectionResponse>
+                            </parameters>
+                        </cotpTpduConnectionResponse>
                     </userData>
                 </s7:TpktMessage>
             </tdml:dfdlInfoset>
@@ -710,14 +710,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>1</type>
-                            <s7:S7RequestMessage>
+                            <s7RequestMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>1</tpduReference>
                                 <parametersLength>14</parametersLength>
@@ -725,12 +725,12 @@
                                 <parameters>
                                     <parameter>
                                         <type>4</type>
-                                        <s7:S7RequestParameterReadVar>
+                                        <s7RequestParameterReadVar>
                                             <numItems>1</numItems>
                                             <items>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>1</dataType>
@@ -739,18 +739,20 @@
                                                         <memoryArea>130</memoryArea>
                                                         <byteOffset>0</byteOffset>
                                                         <bitOffset>4</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                             </items>
-                                        </s7:S7RequestParameterReadVar>
+                                        </s7RequestParameterReadVar>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7RequestPayloadReadVar/>
+                                        <s7RequestPayloadReadVar>
+                                            <data/>
+                                        </s7RequestPayloadReadVar>
                                     </payload>
                                 </payloads>
-                            </s7:S7RequestMessage>
+                            </s7RequestMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>
@@ -776,14 +778,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>1</type>
-                            <s7:S7RequestMessage>
+                            <s7RequestMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>0</tpduReference>
                                 <parametersLength>8</parametersLength>
@@ -791,20 +793,22 @@
                                 <parameters>
                                     <parameter>
                                         <type>240</type>
-                                        <s7:S7GeneralParameterSetupCommunication>
+                                        <s7GeneralParameterSetupCommunication>
                                             <reserved>0</reserved>
                                             <maxAmqCaller>1</maxAmqCaller>
                                             <maxAmqCallee>1</maxAmqCallee>
                                             <pduLength>480</pduLength>
-                                        </s7:S7GeneralParameterSetupCommunication>
+                                        </s7GeneralParameterSetupCommunication>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7GeneralPayloadSetupCommunication/>
+                                        <s7GeneralPayloadSetupCommunication>
+                                            <data/>
+                                        </s7GeneralPayloadSetupCommunication>
                                     </payload>
                                 </payloads>
-                            </s7:S7RequestMessage>
+                            </s7RequestMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>
@@ -830,14 +834,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>3</type>
-                            <s7:S7ResponseMessage>
+                            <s7ResponseMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>0</tpduReference>
                                 <parametersLength>8</parametersLength>
@@ -847,20 +851,22 @@
                                 <parameters>
                                     <parameter>
                                         <type>240</type>
-                                        <s7:S7GeneralParameterSetupCommunication>
+                                        <s7GeneralParameterSetupCommunication>
                                             <reserved>0</reserved>
                                             <maxAmqCaller>1</maxAmqCaller>
                                             <maxAmqCallee>1</maxAmqCallee>
                                             <pduLength>240</pduLength>
-                                        </s7:S7GeneralParameterSetupCommunication>
+                                        </s7GeneralParameterSetupCommunication>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7GeneralPayloadSetupCommunication/>
+                                        <s7GeneralPayloadSetupCommunication>
+                                            <data/>
+                                        </s7GeneralPayloadSetupCommunication>
                                     </payload>
                                 </payloads>
-                            </s7:S7ResponseMessage>
+                            </s7ResponseMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>
@@ -887,14 +893,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>7</type>
-                            <s7:S7UserDataMessage>
+                            <s7UserDataMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>256</tpduReference>
                                 <parametersLength>8</parametersLength>
@@ -902,7 +908,7 @@
                                 <parameters>
                                     <parameter>
                                         <type>0</type>
-                                        <s7:S7UserDataParameterCPUService>
+                                        <s7UserDataParameterCPUService>
                                             <header>274</header>
                                             <paramLength>4</paramLength>
                                             <typeCode>17</typeCode>
@@ -910,21 +916,21 @@
                                             <functionGroup>4</functionGroup>
                                             <subFunctionGroup>1</subFunctionGroup>
                                             <sequenceNumber>0</sequenceNumber>
-                                        </s7:S7UserDataParameterCPUService>
+                                        </s7UserDataParameterCPUService>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7UserDataPayloadCpuServices>
+                                        <s7UserDataPayloadCpuServices>
                                             <returnCode>255</returnCode>
                                             <transportSize>9</transportSize>
                                             <length>4</length>
                                             <sslId>17</sslId>
                                             <sslIndex>0</sslIndex>
-                                        </s7:S7UserDataPayloadCpuServices>
+                                        </s7UserDataPayloadCpuServices>
                                     </payload>
                                 </payloads>
-                            </s7:S7UserDataMessage>
+                            </s7UserDataMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>
@@ -952,14 +958,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>7</type>
-                            <s7:S7UserDataMessage>
+                            <s7UserDataMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>256</tpduReference>
                                 <parametersLength>12</parametersLength>
@@ -967,7 +973,7 @@
                                 <parameters>
                                     <parameter>
                                         <type>0</type>
-                                        <s7:S7UserDataParameterCPUService>
+                                        <s7UserDataParameterCPUService>
                                             <header>274</header>
                                             <paramLength>8</paramLength>
                                             <typeCode>18</typeCode>
@@ -978,12 +984,12 @@
                                             <dataUnitReferenceNumber>0</dataUnitReferenceNumber>
                                             <lastDataUnit>0</lastDataUnit>
                                             <errorCode>0</errorCode>
-                                        </s7:S7UserDataParameterCPUService>
+                                        </s7UserDataParameterCPUService>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7UserDataPayloadCpuServices>
+                                        <s7UserDataPayloadCpuServices>
                                             <returnCode>255</returnCode>
                                             <transportSize>9</transportSize>
                                             <length>120</length>
@@ -994,47 +1000,47 @@
                                                 <partialListCount>4</partialListCount>
                                                 <sslDataRecords>
                                                     <sslDataRecord>
-                                                        <s7:S7ResponsePayloadCpuServicesSslDataRecordModuleIdentification>
+                                                        <s7ResponsePayloadCpuServicesSslDataRecordModuleIdentification>
                                                             <index>1</index>
                                                             <articleNumber><![CDATA[6ES7 315-2EH14-0AB0 ]]></articleNumber>
                                                             <bgType>192</bgType>
                                                             <moduleOrOsVersion>3</moduleOrOsVersion>
                                                             <pgDescriptionFileVersion>1</pgDescriptionFileVersion>
-                                                        </s7:S7ResponsePayloadCpuServicesSslDataRecordModuleIdentification>
+                                                        </s7ResponsePayloadCpuServicesSslDataRecordModuleIdentification>
                                                     </sslDataRecord>
                                                     <sslDataRecord>
-                                                        <s7:S7ResponsePayloadCpuServicesSslDataRecordModuleIdentification>
+                                                        <s7ResponsePayloadCpuServicesSslDataRecordModuleIdentification>
                                                             <index>6</index>
                                                             <articleNumber><![CDATA[6ES7 315-2EH14-0AB0 ]]></articleNumber>
                                                             <bgType>192</bgType>
                                                             <moduleOrOsVersion>3</moduleOrOsVersion>
                                                             <pgDescriptionFileVersion>1</pgDescriptionFileVersion>
-                                                        </s7:S7ResponsePayloadCpuServicesSslDataRecordModuleIdentification>
+                                                        </s7ResponsePayloadCpuServicesSslDataRecordModuleIdentification>
                                                     </sslDataRecord>
                                                     <sslDataRecord>
-                                                        <s7:S7ResponsePayloadCpuServicesSslDataRecordModuleIdentification>
+                                                        <s7ResponsePayloadCpuServicesSslDataRecordModuleIdentification>
                                                             <index>7</index>
                                                             <articleNumber><![CDATA[                    ]]></articleNumber>
                                                             <bgType>192</bgType>
                                                             <moduleOrOsVersion>22019</moduleOrOsVersion>
                                                             <pgDescriptionFileVersion>519</pgDescriptionFileVersion>
-                                                        </s7:S7ResponsePayloadCpuServicesSslDataRecordModuleIdentification>
+                                                        </s7ResponsePayloadCpuServicesSslDataRecordModuleIdentification>
                                                     </sslDataRecord>
                                                     <sslDataRecord>
-                                                        <s7:S7ResponsePayloadCpuServicesSslDataRecordModuleIdentification>
+                                                        <s7ResponsePayloadCpuServicesSslDataRecordModuleIdentification>
                                                             <index>129</index>
                                                             <articleNumber><![CDATA[Boot Loader         ]]></articleNumber>
                                                             <bgType>0</bgType>
                                                             <moduleOrOsVersion>16672</moduleOrOsVersion>
                                                             <pgDescriptionFileVersion>2313</pgDescriptionFileVersion>
-                                                        </s7:S7ResponsePayloadCpuServicesSslDataRecordModuleIdentification>
+                                                        </s7ResponsePayloadCpuServicesSslDataRecordModuleIdentification>
                                                     </sslDataRecord>
                                                 </sslDataRecords>
                                             </partialList>
-                                        </s7:S7UserDataPayloadCpuServices>
+                                        </s7UserDataPayloadCpuServices>
                                     </payload>
                                 </payloads>
-                            </s7:S7UserDataMessage>
+                            </s7UserDataMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>
@@ -1061,14 +1067,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>1</type>
-                            <s7:S7RequestMessage>
+                            <s7RequestMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>6400</tpduReference>
                                 <parametersLength>14</parametersLength>
@@ -1076,12 +1082,12 @@
                                 <parameters>
                                     <parameter>
                                         <type>4</type>
-                                        <s7:S7RequestParameterReadVar>
+                                        <s7RequestParameterReadVar>
                                             <numItems>1</numItems>
                                             <items>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>8</dataType>
@@ -1090,18 +1096,20 @@
                                                         <memoryArea>131</memoryArea>
                                                         <byteOffset>16</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                             </items>
-                                        </s7:S7RequestParameterReadVar>
+                                        </s7RequestParameterReadVar>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7RequestPayloadReadVar/>
+                                        <s7RequestPayloadReadVar>
+                                            <data/>
+                                        </s7RequestPayloadReadVar>
                                     </payload>
                                 </payloads>
-                            </s7:S7RequestMessage>
+                            </s7RequestMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>
@@ -1128,14 +1136,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>3</type>
-                            <s7:S7ResponseMessage>
+                            <s7ResponseMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>6400</tpduReference>
                                 <parametersLength>2</parametersLength>
@@ -1145,14 +1153,14 @@
                                 <parameters>
                                     <parameter>
                                         <type>4</type>
-                                        <s7:S7ResponseParameterReadVar>
+                                        <s7ResponseParameterReadVar>
                                             <numItems>1</numItems>
-                                        </s7:S7ResponseParameterReadVar>
+                                        </s7ResponseParameterReadVar>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7ResponsePayloadReadVar>
+                                        <s7ResponsePayloadReadVar>
                                             <numItems>1</numItems>
                                             <item>
                                                 <returnCode>255</returnCode>
@@ -1161,10 +1169,10 @@
                                                 <lengthInBytes>4</lengthInBytes>
                                                 <data>00000000</data>
                                             </item>
-                                        </s7:S7ResponsePayloadReadVar>
+                                        </s7ResponsePayloadReadVar>
                                     </payload>
                                 </payloads>
-                            </s7:S7ResponseMessage>
+                            </s7ResponseMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>
@@ -1191,14 +1199,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>1</type>
-                            <s7:S7RequestMessage>
+                            <s7RequestMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>1</tpduReference>
                                 <parametersLength>86</parametersLength>
@@ -1206,12 +1214,12 @@
                                 <parameters>
                                     <parameter>
                                         <type>4</type>
-                                        <s7:S7RequestParameterReadVar>
+                                        <s7RequestParameterReadVar>
                                             <numItems>7</numItems>
                                             <items>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>6</dataType>
@@ -1220,11 +1228,11 @@
                                                         <memoryArea>132</memoryArea>
                                                         <byteOffset>44</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>2</dataType>
@@ -1233,11 +1241,11 @@
                                                         <memoryArea>132</memoryArea>
                                                         <byteOffset>52</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>1</dataType>
@@ -1246,11 +1254,11 @@
                                                         <memoryArea>132</memoryArea>
                                                         <byteOffset>53</byteOffset>
                                                         <bitOffset>1</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>5</dataType>
@@ -1259,11 +1267,11 @@
                                                         <memoryArea>132</memoryArea>
                                                         <byteOffset>42</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>2</dataType>
@@ -1272,11 +1280,11 @@
                                                         <memoryArea>132</memoryArea>
                                                         <byteOffset>51</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>4</dataType>
@@ -1285,11 +1293,11 @@
                                                         <memoryArea>132</memoryArea>
                                                         <byteOffset>40</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>2</dataType>
@@ -1298,18 +1306,20 @@
                                                         <memoryArea>132</memoryArea>
                                                         <byteOffset>50</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                             </items>
-                                        </s7:S7RequestParameterReadVar>
+                                        </s7RequestParameterReadVar>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7RequestPayloadReadVar/>
+                                        <s7RequestPayloadReadVar>
+                                            <data/>
+                                        </s7RequestPayloadReadVar>
                                     </payload>
                                 </payloads>
-                            </s7:S7RequestMessage>
+                            </s7RequestMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>
@@ -1336,14 +1346,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>3</type>
-                            <s7:S7ResponseMessage>
+                            <s7ResponseMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>1</tpduReference>
                                 <parametersLength>2</parametersLength>
@@ -1353,14 +1363,14 @@
                                 <parameters>
                                     <parameter>
                                         <type>4</type>
-                                        <s7:S7ResponseParameterReadVar>
+                                        <s7ResponseParameterReadVar>
                                             <numItems>7</numItems>
-                                        </s7:S7ResponseParameterReadVar>
+                                        </s7ResponseParameterReadVar>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7ResponsePayloadReadVar>
+                                        <s7ResponsePayloadReadVar>
                                             <numItems>7</numItems>
                                             <item>
                                                 <returnCode>255</returnCode>
@@ -1414,10 +1424,10 @@
                                                 <lengthInBytes>1</lengthInBytes>
                                                 <data>00</data>
                                             </item>
-                                        </s7:S7ResponsePayloadReadVar>
+                                        </s7ResponsePayloadReadVar>
                                     </payload>
                                 </payloads>
-                            </s7:S7ResponseMessage>
+                            </s7ResponseMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>
@@ -1444,14 +1454,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>3</type>
-                            <s7:S7ResponseMessage>
+                            <s7ResponseMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>1</tpduReference>
                                 <parametersLength>2</parametersLength>
@@ -1461,14 +1471,14 @@
                                 <parameters>
                                     <parameter>
                                         <type>4</type>
-                                        <s7:S7ResponseParameterReadVar>
+                                        <s7ResponseParameterReadVar>
                                             <numItems>3</numItems>
-                                        </s7:S7ResponseParameterReadVar>
+                                        </s7ResponseParameterReadVar>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7ResponsePayloadReadVar>
+                                        <s7ResponsePayloadReadVar>
                                             <numItems>3</numItems>
                                             <item>
                                                 <returnCode>255</returnCode>
@@ -1493,10 +1503,10 @@
                                                 <lengthInBytes>1</lengthInBytes>
                                                 <data>00</data>
                                             </item>
-                                        </s7:S7ResponsePayloadReadVar>
+                                        </s7ResponsePayloadReadVar>
                                     </payload>
                                 </payloads>
-                            </s7:S7ResponseMessage>
+                            </s7ResponseMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>
@@ -1523,14 +1533,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>1</type>
-                            <s7:S7RequestMessage>
+                            <s7RequestMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>1</tpduReference>
                                 <parametersLength>38</parametersLength>
@@ -1538,12 +1548,12 @@
                                 <parameters>
                                     <parameter>
                                         <type>4</type>
-                                        <s7:S7RequestParameterReadVar>
+                                        <s7RequestParameterReadVar>
                                             <numItems>3</numItems>
                                             <items>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>6</dataType>
@@ -1552,11 +1562,11 @@
                                                         <memoryArea>132</memoryArea>
                                                         <byteOffset>44</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>5</dataType>
@@ -1565,11 +1575,11 @@
                                                         <memoryArea>132</memoryArea>
                                                         <byteOffset>42</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>4</dataType>
@@ -1578,18 +1588,20 @@
                                                         <memoryArea>132</memoryArea>
                                                         <byteOffset>40</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                             </items>
-                                        </s7:S7RequestParameterReadVar>
+                                        </s7RequestParameterReadVar>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7RequestPayloadReadVar/>
+                                        <s7RequestPayloadReadVar>
+                                            <data/>
+                                        </s7RequestPayloadReadVar>
                                     </payload>
                                 </payloads>
-                            </s7:S7RequestMessage>
+                            </s7RequestMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>
@@ -1616,14 +1628,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>3</type>
-                            <s7:S7ResponseMessage>
+                            <s7ResponseMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>1</tpduReference>
                                 <parametersLength>2</parametersLength>
@@ -1633,14 +1645,14 @@
                                 <parameters>
                                     <parameter>
                                         <type>4</type>
-                                        <s7:S7ResponseParameterReadVar>
+                                        <s7ResponseParameterReadVar>
                                             <numItems>3</numItems>
-                                        </s7:S7ResponseParameterReadVar>
+                                        </s7ResponseParameterReadVar>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7ResponsePayloadReadVar>
+                                        <s7ResponsePayloadReadVar>
                                             <numItems>3</numItems>
                                             <item>
                                                 <returnCode>255</returnCode>
@@ -1663,10 +1675,10 @@
                                                 <lengthInBytes>2</lengthInBytes>
                                                 <data>0000</data>
                                             </item>
-                                        </s7:S7ResponsePayloadReadVar>
+                                        </s7ResponsePayloadReadVar>
                                     </payload>
                                 </payloads>
-                            </s7:S7ResponseMessage>
+                            </s7ResponseMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>
@@ -1693,14 +1705,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>1</type>
-                            <s7:S7RequestMessage>
+                            <s7RequestMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>1</tpduReference>
                                 <parametersLength>50</parametersLength>
@@ -1708,12 +1720,12 @@
                                 <parameters>
                                     <parameter>
                                         <type>4</type>
-                                        <s7:S7RequestParameterReadVar>
+                                        <s7RequestParameterReadVar>
                                             <numItems>4</numItems>
                                             <items>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>2</dataType>
@@ -1722,11 +1734,11 @@
                                                         <memoryArea>132</memoryArea>
                                                         <byteOffset>42</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>1</dataType>
@@ -1735,11 +1747,11 @@
                                                         <memoryArea>132</memoryArea>
                                                         <byteOffset>43</byteOffset>
                                                         <bitOffset>1</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>2</dataType>
@@ -1748,11 +1760,11 @@
                                                         <memoryArea>132</memoryArea>
                                                         <byteOffset>41</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>2</dataType>
@@ -1761,18 +1773,20 @@
                                                         <memoryArea>132</memoryArea>
                                                         <byteOffset>40</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                             </items>
-                                        </s7:S7RequestParameterReadVar>
+                                        </s7RequestParameterReadVar>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7RequestPayloadReadVar/>
+                                        <s7RequestPayloadReadVar>
+                                            <data/>
+                                        </s7RequestPayloadReadVar>
                                     </payload>
                                 </payloads>
-                            </s7:S7RequestMessage>
+                            </s7RequestMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>
@@ -1799,14 +1813,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>3</type>
-                            <s7:S7ResponseMessage>
+                            <s7ResponseMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>1</tpduReference>
                                 <parametersLength>2</parametersLength>
@@ -1816,14 +1830,14 @@
                                 <parameters>
                                     <parameter>
                                         <type>4</type>
-                                        <s7:S7ResponseParameterReadVar>
+                                        <s7ResponseParameterReadVar>
                                             <numItems>4</numItems>
-                                        </s7:S7ResponseParameterReadVar>
+                                        </s7ResponseParameterReadVar>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7ResponsePayloadReadVar>
+                                        <s7ResponsePayloadReadVar>
                                             <numItems>4</numItems>
                                             <item>
                                                 <returnCode>255</returnCode>
@@ -1856,10 +1870,10 @@
                                                 <lengthInBytes>1</lengthInBytes>
                                                 <data>00</data>
                                             </item>
-                                        </s7:S7ResponsePayloadReadVar>
+                                        </s7ResponsePayloadReadVar>
                                     </payload>
                                 </payloads>
-                            </s7:S7ResponseMessage>
+                            </s7ResponseMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>
@@ -1887,14 +1901,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>1</type>
-                            <s7:S7RequestMessage>
+                            <s7RequestMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>6144</tpduReference>
                                 <parametersLength>14</parametersLength>
@@ -1902,12 +1916,12 @@
                                 <parameters>
                                     <parameter>
                                         <type>5</type>
-                                        <s7:S7RequestParameterWriteVar>
+                                        <s7RequestParameterWriteVar>
                                             <numItems>1</numItems>
                                             <items>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterWriteVarAnyItem>
+                                                    <s7RequestParameterWriteVarAnyItem>
                                                         <itemLength>10</itemLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>8</dataType>
@@ -1916,15 +1930,15 @@
                                                         <memoryArea>131</memoryArea>
                                                         <byteOffset>16</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterWriteVarAnyItem>
+                                                    </s7RequestParameterWriteVarAnyItem>
                                                 </item>
                                             </items>
-                                        </s7:S7RequestParameterWriteVar>
+                                        </s7RequestParameterWriteVar>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7RequestPayloadWriteVar>
+                                        <s7RequestPayloadWriteVar>
                                             <numItems>1</numItems>
                                             <item>
                                                 <returnCode>0</returnCode>
@@ -1933,10 +1947,10 @@
                                                 <lengthInBytes>4</lengthInBytes>
                                                 <data>79E9F642</data>
                                             </item>
-                                        </s7:S7RequestPayloadWriteVar>
+                                        </s7RequestPayloadWriteVar>
                                     </payload>
                                 </payloads>
-                            </s7:S7RequestMessage>
+                            </s7RequestMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>
@@ -1962,14 +1976,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>3</type>
-                            <s7:S7ResponseMessage>
+                            <s7ResponseMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>6144</tpduReference>
                                 <parametersLength>2</parametersLength>
@@ -1979,22 +1993,22 @@
                                 <parameters>
                                     <parameter>
                                         <type>5</type>
-                                        <s7:S7ResponseParameterWriteVar>
+                                        <s7ResponseParameterWriteVar>
                                             <numItems>1</numItems>
-                                        </s7:S7ResponseParameterWriteVar>
+                                        </s7ResponseParameterWriteVar>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7ResponsePayloadWriteVar>
+                                        <s7ResponsePayloadWriteVar>
                                             <numItems>1</numItems>
                                             <item>
                                                 <returnCode>255</returnCode>
                                             </item>
-                                        </s7:S7ResponsePayloadWriteVar>
+                                        </s7ResponsePayloadWriteVar>
                                     </payload>
                                 </payloads>
-                            </s7:S7ResponseMessage>
+                            </s7ResponseMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>
@@ -2022,14 +2036,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>1</type>
-                            <s7:S7RequestMessage>
+                            <s7RequestMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>6912</tpduReference>
                                 <parametersLength>62</parametersLength>
@@ -2037,12 +2051,12 @@
                                 <parameters>
                                     <parameter>
                                         <type>4</type>
-                                        <s7:S7RequestParameterReadVar>
+                                        <s7RequestParameterReadVar>
                                             <numItems>5</numItems>
                                             <items>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>2</dataType>
@@ -2051,11 +2065,11 @@
                                                         <memoryArea>131</memoryArea>
                                                         <byteOffset>0</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>2</dataType>
@@ -2064,11 +2078,11 @@
                                                         <memoryArea>129</memoryArea>
                                                         <byteOffset>0</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>2</dataType>
@@ -2077,11 +2091,11 @@
                                                         <memoryArea>130</memoryArea>
                                                         <byteOffset>0</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>29</dataType>
@@ -2090,11 +2104,11 @@
                                                         <memoryArea>29</memoryArea>
                                                         <byteOffset>0</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterReadVarAnyItem>
+                                                    <s7RequestParameterReadVarAnyItem>
                                                         <paramLength>10</paramLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>28</dataType>
@@ -2103,18 +2117,20 @@
                                                         <memoryArea>28</memoryArea>
                                                         <byteOffset>0</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterReadVarAnyItem>
+                                                    </s7RequestParameterReadVarAnyItem>
                                                 </item>
                                             </items>
-                                        </s7:S7RequestParameterReadVar>
+                                        </s7RequestParameterReadVar>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7RequestPayloadReadVar/>
+                                        <s7RequestPayloadReadVar>
+                                            <data/>
+                                        </s7RequestPayloadReadVar>
                                     </payload>
                                 </payloads>
-                            </s7:S7RequestMessage>
+                            </s7RequestMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>
@@ -2142,14 +2158,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>3</type>
-                            <s7:S7ResponseMessage>
+                            <s7ResponseMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>6912</tpduReference>
                                 <parametersLength>2</parametersLength>
@@ -2159,14 +2175,14 @@
                                 <parameters>
                                     <parameter>
                                         <type>4</type>
-                                        <s7:S7ResponseParameterReadVar>
+                                        <s7ResponseParameterReadVar>
                                             <numItems>5</numItems>
-                                        </s7:S7ResponseParameterReadVar>
+                                        </s7ResponseParameterReadVar>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7ResponsePayloadReadVar>
+                                        <s7ResponsePayloadReadVar>
                                             <numItems>5</numItems>
                                             <item>
                                                 <returnCode>255</returnCode>
@@ -2203,10 +2219,10 @@
                                                 <lengthInBytes>16</lengthInBytes>
                                                 <data>00110000000000000000000000000000</data>
                                             </item>
-                                        </s7:S7ResponsePayloadReadVar>
+                                        </s7ResponsePayloadReadVar>
                                     </payload>
                                 </payloads>
-                            </s7:S7ResponseMessage>
+                            </s7ResponseMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>
@@ -2234,14 +2250,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>1</type>
-                            <s7:S7RequestMessage>
+                            <s7RequestMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>6656</tpduReference>
                                 <parametersLength>62</parametersLength>
@@ -2249,12 +2265,12 @@
                                 <parameters>
                                     <parameter>
                                         <type>5</type>
-                                        <s7:S7RequestParameterWriteVar>
+                                        <s7RequestParameterWriteVar>
                                             <numItems>5</numItems>
                                             <items>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterWriteVarAnyItem>
+                                                    <s7RequestParameterWriteVarAnyItem>
                                                         <itemLength>10</itemLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>4</dataType>
@@ -2263,11 +2279,11 @@
                                                         <memoryArea>131</memoryArea>
                                                         <byteOffset>0</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterWriteVarAnyItem>
+                                                    </s7RequestParameterWriteVarAnyItem>
                                                 </item>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterWriteVarAnyItem>
+                                                    <s7RequestParameterWriteVarAnyItem>
                                                         <itemLength>10</itemLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>2</dataType>
@@ -2276,11 +2292,11 @@
                                                         <memoryArea>129</memoryArea>
                                                         <byteOffset>0</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterWriteVarAnyItem>
+                                                    </s7RequestParameterWriteVarAnyItem>
                                                 </item>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterWriteVarAnyItem>
+                                                    <s7RequestParameterWriteVarAnyItem>
                                                         <itemLength>10</itemLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>2</dataType>
@@ -2289,11 +2305,11 @@
                                                         <memoryArea>130</memoryArea>
                                                         <byteOffset>0</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterWriteVarAnyItem>
+                                                    </s7RequestParameterWriteVarAnyItem>
                                                 </item>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterWriteVarAnyItem>
+                                                    <s7RequestParameterWriteVarAnyItem>
                                                         <itemLength>10</itemLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>29</dataType>
@@ -2302,11 +2318,11 @@
                                                         <memoryArea>29</memoryArea>
                                                         <byteOffset>0</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterWriteVarAnyItem>
+                                                    </s7RequestParameterWriteVarAnyItem>
                                                 </item>
                                                 <item>
                                                     <type>18</type>
-                                                    <s7:S7RequestParameterWriteVarAnyItem>
+                                                    <s7RequestParameterWriteVarAnyItem>
                                                         <itemLength>10</itemLength>
                                                         <addressingMode>16</addressingMode>
                                                         <dataType>28</dataType>
@@ -2315,15 +2331,15 @@
                                                         <memoryArea>28</memoryArea>
                                                         <byteOffset>0</byteOffset>
                                                         <bitOffset>0</bitOffset>
-                                                    </s7:S7RequestParameterWriteVarAnyItem>
+                                                    </s7RequestParameterWriteVarAnyItem>
                                                 </item>
                                             </items>
-                                        </s7:S7RequestParameterWriteVar>
+                                        </s7RequestParameterWriteVar>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7RequestPayloadWriteVar>
+                                        <s7RequestPayloadWriteVar>
                                             <numItems>5</numItems>
                                             <item>
                                                 <returnCode>0</returnCode>
@@ -2360,10 +2376,10 @@
                                                 <lengthInBytes>16</lengthInBytes>
                                                 <data>FECAFECAFECAFECAFECAFECAFECAFECA</data>
                                             </item>
-                                        </s7:S7RequestPayloadWriteVar>
+                                        </s7RequestPayloadWriteVar>
                                     </payload>
                                 </payloads>
-                            </s7:S7RequestMessage>
+                            </s7RequestMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>
@@ -2389,14 +2405,14 @@
                     <userData>
                         <headerLength>2</headerLength>
                         <type>240</type>
-                        <s7:CotpTpduData>
+                        <cotpTpduData>
                             <endOfTransmission>1</endOfTransmission>
                             <tpduRef>0</tpduRef>
-                        </s7:CotpTpduData>
+                        </cotpTpduData>
                         <userData>
                             <magicByte>50</magicByte>
                             <type>3</type>
-                            <s7:S7ResponseMessage>
+                            <s7ResponseMessage>
                                 <reserved>0</reserved>
                                 <tpduReference>6656</tpduReference>
                                 <parametersLength>2</parametersLength>
@@ -2406,14 +2422,14 @@
                                 <parameters>
                                     <parameter>
                                         <type>5</type>
-                                        <s7:S7ResponseParameterWriteVar>
+                                        <s7ResponseParameterWriteVar>
                                             <numItems>5</numItems>
-                                        </s7:S7ResponseParameterWriteVar>
+                                        </s7ResponseParameterWriteVar>
                                     </parameter>
                                 </parameters>
                                 <payloads>
                                     <payload>
-                                        <s7:S7ResponsePayloadWriteVar>
+                                        <s7ResponsePayloadWriteVar>
                                             <numItems>5</numItems>
                                             <item>
                                                 <returnCode>255</returnCode>
@@ -2430,10 +2446,10 @@
                                             <item>
                                                 <returnCode>3</returnCode>
                                             </item>
-                                        </s7:S7ResponsePayloadWriteVar>
+                                        </s7ResponsePayloadWriteVar>
                                     </payload>
                                 </payloads>
-                            </s7:S7ResponseMessage>
+                            </s7ResponseMessage>
                         </userData>
                     </userData>
                 </s7:TpktMessage>


[plc4x] 02/02: - Refactored the schema definitions to be split up into simple types and complex types.

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch feature/code-gen
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit e96d3da677e08f88223ec0f573484cae3f174f82
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed May 8 22:32:06 2019 +0200

    - Refactored the schema definitions to be split up into simple types and complex types.
---
 protocols/knxnet-ip/pom.xml                        |  11 +-
 protocols/knxnet-ip/src/main/java/.keepMe          |  20 --
 .../plc4x/protocols/knxnetip/protocol.dfdl.xsd     | 275 +++++++++-----------
 protocols/{knxnet-ip => plc4x}/pom.xml             |  15 +-
 .../main/resources/daffodil-built-in-catalog.xml}  |  27 +-
 .../org/apache/plc4x/protocols/protocol.dfdl.xsd   | 227 ++++++++++++++++
 protocols/pom.xml                                  |   3 +
 protocols/s7/pom.xml                               |   7 +
 .../main/resources/daffodil-built-in-catalog.xml   |   5 +
 .../org/apache/plc4x/protocols/protocol.dfdl.xsd   | 227 ++++++++++++++++
 .../apache/plc4x/protocols/s7/protocol.dfdl.xsd    | 286 +++++++++------------
 .../org/apache/plc4x/protocols/s7/protocol.tdml    |  46 ++--
 12 files changed, 752 insertions(+), 397 deletions(-)

diff --git a/protocols/knxnet-ip/pom.xml b/protocols/knxnet-ip/pom.xml
index 901a260..8631133 100644
--- a/protocols/knxnet-ip/pom.xml
+++ b/protocols/knxnet-ip/pom.xml
@@ -17,7 +17,9 @@
   specific language governing permissions and limitations
   under the License.
   -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
 
@@ -33,6 +35,13 @@
   <description>Base protocol specifications for the KNX Net-IP protocol</description>
 
   <dependencies>
+    <!-- Import the base types -->
+    <dependency>
+      <groupId>org.apache.plc4x</groupId>
+      <artifactId>plc4x-protocols-plc4x</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+
     <dependency>
       <groupId>org.apache.plc4x</groupId>
       <artifactId>plc4x-protocols-test-utils</artifactId>
diff --git a/protocols/knxnet-ip/src/main/java/.keepMe b/protocols/knxnet-ip/src/main/java/.keepMe
deleted file mode 100644
index 97c6314..0000000
--- a/protocols/knxnet-ip/src/main/java/.keepMe
+++ /dev/null
@@ -1,20 +0,0 @@
-
-  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.
-
-This file is required to force the existence of the src/main/java directory
-which activates the "java-module" maven profile.
-
-PLEASE DO NOT DELETE ... it will break the build.
\ No newline at end of file
diff --git a/protocols/knxnet-ip/src/main/resources/org/apache/plc4x/protocols/knxnetip/protocol.dfdl.xsd b/protocols/knxnet-ip/src/main/resources/org/apache/plc4x/protocols/knxnetip/protocol.dfdl.xsd
index c65d17a..b2fe71c 100644
--- a/protocols/knxnet-ip/src/main/resources/org/apache/plc4x/protocols/knxnetip/protocol.dfdl.xsd
+++ b/protocols/knxnet-ip/src/main/resources/org/apache/plc4x/protocols/knxnetip/protocol.dfdl.xsd
@@ -19,6 +19,7 @@
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/"
            xmlns:knx="http://plc4x.apache.org/knxnet-ip"
+           xmlns:plc4x="http://plc4x.apache.org/plc4x"
            targetNamespace="http://plc4x.apache.org/knxnet-ip">
 
     <xs:annotation>
@@ -49,48 +50,6 @@
 
     <!--
 
-        Simple type definition.
-
-    -->
-
-    <xs:simpleType name="bit" dfdl:lengthUnits="bits" dfdl:length="1" dfdl:lengthKind="explicit">
-        <xs:restriction base="xs:boolean"/>
-    </xs:simpleType>
-
-    <xs:simpleType name="unsigned3bit" dfdl:lengthUnits="bits" dfdl:length="3" dfdl:lengthKind="explicit">
-        <xs:restriction base="xs:unsignedByte"/>
-    </xs:simpleType>
-
-    <xs:simpleType name="unsigned4bit" dfdl:lengthUnits="bits" dfdl:length="4" dfdl:lengthKind="explicit">
-        <xs:restriction base="xs:unsignedByte"/>
-    </xs:simpleType>
-
-    <xs:simpleType name="unsigned7bit" dfdl:lengthUnits="bits" dfdl:length="7" dfdl:lengthKind="explicit">
-        <xs:restriction base="xs:unsignedByte"/>
-    </xs:simpleType>
-
-    <xs:simpleType name="unsigned12bit" dfdl:lengthUnits="bits" dfdl:length="12" dfdl:lengthKind="explicit">
-        <xs:restriction base="xs:unsignedShort"/>
-    </xs:simpleType>
-
-    <xs:simpleType name="byte" dfdl:lengthUnits="bytes" dfdl:length="1" dfdl:lengthKind="explicit">
-        <xs:restriction base="xs:unsignedByte"/>
-    </xs:simpleType>
-
-    <xs:simpleType name="short" dfdl:lengthUnits="bytes" dfdl:length="2" dfdl:lengthKind="explicit">
-        <xs:restriction base="xs:unsignedShort"/>
-    </xs:simpleType>
-
-    <xs:simpleType name="hexByte" dfdl:lengthUnits="bytes" dfdl:length="1" dfdl:lengthKind="explicit">
-        <xs:restriction base="xs:hexBinary"/>
-    </xs:simpleType>
-
-    <xs:simpleType name="ipAddress" dfdl:lengthUnits="bytes" dfdl:length="4" dfdl:lengthKind="explicit">
-        <xs:restriction base="xs:hexBinary"/>
-    </xs:simpleType>
-
-    <!--
-
         TPKT - Iso-On-TCP
 
     -->
@@ -99,11 +58,11 @@
 
     <xs:complexType name="KNXNetIPMessageType">
         <xs:sequence>
-            <xs:element name="headerLength" type="knx:byte" fixed="06"/>
-            <xs:element name="protocolVersion" type="knx:byte" fixed="10"/>
-            <xs:element name="type" type="knx:short"/>
+            <xs:element name="headerLength" type="plc4x:uint8" fixed="06"/>
+            <xs:element name="protocolVersion" type="plc4x:uint8" fixed="10"/>
+            <xs:element name="type" type="plc4x:uint16"/>
             <!-- length of the entire message (including header) -->
-            <xs:element name="totalLength" type="knx:short"/>
+            <xs:element name="totalLength" type="plc4x:uint16"/>
             <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
                 <xs:element dfdl:choiceBranchKey="513" name="SearchRequest" type="knx:SearchRequest"/>
                 <xs:element dfdl:choiceBranchKey="514" name="SearchResponse" type="knx:SearchResponse"/>
@@ -128,10 +87,10 @@
             <xs:element name="HPAIDiscoveryEndpoint">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element name="structureLength" type="knx:byte"/>
-                        <xs:element name="hostProtocolCode" type="knx:byte"/>
-                        <xs:element name="ipAddress" type="knx:ipAddress" />
-                        <xs:element name="ipPort" type="knx:short"/>
+                        <xs:element name="structureLength" type="plc4x:uint8"/>
+                        <xs:element name="hostProtocolCode" type="plc4x:uint8"/>
+                        <xs:element name="ipAddress" type="plc4x:byte8" />
+                        <xs:element name="ipPort" type="plc4x:uint16"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -143,25 +102,25 @@
             <xs:element name="HPAIControlEndpoint">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element name="structureLength" type="knx:byte"/>
-                        <xs:element name="hostProtocolCode" type="knx:byte"/>
-                        <xs:element name="ipAddress" type="knx:ipAddress" />
-                        <xs:element name="ipPort" type="knx:short"/>
+                        <xs:element name="structureLength" type="plc4x:uint8"/>
+                        <xs:element name="hostProtocolCode" type="plc4x:uint8"/>
+                        <xs:element name="ipAddress" type="plc4x:byte8" />
+                        <xs:element name="ipPort" type="plc4x:uint16"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="DIBDeviceInfo">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element name="structureLength" type="knx:byte"/>
-                        <xs:element name="descriptionType" type="knx:byte"/>
-                        <xs:element name="knxMedium" type="knx:byte"/>
+                        <xs:element name="structureLength" type="plc4x:uint8"/>
+                        <xs:element name="descriptionType" type="plc4x:uint8"/>
+                        <xs:element name="knxMedium" type="plc4x:uint8"/>
                         <xs:element name="deviceStatus">
                             <xs:complexType>
                                 <xs:sequence>
                                     <xs:sequence>
-                                        <xs:element name="reserved" type="knx:unsigned7bit"/>
-                                        <xs:element name="programMode" type="knx:bit"/>
+                                        <xs:element name="reserved" type="plc4x:uint7"/>
+                                        <xs:element name="programMode" type="plc4x:bit"/>
                                     </xs:sequence>
                                 </xs:sequence>
                             </xs:complexType>
@@ -170,15 +129,15 @@
                         <xs:element name="projectInstallationIdentifier">
                             <xs:complexType>
                                 <xs:sequence>
-                                    <xs:element name="projectNumber" type="knx:byte"/>
-                                    <xs:element name="installationNumber" type="knx:byte"/>
+                                    <xs:element name="projectNumber" type="plc4x:uint8"/>
+                                    <xs:element name="installationNumber" type="plc4x:uint8"/>
                                 </xs:sequence>
                             </xs:complexType>
                         </xs:element>
                         <xs:element name="knxNetIpDeviceSerialNumber" type="xs:hexBinary"
                                     dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes"
                                     dfdl:length="6"/>
-                        <xs:element name="knxNetIpDeviceMulticastAddress" type="knx:ipAddress"/>
+                        <xs:element name="knxNetIpDeviceMulticastAddress" type="plc4x:byte8"/>
                         <xs:element name="knxNetIpDeviceMacAddress" type="xs:hexBinary"
                                     dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes"
                                     dfdl:length="6"/>
@@ -192,34 +151,34 @@
             <xs:element name="DIBSuppSvcFamilies">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element name="structureLength" type="knx:byte"/>
-                        <xs:element name="descriptionType" type="knx:byte"/>
+                        <xs:element name="structureLength" type="plc4x:uint8"/>
+                        <xs:element name="descriptionType" type="plc4x:uint8"/>
                         <xs:element name="serviceIds">
                             <xs:complexType>
                                 <xs:sequence>
                                     <xs:element name="serviceId" maxOccurs="unbounded">
                                         <xs:complexType>
                                             <xs:sequence>
-                                                <xs:element name="type" type="knx:byte"/>
+                                                <xs:element name="type" type="plc4x:uint8"/>
                                                 <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
                                                     <xs:element dfdl:choiceBranchKey="2" name="KnxNetIpCore">
                                                         <xs:complexType>
                                                             <xs:sequence>
-                                                                <xs:element name="version" type="knx:byte"/>
+                                                                <xs:element name="version" type="plc4x:uint8"/>
                                                             </xs:sequence>
                                                         </xs:complexType>
                                                     </xs:element>
                                                     <xs:element dfdl:choiceBranchKey="3" name="KnxNetIpDeviceManagement">
                                                         <xs:complexType>
                                                             <xs:sequence>
-                                                                <xs:element name="version" type="knx:byte"/>
+                                                                <xs:element name="version" type="plc4x:uint8"/>
                                                             </xs:sequence>
                                                         </xs:complexType>
                                                     </xs:element>
                                                     <xs:element dfdl:choiceBranchKey="4" name="KnxNetIpTunneling">
                                                         <xs:complexType>
                                                             <xs:sequence>
-                                                                <xs:element name="version" type="knx:byte"/>
+                                                                <xs:element name="version" type="plc4x:uint8"/>
                                                             </xs:sequence>
                                                         </xs:complexType>
                                                     </xs:element>
@@ -241,10 +200,10 @@
             <xs:element name="HPAIControlEndpoint">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element name="structureLength" type="knx:byte"/>
-                        <xs:element name="hostProtocolCode" type="knx:byte"/>
-                        <xs:element name="ipAddress" type="knx:ipAddress" />
-                        <xs:element name="ipPort" type="knx:short"/>
+                        <xs:element name="structureLength" type="plc4x:uint8"/>
+                        <xs:element name="hostProtocolCode" type="plc4x:uint8"/>
+                        <xs:element name="ipAddress" type="plc4x:byte8" />
+                        <xs:element name="ipPort" type="plc4x:uint16"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -257,15 +216,15 @@
             <xs:element name="DIBDeviceInfo">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element name="structureLength" type="knx:byte"/>
-                        <xs:element name="descriptionType" type="knx:byte"/>
-                        <xs:element name="knxMedium" type="knx:byte"/>
+                        <xs:element name="structureLength" type="plc4x:uint8"/>
+                        <xs:element name="descriptionType" type="plc4x:uint8"/>
+                        <xs:element name="knxMedium" type="plc4x:uint8"/>
                         <xs:element name="deviceStatus">
                             <xs:complexType>
                                 <xs:sequence>
                                     <xs:sequence>
-                                        <xs:element name="reserved" type="knx:unsigned7bit"/>
-                                        <xs:element name="programMode" type="knx:bit"/>
+                                        <xs:element name="reserved" type="plc4x:uint7"/>
+                                        <xs:element name="programMode" type="plc4x:bit"/>
                                     </xs:sequence>
                                 </xs:sequence>
                             </xs:complexType>
@@ -274,15 +233,15 @@
                         <xs:element name="projectInstallationIdentifier">
                             <xs:complexType>
                                 <xs:sequence>
-                                    <xs:element name="projectNumber" type="knx:byte"/>
-                                    <xs:element name="installationNumber" type="knx:byte"/>
+                                    <xs:element name="projectNumber" type="plc4x:uint8"/>
+                                    <xs:element name="installationNumber" type="plc4x:uint8"/>
                                 </xs:sequence>
                             </xs:complexType>
                         </xs:element>
                         <xs:element name="knxNetIpDeviceSerialNumber" type="xs:hexBinary"
                                     dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes"
                                     dfdl:length="6"/>
-                        <xs:element name="knxNetIpDeviceMulticastAddress" type="knx:ipAddress"/>
+                        <xs:element name="knxNetIpDeviceMulticastAddress" type="plc4x:byte8"/>
                         <xs:element name="knxNetIpDeviceMacAddress" type="xs:hexBinary"
                                     dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes"
                                     dfdl:length="6"/>
@@ -296,34 +255,34 @@
             <xs:element name="DIBSuppSvcFamilies">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element name="structureLength" type="knx:byte"/>
-                        <xs:element name="descriptionType" type="knx:byte"/>
+                        <xs:element name="structureLength" type="plc4x:uint8"/>
+                        <xs:element name="descriptionType" type="plc4x:uint8"/>
                         <xs:element name="serviceIds">
                             <xs:complexType>
                                 <xs:sequence>
                                     <xs:element name="serviceId" maxOccurs="unbounded">
                                         <xs:complexType>
                                             <xs:sequence>
-                                                <xs:element name="type" type="knx:byte"/>
+                                                <xs:element name="type" type="plc4x:uint8"/>
                                                 <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
                                                     <xs:element dfdl:choiceBranchKey="2" name="KnxNetIpCore">
                                                         <xs:complexType>
                                                             <xs:sequence>
-                                                                <xs:element name="version" type="knx:byte"/>
+                                                                <xs:element name="version" type="plc4x:uint8"/>
                                                             </xs:sequence>
                                                         </xs:complexType>
                                                     </xs:element>
                                                     <xs:element dfdl:choiceBranchKey="3" name="KnxNetIpDeviceManagement">
                                                         <xs:complexType>
                                                             <xs:sequence>
-                                                                <xs:element name="version" type="knx:byte"/>
+                                                                <xs:element name="version" type="plc4x:uint8"/>
                                                             </xs:sequence>
                                                         </xs:complexType>
                                                     </xs:element>
                                                     <xs:element dfdl:choiceBranchKey="4" name="KnxNetIpTunneling">
                                                         <xs:complexType>
                                                             <xs:sequence>
-                                                                <xs:element name="version" type="knx:byte"/>
+                                                                <xs:element name="version" type="plc4x:uint8"/>
                                                             </xs:sequence>
                                                         </xs:complexType>
                                                     </xs:element>
@@ -345,30 +304,30 @@
             <xs:element name="HPAIDiscoveryEndpoint">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element name="structureLength" type="knx:byte"/>
-                        <xs:element name="hostProtocolCode" type="knx:byte"/>
-                        <xs:element name="ipAddress" type="knx:ipAddress" />
-                        <xs:element name="ipPort" type="knx:short"/>
+                        <xs:element name="structureLength" type="plc4x:uint8"/>
+                        <xs:element name="hostProtocolCode" type="plc4x:uint8"/>
+                        <xs:element name="ipAddress" type="plc4x:byte8" />
+                        <xs:element name="ipPort" type="plc4x:uint16"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="HPAIDataEndpoint">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element name="structureLength" type="knx:byte"/>
-                        <xs:element name="hostProtocolCode" type="knx:byte"/>
-                        <xs:element name="ipAddress" type="knx:ipAddress" />
-                        <xs:element name="ipPort" type="knx:short"/>
+                        <xs:element name="structureLength" type="plc4x:uint8"/>
+                        <xs:element name="hostProtocolCode" type="plc4x:uint8"/>
+                        <xs:element name="ipAddress" type="plc4x:byte8" />
+                        <xs:element name="ipPort" type="plc4x:uint16"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="ConnectionRequestInformation">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element name="structureLength" type="knx:byte"/>
-                        <xs:element name="connectionType" type="knx:byte"/>
-                        <xs:element name="knxLayer" type="knx:byte" />
-                        <xs:element name="reserved" type="knx:byte"/>
+                        <xs:element name="structureLength" type="plc4x:uint8"/>
+                        <xs:element name="connectionType" type="plc4x:uint8"/>
+                        <xs:element name="knxLayer" type="plc4x:uint8" />
+                        <xs:element name="reserved" type="plc4x:uint8"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -377,23 +336,23 @@
 
     <xs:complexType name="ConnectionResponse">
         <xs:sequence>
-            <xs:element name="communicationChannelId" type="knx:byte"/>
-            <xs:element name="status" type="knx:byte"/>
+            <xs:element name="communicationChannelId" type="plc4x:uint8"/>
+            <xs:element name="status" type="plc4x:uint8"/>
             <xs:element name="HPAIDataEndpoint">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element name="structureLength" type="knx:byte"/>
-                        <xs:element name="hostProtocolCode" type="knx:byte"/>
-                        <xs:element name="ipAddress" type="knx:ipAddress" />
-                        <xs:element name="ipPort" type="knx:short"/>
+                        <xs:element name="structureLength" type="plc4x:uint8"/>
+                        <xs:element name="hostProtocolCode" type="plc4x:uint8"/>
+                        <xs:element name="ipAddress" type="plc4x:byte8" />
+                        <xs:element name="ipPort" type="plc4x:uint16"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="ConnectionResponseDataBlock">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element name="structureLength" type="knx:byte"/>
-                        <xs:element name="connectionType" type="knx:byte"/>
+                        <xs:element name="structureLength" type="plc4x:uint8"/>
+                        <xs:element name="connectionType" type="plc4x:uint8"/>
                         <xs:element name="knxAddress" type="knx:KnxAddress"/>
                     </xs:sequence>
                 </xs:complexType>
@@ -403,15 +362,15 @@
 
     <xs:complexType name="ConnectionStateRequest">
         <xs:sequence>
-            <xs:element name="communicationChannelId" type="knx:byte"/>
-            <xs:element name="reserved" type="knx:byte"/>
+            <xs:element name="communicationChannelId" type="plc4x:uint8"/>
+            <xs:element name="reserved" type="plc4x:uint8"/>
             <xs:element name="HPAIControlEndpoint">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element name="structureLength" type="knx:byte"/>
-                        <xs:element name="hostProtocolCode" type="knx:byte"/>
-                        <xs:element name="ipAddress" type="knx:ipAddress" />
-                        <xs:element name="ipPort" type="knx:short"/>
+                        <xs:element name="structureLength" type="plc4x:uint8"/>
+                        <xs:element name="hostProtocolCode" type="plc4x:uint8"/>
+                        <xs:element name="ipAddress" type="plc4x:byte8" />
+                        <xs:element name="ipPort" type="plc4x:uint16"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -420,22 +379,22 @@
 
     <xs:complexType name="ConnectionStateResponse">
         <xs:sequence>
-            <xs:element name="communicationChannelId" type="knx:byte"/>
-            <xs:element name="status" type="knx:byte"/>
+            <xs:element name="communicationChannelId" type="plc4x:uint8"/>
+            <xs:element name="status" type="plc4x:uint8"/>
         </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="DisconnectRequest">
         <xs:sequence>
-            <xs:element name="communicationChannelId" type="knx:byte"/>
-            <xs:element name="reserved" type="knx:byte"/>
+            <xs:element name="communicationChannelId" type="plc4x:uint8"/>
+            <xs:element name="reserved" type="plc4x:uint8"/>
             <xs:element name="HPAIControlEndpoint">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element name="structureLength" type="knx:byte"/>
-                        <xs:element name="hostProtocolCode" type="knx:byte"/>
-                        <xs:element name="ipAddress" type="knx:ipAddress" />
-                        <xs:element name="ipPort" type="knx:short"/>
+                        <xs:element name="structureLength" type="plc4x:uint8"/>
+                        <xs:element name="hostProtocolCode" type="plc4x:uint8"/>
+                        <xs:element name="ipAddress" type="plc4x:byte8" />
+                        <xs:element name="ipPort" type="plc4x:uint16"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -444,17 +403,17 @@
 
     <xs:complexType name="DisconnectResponse">
         <xs:sequence>
-            <xs:element name="communicationChannelId" type="knx:byte"/>
-            <xs:element name="status" type="knx:byte"/>
+            <xs:element name="communicationChannelId" type="plc4x:uint8"/>
+            <xs:element name="status" type="plc4x:uint8"/>
         </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="DeviceConfigurationRequest">
         <xs:sequence>
-            <xs:element name="structureLength" type="knx:byte"/>
-            <xs:element name="communicationChannelId" type="knx:byte"/>
-            <xs:element name="sequenceCounter" type="knx:byte"/>
-            <xs:element name="reserved" type="knx:byte"/>
+            <xs:element name="structureLength" type="plc4x:uint8"/>
+            <xs:element name="communicationChannelId" type="plc4x:uint8"/>
+            <xs:element name="sequenceCounter" type="plc4x:uint8"/>
+            <xs:element name="reserved" type="plc4x:uint8"/>
             <xs:element name="cEMI" type="knx:CEMI">
             </xs:element>
         </xs:sequence>
@@ -462,80 +421,80 @@
 
     <xs:complexType name="DeviceConfigurationResponse">
         <xs:sequence>
-            <xs:element name="structureLength" type="knx:byte"/>
-            <xs:element name="communicationChannelId" type="knx:byte"/>
-            <xs:element name="sequenceCounter" type="knx:byte"/>
-            <xs:element name="status" type="knx:byte"/>
+            <xs:element name="structureLength" type="plc4x:uint8"/>
+            <xs:element name="communicationChannelId" type="plc4x:uint8"/>
+            <xs:element name="sequenceCounter" type="plc4x:uint8"/>
+            <xs:element name="status" type="plc4x:uint8"/>
         </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="TunnelingRequest">
         <xs:sequence>
-            <xs:element name="structureLength" type="knx:byte"/>
-            <xs:element name="communicationChannelId" type="knx:byte"/>
-            <xs:element name="sequenceCounter" type="knx:byte"/>
-            <xs:element name="reserved" type="knx:byte"/>
+            <xs:element name="structureLength" type="plc4x:uint8"/>
+            <xs:element name="communicationChannelId" type="plc4x:uint8"/>
+            <xs:element name="sequenceCounter" type="plc4x:uint8"/>
+            <xs:element name="reserved" type="plc4x:uint8"/>
             <xs:element name="cEMI" type="knx:CEMI"/>
         </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="TunnelingResponse">
         <xs:sequence>
-            <xs:element name="structureLength" type="knx:byte"/>
-            <xs:element name="communicationChannelId" type="knx:byte"/>
-            <xs:element name="sequenceCounter" type="knx:byte"/>
-            <xs:element name="status" type="knx:byte"/>
+            <xs:element name="structureLength" type="plc4x:uint8"/>
+            <xs:element name="communicationChannelId" type="plc4x:uint8"/>
+            <xs:element name="sequenceCounter" type="plc4x:uint8"/>
+            <xs:element name="status" type="plc4x:uint8"/>
         </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="KnxAddress">
         <xs:sequence>
-            <xs:element name="mainGroup" type="knx:unsigned4bit"/>
-            <xs:element name="middleGroup" type="knx:unsigned4bit"/>
-            <xs:element name="subGroup" type="knx:byte"/>
+            <xs:element name="mainGroup" type="plc4x:uint4"/>
+            <xs:element name="middleGroup" type="plc4x:uint4"/>
+            <xs:element name="subGroup" type="plc4x:uint8"/>
         </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="CEMI">
         <xs:sequence>
-            <xs:element name="type" type="knx:byte"/>
+            <xs:element name="type" type="plc4x:uint8"/>
             <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
                 <xs:element dfdl:choiceBranchKey="252" name="MPropRead">
                     <xs:complexType>
                         <xs:sequence>
-                            <xs:element name="interfaceObjectType" type="knx:short"/>
-                            <xs:element name="objectInstance" type="knx:byte"/>
-                            <xs:element name="propertyIdentifyer" type="knx:byte"/>
-                            <xs:element name="numberOfElements" type="knx:unsigned4bit"/>
-                            <xs:element name="startIndex" type="knx:unsigned12bit"/>
+                            <xs:element name="interfaceObjectType" type="plc4x:uint16"/>
+                            <xs:element name="objectInstance" type="plc4x:uint8"/>
+                            <xs:element name="propertyIdentifyer" type="plc4x:uint8"/>
+                            <xs:element name="numberOfElements" type="plc4x:uint4"/>
+                            <xs:element name="startIndex" type="plc4x:uint12"/>
                         </xs:sequence>
                     </xs:complexType>
                 </xs:element>
                 <xs:element dfdl:choiceBranchKey="43" name="LBusmonInd">
                     <xs:complexType>
                         <xs:sequence>
-                            <xs:element name="additionalInformationLength" type="knx:byte"/>
+                            <xs:element name="additionalInformationLength" type="plc4x:uint8"/>
                             <xs:element name="additionalInformation">
                                 <xs:complexType>
                                     <xs:sequence>
                                         <xs:element name="additionalInformation" maxOccurs="unbounded">
                                             <xs:complexType>
                                                 <xs:sequence>
-                                                    <xs:element name="type" type="knx:byte"/>
+                                                    <xs:element name="type" type="plc4x:uint8"/>
                                                     <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
                                                         <xs:element dfdl:choiceBranchKey="3" name="BusmonitorInfo">
                                                             <xs:complexType>
                                                                 <xs:sequence>
-                                                                    <xs:element name="length" type="knx:byte"/>
+                                                                    <xs:element name="length" type="plc4x:uint8"/>
                                                                     <xs:element name="busmonitorErrorFlags">
                                                                         <xs:complexType>
                                                                             <xs:sequence>
-                                                                                <xs:element name="frameErrorFlag" type="knx:bit"/>
-                                                                                <xs:element name="bitErrorFlag" type="knx:bit"/>
-                                                                                <xs:element name="parityErrorFlag" type="knx:bit"/>
-                                                                                <xs:element name="dontCare" type="knx:bit"/>
-                                                                                <xs:element name="lostFlag" type="knx:bit"/>
-                                                                                <xs:element name="sequenceNumber" type="knx:unsigned3bit"/>
+                                                                                <xs:element name="frameErrorFlag" type="plc4x:bit"/>
+                                                                                <xs:element name="bitErrorFlag" type="plc4x:bit"/>
+                                                                                <xs:element name="parityErrorFlag" type="plc4x:bit"/>
+                                                                                <xs:element name="dontCare" type="plc4x:bit"/>
+                                                                                <xs:element name="lostFlag" type="plc4x:bit"/>
+                                                                                <xs:element name="sequenceNumber" type="plc4x:uint3"/>
                                                                             </xs:sequence>
                                                                         </xs:complexType>
                                                                     </xs:element>
@@ -545,8 +504,8 @@
                                                         <xs:element dfdl:choiceBranchKey="4" name="RelativeTimestamp">
                                                             <xs:complexType>
                                                                 <xs:sequence>
-                                                                    <xs:element name="length" type="knx:byte"/>
-                                                                    <xs:element name="relativeTimestamp" type="knx:short"/>
+                                                                    <xs:element name="length" type="plc4x:uint8"/>
+                                                                    <xs:element name="relativeTimestamp" type="plc4x:uint16"/>
                                                                 </xs:sequence>
                                                             </xs:complexType>
                                                         </xs:element>
diff --git a/protocols/knxnet-ip/pom.xml b/protocols/plc4x/pom.xml
similarity index 74%
copy from protocols/knxnet-ip/pom.xml
copy to protocols/plc4x/pom.xml
index 901a260..3d845c1 100644
--- a/protocols/knxnet-ip/pom.xml
+++ b/protocols/plc4x/pom.xml
@@ -27,18 +27,9 @@
     <version>0.4.0-SNAPSHOT</version>
   </parent>
 
-  <artifactId>plc4x-protocols-knxnet-ip</artifactId>
+  <artifactId>plc4x-protocols-plc4x</artifactId>
 
-  <name>Protocols: KNXNet-IP</name>
-  <description>Base protocol specifications for the KNX Net-IP protocol</description>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.plc4x</groupId>
-      <artifactId>plc4x-protocols-test-utils</artifactId>
-      <version>0.4.0-SNAPSHOT</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
+  <name>Protocols: PLC4X</name>
+  <description>Base protocol specifications for any form of PLC4X driver</description>
 
 </project>
\ No newline at end of file
diff --git a/protocols/knxnet-ip/pom.xml b/protocols/plc4x/src/main/resources/daffodil-built-in-catalog.xml
similarity index 50%
copy from protocols/knxnet-ip/pom.xml
copy to protocols/plc4x/src/main/resources/daffodil-built-in-catalog.xml
index 901a260..4ac9f77 100644
--- a/protocols/knxnet-ip/pom.xml
+++ b/protocols/plc4x/src/main/resources/daffodil-built-in-catalog.xml
@@ -17,28 +17,9 @@
   specific language governing permissions and limitations
   under the License.
   -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
 
-  <modelVersion>4.0.0</modelVersion>
+  <uri name="http://plc4x.apache.org/plc4x"
+       uri="org/apache/plc4x/protocols/protocol.dfdl.xsd"/>
 
-  <parent>
-    <groupId>org.apache.plc4x</groupId>
-    <artifactId>plc4x-protocols</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>plc4x-protocols-knxnet-ip</artifactId>
-
-  <name>Protocols: KNXNet-IP</name>
-  <description>Base protocol specifications for the KNX Net-IP protocol</description>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.plc4x</groupId>
-      <artifactId>plc4x-protocols-test-utils</artifactId>
-      <version>0.4.0-SNAPSHOT</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-</project>
\ No newline at end of file
+</catalog>
\ No newline at end of file
diff --git a/protocols/plc4x/src/main/resources/org/apache/plc4x/protocols/protocol.dfdl.xsd b/protocols/plc4x/src/main/resources/org/apache/plc4x/protocols/protocol.dfdl.xsd
new file mode 100644
index 0000000..544e2f3
--- /dev/null
+++ b/protocols/plc4x/src/main/resources/org/apache/plc4x/protocols/protocol.dfdl.xsd
@@ -0,0 +1,227 @@
+<!--
+  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.
+  -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/"
+           targetNamespace="http://plc4x.apache.org/plc4x">
+
+    <!--
+
+        Simple type definition.
+
+        These are the types language adapters must provide mappings for.
+
+    -->
+
+    <xs:simpleType name="null" dfdl:lengthUnits="bytes" dfdl:length="0" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:hexBinary"/>
+    </xs:simpleType>
+
+
+
+    <xs:simpleType name="bit" dfdl:lengthUnits="bits" dfdl:length="1" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:boolean"/>
+    </xs:simpleType>
+
+
+
+    <xs:simpleType name="uint2" dfdl:lengthUnits="bits" dfdl:length="2" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint3" dfdl:lengthUnits="bits" dfdl:length="3" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint4" dfdl:lengthUnits="bits" dfdl:length="4" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint5" dfdl:lengthUnits="bits" dfdl:length="5" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint6" dfdl:lengthUnits="bits" dfdl:length="6" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint7" dfdl:lengthUnits="bits" dfdl:length="7" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint8" dfdl:lengthUnits="bits" dfdl:length="8" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint9" dfdl:lengthUnits="bits" dfdl:length="9" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint10" dfdl:lengthUnits="bits" dfdl:length="10" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint11" dfdl:lengthUnits="bits" dfdl:length="11" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint12" dfdl:lengthUnits="bits" dfdl:length="12" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint13" dfdl:lengthUnits="bits" dfdl:length="13" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint14" dfdl:lengthUnits="bits" dfdl:length="14" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint15" dfdl:lengthUnits="bits" dfdl:length="15" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint16" dfdl:lengthUnits="bits" dfdl:length="16" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedShort"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint17" dfdl:lengthUnits="bits" dfdl:length="17" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint18" dfdl:lengthUnits="bits" dfdl:length="18" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint19" dfdl:lengthUnits="bits" dfdl:length="19" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint20" dfdl:lengthUnits="bits" dfdl:length="20" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint21" dfdl:lengthUnits="bits" dfdl:length="21" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint22" dfdl:lengthUnits="bits" dfdl:length="22" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint23" dfdl:lengthUnits="bits" dfdl:length="23" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint24" dfdl:lengthUnits="bits" dfdl:length="24" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint25" dfdl:lengthUnits="bits" dfdl:length="25" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint26" dfdl:lengthUnits="bits" dfdl:length="26" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint27" dfdl:lengthUnits="bits" dfdl:length="27" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint28" dfdl:lengthUnits="bits" dfdl:length="28" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint29" dfdl:lengthUnits="bits" dfdl:length="29" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint30" dfdl:lengthUnits="bits" dfdl:length="30" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint31" dfdl:lengthUnits="bits" dfdl:length="31" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint32" dfdl:lengthUnits="bits" dfdl:length="32" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedInt"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint64" dfdl:lengthUnits="bits" dfdl:length="64" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedLong"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uintN" dfdl:lengthUnits="bits" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedLong"/>
+    </xs:simpleType>
+
+
+
+    <xs:simpleType name="int8" dfdl:lengthUnits="bits" dfdl:length="8" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:byte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="int16" dfdl:lengthUnits="bits" dfdl:length="16" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:short"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="int32" dfdl:lengthUnits="bits" dfdl:length="32" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:int"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="int64" dfdl:lengthUnits="bits" dfdl:length="64" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:long"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="intN" dfdl:lengthUnits="bits" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:long"/>
+    </xs:simpleType>
+
+
+
+    <xs:simpleType name="byte8" dfdl:lengthUnits="bytes" dfdl:length="1" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:hexBinary"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="byte16" dfdl:lengthUnits="bytes" dfdl:length="2" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:hexBinary"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="byte32" dfdl:lengthUnits="bytes" dfdl:length="3" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:hexBinary"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="byte64" dfdl:lengthUnits="bytes" dfdl:length="4" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:hexBinary"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="byteN" dfdl:lengthUnits="bytes" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:hexBinary"/>
+    </xs:simpleType>
+
+
+
+
+    <xs:simpleType name="stringN" dfdl:lengthUnits="bytes" dfdl:lengthKind="explicit"
+                   dfdl:textTrimKind="none" dfdl:alignmentUnits="bytes">
+        <xs:restriction base="xs:string"/>
+    </xs:simpleType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/protocols/pom.xml b/protocols/pom.xml
index 8e08a7c..195b469 100644
--- a/protocols/pom.xml
+++ b/protocols/pom.xml
@@ -34,6 +34,9 @@
   <description>Base protocol specifications.</description>
 
   <modules>
+    <!-- Base definitions of the simple types used by all drivers -->
+    <module>plc4x</module>
+
     <!-- DFDL and SCXML based protocols -->
     <module>knxnet-ip</module>
     <module>s7</module>
diff --git a/protocols/s7/pom.xml b/protocols/s7/pom.xml
index 16d6de6..43b6153 100644
--- a/protocols/s7/pom.xml
+++ b/protocols/s7/pom.xml
@@ -33,6 +33,13 @@
   <description>Base protocol specifications for the Siemens S7 protocol</description>
 
   <dependencies>
+    <!-- Import the base types -->
+    <dependency>
+      <groupId>org.apache.plc4x</groupId>
+      <artifactId>plc4x-protocols-plc4x</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+
     <dependency>
       <groupId>org.apache.plc4x</groupId>
       <artifactId>plc4x-protocols-test-utils</artifactId>
diff --git a/protocols/s7/src/main/resources/daffodil-built-in-catalog.xml b/protocols/s7/src/main/resources/daffodil-built-in-catalog.xml
index b6a5d23..617b0ba 100644
--- a/protocols/s7/src/main/resources/daffodil-built-in-catalog.xml
+++ b/protocols/s7/src/main/resources/daffodil-built-in-catalog.xml
@@ -16,6 +16,11 @@
   limitations under the License.
 -->
 <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+
+  <uri name="http://plc4x.apache.org/plc4x"
+       uri="org/apache/plc4x/protocols/protocol.dfdl.xsd"/>
+
   <uri name="http://plc4x.apache.org/s7"
        uri="org/apache/plc4x/protocols/s7/protocol.dfdl.xsd"/>
+
 </catalog>
\ No newline at end of file
diff --git a/protocols/s7/src/main/resources/org/apache/plc4x/protocols/protocol.dfdl.xsd b/protocols/s7/src/main/resources/org/apache/plc4x/protocols/protocol.dfdl.xsd
new file mode 100644
index 0000000..544e2f3
--- /dev/null
+++ b/protocols/s7/src/main/resources/org/apache/plc4x/protocols/protocol.dfdl.xsd
@@ -0,0 +1,227 @@
+<!--
+  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.
+  -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/"
+           targetNamespace="http://plc4x.apache.org/plc4x">
+
+    <!--
+
+        Simple type definition.
+
+        These are the types language adapters must provide mappings for.
+
+    -->
+
+    <xs:simpleType name="null" dfdl:lengthUnits="bytes" dfdl:length="0" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:hexBinary"/>
+    </xs:simpleType>
+
+
+
+    <xs:simpleType name="bit" dfdl:lengthUnits="bits" dfdl:length="1" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:boolean"/>
+    </xs:simpleType>
+
+
+
+    <xs:simpleType name="uint2" dfdl:lengthUnits="bits" dfdl:length="2" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint3" dfdl:lengthUnits="bits" dfdl:length="3" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint4" dfdl:lengthUnits="bits" dfdl:length="4" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint5" dfdl:lengthUnits="bits" dfdl:length="5" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint6" dfdl:lengthUnits="bits" dfdl:length="6" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint7" dfdl:lengthUnits="bits" dfdl:length="7" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint8" dfdl:lengthUnits="bits" dfdl:length="8" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint9" dfdl:lengthUnits="bits" dfdl:length="9" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint10" dfdl:lengthUnits="bits" dfdl:length="10" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint11" dfdl:lengthUnits="bits" dfdl:length="11" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint12" dfdl:lengthUnits="bits" dfdl:length="12" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint13" dfdl:lengthUnits="bits" dfdl:length="13" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint14" dfdl:lengthUnits="bits" dfdl:length="14" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint15" dfdl:lengthUnits="bits" dfdl:length="15" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint16" dfdl:lengthUnits="bits" dfdl:length="16" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedShort"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint17" dfdl:lengthUnits="bits" dfdl:length="17" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint18" dfdl:lengthUnits="bits" dfdl:length="18" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint19" dfdl:lengthUnits="bits" dfdl:length="19" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint20" dfdl:lengthUnits="bits" dfdl:length="20" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint21" dfdl:lengthUnits="bits" dfdl:length="21" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint22" dfdl:lengthUnits="bits" dfdl:length="22" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint23" dfdl:lengthUnits="bits" dfdl:length="23" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint24" dfdl:lengthUnits="bits" dfdl:length="24" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint25" dfdl:lengthUnits="bits" dfdl:length="25" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint26" dfdl:lengthUnits="bits" dfdl:length="26" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint27" dfdl:lengthUnits="bits" dfdl:length="27" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint28" dfdl:lengthUnits="bits" dfdl:length="28" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint29" dfdl:lengthUnits="bits" dfdl:length="29" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint30" dfdl:lengthUnits="bits" dfdl:length="30" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint31" dfdl:lengthUnits="bits" dfdl:length="31" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedByte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint32" dfdl:lengthUnits="bits" dfdl:length="32" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedInt"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uint64" dfdl:lengthUnits="bits" dfdl:length="64" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedLong"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="uintN" dfdl:lengthUnits="bits" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:unsignedLong"/>
+    </xs:simpleType>
+
+
+
+    <xs:simpleType name="int8" dfdl:lengthUnits="bits" dfdl:length="8" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:byte"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="int16" dfdl:lengthUnits="bits" dfdl:length="16" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:short"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="int32" dfdl:lengthUnits="bits" dfdl:length="32" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:int"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="int64" dfdl:lengthUnits="bits" dfdl:length="64" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:long"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="intN" dfdl:lengthUnits="bits" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:long"/>
+    </xs:simpleType>
+
+
+
+    <xs:simpleType name="byte8" dfdl:lengthUnits="bytes" dfdl:length="1" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:hexBinary"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="byte16" dfdl:lengthUnits="bytes" dfdl:length="2" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:hexBinary"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="byte32" dfdl:lengthUnits="bytes" dfdl:length="3" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:hexBinary"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="byte64" dfdl:lengthUnits="bytes" dfdl:length="4" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:hexBinary"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="byteN" dfdl:lengthUnits="bytes" dfdl:lengthKind="explicit">
+        <xs:restriction base="xs:hexBinary"/>
+    </xs:simpleType>
+
+
+
+
+    <xs:simpleType name="stringN" dfdl:lengthUnits="bytes" dfdl:lengthKind="explicit"
+                   dfdl:textTrimKind="none" dfdl:alignmentUnits="bytes">
+        <xs:restriction base="xs:string"/>
+    </xs:simpleType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/protocols/s7/src/main/resources/org/apache/plc4x/protocols/s7/protocol.dfdl.xsd b/protocols/s7/src/main/resources/org/apache/plc4x/protocols/s7/protocol.dfdl.xsd
index 5d46c8d..3f632cd 100644
--- a/protocols/s7/src/main/resources/org/apache/plc4x/protocols/s7/protocol.dfdl.xsd
+++ b/protocols/s7/src/main/resources/org/apache/plc4x/protocols/s7/protocol.dfdl.xsd
@@ -16,12 +16,14 @@
   specific language governing permissions and limitations
   under the License.
   -->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+<xs:schema targetNamespace="http://plc4x.apache.org/s7"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/"
+           xmlns:plc4x="http://plc4x.apache.org/plc4x"
            xmlns:s7="http://plc4x.apache.org/s7"
-           xmlns:fn="http://www.w3.org/2005/xpath-functions"
-           xmlns:plc4x="http://plc4x.apache.org/schemas/dfdl"
-           targetNamespace="http://plc4x.apache.org/s7">
+           xmlns:fn="http://www.w3.org/2005/xpath-functions">
+
+    <xs:import namespace="http://plc4x.apache.org/plc4x" schemaLocation="../protocol.dfdl.xsd"/>
 
     <xs:annotation>
         <xs:appinfo source="http://www.ogf.org/dfdl/">
@@ -31,6 +33,8 @@
                              binaryNumberRep="binary"
                              byteOrder="bigEndian"
                              lengthKind="implicit" lengthUnits="bytes" length="0"
+                             binaryBooleanTrueRep="1"
+                             binaryBooleanFalseRep="0"
                              occursCountKind="implicit"
                              textOutputMinLength="0"
                              alignment="1" alignmentUnits="bits"
@@ -49,38 +53,16 @@
 
     <!--
 
-        Simple type definition.
-
-    -->
-
-    <xs:simpleType name="bit" dfdl:lengthUnits="bits" dfdl:length="1" dfdl:lengthKind="explicit">
-        <xs:restriction base="xs:boolean"/>
-    </xs:simpleType>
-
-    <xs:simpleType name="byte" dfdl:lengthUnits="bytes" dfdl:length="1" dfdl:lengthKind="explicit">
-        <xs:restriction base="xs:unsignedByte"/>
-    </xs:simpleType>
-
-    <xs:simpleType name="short" dfdl:lengthUnits="bytes" dfdl:length="2" dfdl:lengthKind="explicit">
-        <xs:restriction base="xs:unsignedShort"/>
-    </xs:simpleType>
-
-    <xs:simpleType name="hexByte" dfdl:lengthUnits="bytes" dfdl:length="1" dfdl:lengthKind="explicit">
-        <xs:restriction base="xs:hexBinary"/>
-    </xs:simpleType>
-
-    <!--
-
         TPKT - Iso-On-TCP
 
     -->
 
-    <xs:element name="TpktMessage" type="s7:TpktMessageType"/>
+    <xs:element name="TpktMessage" type="s7:TpktMessage"/>
 
-    <xs:complexType name="TpktMessageType">
+    <xs:complexType name="TpktMessage">
         <xs:sequence>
             <!-- TPKT Magic Byte always 0x03 -->
-            <xs:element name="magicByte" type="s7:byte" fixed="3">
+            <xs:element name="magicByte" type="plc4x:uint8" fixed="3">
                 <xs:annotation>
                     <xs:appinfo source="http://plc4x.apache.org/dfdl">
                         <plc4x:noProperty/>
@@ -91,15 +73,15 @@
                     </xs:appinfo>
                 </xs:annotation>
             </xs:element>
-            <xs:element name="reserved" type="s7:byte">
+            <xs:element name="reserved" type="plc4x:uint8">
                 <xs:annotation>
                     <xs:appinfo source="http://plc4x.apache.org/dfdl">
                         <plc4x:noProperty/>
                     </xs:appinfo>
                 </xs:annotation>
             </xs:element>
-            <xs:element name="length" type="s7:short"/>
-            <xs:element name="userData" type="s7:CotpMessageType"/>
+            <xs:element name="length" type="plc4x:uint16"/>
+            <xs:element name="userData" type="s7:CotpMessage"/>
         </xs:sequence>
     </xs:complexType>
 
@@ -110,7 +92,7 @@
     -->
 
     <xs:simpleType name="CotpTpduType">
-        <xs:restriction base="xs:unsignedByte">
+        <xs:restriction base="plc4x:uint8">
             <xs:enumeration id="tpduTypeConnectionRequest" value="224">
                 <xs:annotation>
                     <xs:appinfo source="http://plc4x.apache.org/">ConnectionRequest</xs:appinfo>
@@ -145,7 +127,7 @@
     </xs:simpleType>
 
     <xs:simpleType name="CotpParameterType">
-        <xs:restriction base="xs:unsignedByte">
+        <xs:restriction base="plc4x:uint8">
             <xs:enumeration value="192">
                 <xs:annotation>
                     <xs:appinfo source="http://plc4x.apache.org/">TpduSize</xs:appinfo>
@@ -174,10 +156,10 @@
         </xs:restriction>
     </xs:simpleType>
 
-    <xs:complexType name="CotpMessageType">
+    <xs:complexType name="CotpMessage">
         <xs:sequence>
             <!-- Length of the COTP header data -->
-            <xs:element name="headerLength" type="s7:byte"/>
+            <xs:element name="headerLength" type="plc4x:uint8"/>
             <xs:element name="type" type="s7:CotpTpduType"/>
             <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
                 <xs:element dfdl:choiceBranchKey="224" name="cotpTpduConnectionRequest"
@@ -191,7 +173,7 @@
                 <xs:element dfdl:choiceBranchKey="112" name="cotpTpduError" type="s7:CotpTpduError"/>
                 <xs:element dfdl:choiceBranchKey="240" name="cotpTpduData" type="s7:CotpTpduData"/>
             </xs:choice>
-            <xs:element name="userData" type="s7:S7MessageType" minOccurs="0"
+            <xs:element name="userData" type="s7:S7Message" minOccurs="0"
                         dfdl:occursCountKind="expression"
                         dfdl:occursCount="{if((../../length - (../headerLength + 5)) gt 0) then 1 else 0}"/>
         </xs:sequence>
@@ -199,9 +181,9 @@
 
     <xs:complexType name="CotpTpduConnectionRequest">
         <xs:sequence>
-            <xs:element name="destinationReference" type="s7:short"/>
-            <xs:element name="sourceReference" type="s7:short"/>
-            <xs:element name="protocolClass" type="s7:byte"/>
+            <xs:element name="destinationReference" type="plc4x:uint16"/>
+            <xs:element name="sourceReference" type="plc4x:uint16"/>
+            <xs:element name="protocolClass" type="plc4x:uint8"/>
             <xs:element name="parameters" minOccurs="0"
                         dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../../headerLength - 6}"
                         dfdl:occursCountKind="expression"
@@ -217,9 +199,9 @@
 
     <xs:complexType name="CotpTpduConnectionResponse">
         <xs:sequence>
-            <xs:element name="destinationReference" type="s7:short"/>
-            <xs:element name="sourceReference" type="s7:short"/>
-            <xs:element name="protocolClass" type="s7:byte"/>
+            <xs:element name="destinationReference" type="plc4x:uint16"/>
+            <xs:element name="sourceReference" type="plc4x:uint16"/>
+            <xs:element name="protocolClass" type="plc4x:uint8"/>
             <xs:element name="parameters" minOccurs="0"
                         dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../../headerLength - 6}"
                         dfdl:occursCountKind="expression"
@@ -235,9 +217,9 @@
 
     <xs:complexType name="CotpTpduDisconnectRequest">
         <xs:sequence>
-            <xs:element name="destinationReference" type="s7:short"/>
-            <xs:element name="sourceReference" type="s7:short"/>
-            <xs:element name="disconnectReason" type="s7:byte"/>
+            <xs:element name="destinationReference" type="plc4x:uint16"/>
+            <xs:element name="sourceReference" type="plc4x:uint16"/>
+            <xs:element name="disconnectReason" type="plc4x:uint8"/>
             <xs:element name="parameters" minOccurs="0"
                         dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../../headerLength - 6}"
                         dfdl:occursCountKind="expression"
@@ -253,8 +235,8 @@
 
     <xs:complexType name="CotpTpduDisconnectResponse">
         <xs:sequence>
-            <xs:element name="destinationReference" type="s7:short"/>
-            <xs:element name="sourceReference" type="s7:short"/>
+            <xs:element name="destinationReference" type="plc4x:uint16"/>
+            <xs:element name="sourceReference" type="plc4x:uint16"/>
             <xs:element name="parameters" minOccurs="0"
                         dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../../headerLength - 5}"
                         dfdl:occursCountKind="expression"
@@ -270,8 +252,8 @@
 
     <xs:complexType name="CotpTpduError">
         <xs:sequence>
-            <xs:element name="destinationReference" type="s7:short"/>
-            <xs:element name="rejectCause" type="s7:byte"/>
+            <xs:element name="destinationReference" type="plc4x:uint16"/>
+            <xs:element name="rejectCause" type="plc4x:uint8"/>
             <xs:element name="parameters" minOccurs="0"
                         dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../../headerLength - 4}"
                         dfdl:occursCountKind="expression"
@@ -287,17 +269,15 @@
 
     <xs:complexType name="CotpTpduData">
         <xs:sequence>
-            <xs:element name="endOfTransmission" type="xs:unsignedInt"
-                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bits" dfdl:length="1"/>
-            <xs:element name="tpduRef" type="xs:unsignedInt"
-                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bits" dfdl:length="7"/>
+            <xs:element name="endOfTransmission" type="plc4x:bit"/>
+            <xs:element name="tpduRef" type="plc4x:uint7"/>
         </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="Parameter">
         <xs:sequence>
             <xs:element name="type" type="s7:CotpParameterType"/>
-            <xs:element name="parameterLength" type="s7:byte"/>
+            <xs:element name="parameterLength" type="plc4x:uint8"/>
             <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
                 <xs:element dfdl:choiceBranchKey="192" name="cotpParameterTpduSize" type="s7:CotpParameterTpduSize"/>
                 <xs:element dfdl:choiceBranchKey="193" name="cotpParameterCallingTsap" type="s7:CotpParameterCallingTsap"/>
@@ -311,33 +291,31 @@
 
     <xs:complexType name="CotpParameterTpduSize">
         <xs:sequence>
-            <xs:element name="tpduSize" type="s7:byte"/>
+            <xs:element name="tpduSize" type="plc4x:uint8"/>
         </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="CotpParameterCallingTsap">
         <xs:sequence>
-            <xs:element name="tsapId" type="s7:short"/>
+            <xs:element name="tsapId" type="plc4x:uint16"/>
         </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="CotpParameterCalledTsap">
         <xs:sequence>
-            <xs:element name="tsapId" type="s7:short"/>
+            <xs:element name="tsapId" type="plc4x:uint16"/>
         </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="CotpParameterChecksum">
         <xs:sequence>
-            <xs:element name="checksum" type="s7:byte"/>
+            <xs:element name="checksum" type="plc4x:uint8"/>
         </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="CotpParameterDisconnectAdditionalInformation">
         <xs:sequence>
-            <xs:element name="data" type="xs:hexBinary"
-                        dfdl:byteOrder="bigEndian" dfdl:lengthUnits="bytes" dfdl:lengthKind="explicit"
-                        dfdl:length="{../../parameterLength}"/>
+            <xs:element name="data" type="plc4x:byteN" dfdl:length="{../../parameterLength}"/>
         </xs:sequence>
     </xs:complexType>
 
@@ -347,10 +325,10 @@
 
     -->
 
-    <xs:complexType name="S7MessageType">
+    <xs:complexType name="S7Message">
         <xs:sequence>
             <!-- S7 Magic Byte always 0x32 -->
-            <xs:element name="magicByte" type="s7:byte">
+            <xs:element name="magicByte" type="plc4x:uint8">
                 <xs:annotation>
                     <xs:appinfo source="http://www.ogf.org/dfdl/">
                         <dfdl:assert message="Magic number was not 0x32."
@@ -358,7 +336,7 @@
                     </xs:appinfo>
                 </xs:annotation>
             </xs:element>
-            <xs:element name="type" type="s7:byte"/>
+            <xs:element name="type" type="plc4x:uint8"/>
             <!--
                 Unfortunately the response for a CPU Functions request follows the rules of a
                 response, however has the header structure of a request
@@ -376,10 +354,10 @@
     <xs:complexType name="S7RequestMessage">
         <xs:sequence>
             <!-- Reserved value always 0x0000 -->
-            <xs:element name="reserved" type="s7:short" fixed="0"/>
-            <xs:element name="tpduReference" type="s7:short"/>
-            <xs:element name="parametersLength" type="s7:short"/>
-            <xs:element name="payloadsLength" type="s7:short"/>
+            <xs:element name="reserved" type="plc4x:uint16" fixed="0"/>
+            <xs:element name="tpduReference" type="plc4x:uint16"/>
+            <xs:element name="parametersLength" type="plc4x:uint16"/>
+            <xs:element name="payloadsLength" type="plc4x:uint16"/>
             <xs:element name="parameters" minOccurs="0"
                         dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../parametersLength}"
                         dfdl:occursCountKind="expression"
@@ -389,7 +367,7 @@
                         <xs:element name="parameter" maxOccurs="unbounded">
                             <xs:complexType>
                                 <xs:sequence>
-                                    <xs:element name="type" type="s7:byte"/>
+                                    <xs:element name="type" type="plc4x:uint8"/>
                                     <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
                                         <xs:element dfdl:choiceBranchKey="240" name="s7GeneralParameterSetupCommunication"
                                                     type="s7:S7GeneralParameterSetupCommunication"/>
@@ -449,14 +427,14 @@
     <xs:complexType name="S7ResponseMessage">
         <xs:sequence>
             <!-- Reserved value always 0x0000 -->
-            <xs:element name="reserved" type="s7:short" fixed="0"/>
-            <xs:element name="tpduReference" type="s7:short"/>
-            <xs:element name="parametersLength" type="s7:short"/>
-            <xs:element name="payloadsLength" type="s7:short"/>
+            <xs:element name="reserved" type="plc4x:uint16" fixed="0"/>
+            <xs:element name="tpduReference" type="plc4x:uint16"/>
+            <xs:element name="parametersLength" type="plc4x:uint16"/>
+            <xs:element name="payloadsLength" type="plc4x:uint16"/>
             <!-- UserData (type 7) responses don't have the error class and code -->
-            <xs:element name="errorClass" type="s7:byte" minOccurs="0"
+            <xs:element name="errorClass" type="plc4x:uint8" minOccurs="0"
                         dfdl:occursCountKind="expression" dfdl:occursCount="{if(../../type eq 3) then 1 else 0}"/>
-            <xs:element name="errorCode" type="s7:byte" minOccurs="0"
+            <xs:element name="errorCode" type="plc4x:uint8" minOccurs="0"
                         dfdl:occursCountKind="expression" dfdl:occursCount="{if(../../type eq 3) then 1 else 0}"/>
             <xs:element name="parameters" minOccurs="0"
                         dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../parametersLength}"
@@ -467,7 +445,7 @@
                         <xs:element name="parameter" maxOccurs="unbounded">
                             <xs:complexType>
                                 <xs:sequence>
-                                    <xs:element name="type" type="s7:byte"/>
+                                    <xs:element name="type" type="plc4x:uint8"/>
                                     <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
                                         <xs:element dfdl:choiceBranchKey="240" name="s7GeneralParameterSetupCommunication"
                                                     type="s7:S7GeneralParameterSetupCommunication"/>
@@ -528,10 +506,10 @@
     <xs:complexType name="S7UserDataMessage">
         <xs:sequence>
             <!-- Reserved value always 0x0000 -->
-            <xs:element name="reserved" type="s7:short" fixed="0"/>
-            <xs:element name="tpduReference" type="s7:short"/>
-            <xs:element name="parametersLength" type="s7:short"/>
-            <xs:element name="payloadsLength" type="s7:short"/>
+            <xs:element name="reserved" type="plc4x:uint16" fixed="0"/>
+            <xs:element name="tpduReference" type="plc4x:uint16"/>
+            <xs:element name="parametersLength" type="plc4x:uint16"/>
+            <xs:element name="payloadsLength" type="plc4x:uint16"/>
             <xs:element name="parameters" minOccurs="0"
                         dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="{../parametersLength}"
                         dfdl:occursCountKind="expression"
@@ -541,7 +519,7 @@
                         <xs:element name="parameter" maxOccurs="unbounded">
                             <xs:complexType>
                                 <xs:sequence>
-                                    <xs:element name="type" type="s7:byte"/>
+                                    <xs:element name="type" type="plc4x:uint8"/>
                                     <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
                                         <xs:element dfdl:choiceBranchKey="0" name="s7UserDataParameterCPUService"
                                                     type="s7:S7UserDataParameterCPUService"/>
@@ -599,35 +577,33 @@
     <xs:complexType name="S7GeneralParameterSetupCommunication">
         <xs:sequence>
             <!-- Reserved value always 0x00 -->
-            <xs:element name="reserved" type="s7:byte" fixed="0"/>
-            <xs:element name="maxAmqCaller" type="s7:short"/>
-            <xs:element name="maxAmqCallee" type="s7:short"/>
-            <xs:element name="pduLength" type="s7:short"/>
+            <xs:element name="reserved" type="plc4x:uint8" fixed="0"/>
+            <xs:element name="maxAmqCaller" type="plc4x:uint16"/>
+            <xs:element name="maxAmqCallee" type="plc4x:uint16"/>
+            <xs:element name="pduLength" type="plc4x:uint16"/>
         </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="S7UserDataParameterCPUService">
         <xs:sequence>
             <!-- Fixed header 0x0112 274 -> -->
-            <xs:element name="header" type="s7:short"/><!-- fixed="274"-->
-            <xs:element name="paramLength" type="s7:byte"/><!-- fixed="4"-->
+            <xs:element name="header" type="plc4x:uint16"/><!-- fixed="274"-->
+            <xs:element name="paramLength" type="plc4x:uint8"/><!-- fixed="4"-->
             <!-- Request: 0x11 -> 17 -->
-            <xs:element name="typeCode" type="s7:byte"/><!-- fixed="17"-->
-            <xs:element name="type" type="xs:unsignedByte" dfdl:lengthKind="explicit" dfdl:lengthUnits="bits"
-                        dfdl:length="4"/>
+            <xs:element name="typeCode" type="plc4x:uint8"/><!-- fixed="17"-->
+            <xs:element name="type" type="plc4x:uint4"/>
             <!-- First 4 bits: Request 0x40, last 4 bits: Function Group 0x04 = 0x44 -> 68 -->
-            <xs:element name="functionGroup" type="xs:unsignedByte" dfdl:lengthKind="explicit"
-                        dfdl:lengthUnits="bits" dfdl:length="4"/><!-- fixed="68"-->
+            <xs:element name="functionGroup" type="plc4x:uint4"/><!-- fixed="68"-->
             <!-- READ SSL = 0x01 -->
-            <xs:element name="subFunctionGroup" type="s7:byte"/><!-- fixed="1"-->
-            <xs:element name="sequenceNumber" type="s7:byte"/>
-            <xs:element name="dataUnitReferenceNumber" type="s7:byte" minOccurs="0"
+            <xs:element name="subFunctionGroup" type="plc4x:uint8"/><!-- fixed="1"-->
+            <xs:element name="sequenceNumber" type="plc4x:uint8"/>
+            <xs:element name="dataUnitReferenceNumber" type="plc4x:uint8" minOccurs="0"
                         dfdl:occursCountKind="expression"
                         dfdl:occursCount="{if(../sequenceNumber eq 2) then 1 else 0}"/>
-            <xs:element name="lastDataUnit" type="s7:byte" minOccurs="0"
+            <xs:element name="lastDataUnit" type="plc4x:uint8" minOccurs="0"
                         dfdl:occursCountKind="expression"
                         dfdl:occursCount="{if(../sequenceNumber eq 2) then 1 else 0}"/>
-            <xs:element name="errorCode" type="s7:short" minOccurs="0"
+            <xs:element name="errorCode" type="plc4x:uint16" minOccurs="0"
                         dfdl:occursCountKind="expression"
                         dfdl:occursCount="{if(../sequenceNumber eq 2) then 1 else 0}"/>
         </xs:sequence>
@@ -635,7 +611,7 @@
 
     <xs:complexType name="S7RequestParameterReadVar">
         <xs:sequence>
-            <xs:element name="numItems" type="s7:byte"/>
+            <xs:element name="numItems" type="plc4x:uint8"/>
             <xs:element name="items" minOccurs="0"
                         dfdl:occursCountKind="expression" dfdl:occursCount="{if(../numItems gt 0) then 1 else 0}">
                 <xs:complexType>
@@ -644,7 +620,7 @@
                                     dfdl:occursCountKind="expression" dfdl:occursCount="{../../numItems}">
                             <xs:complexType>
                                 <xs:sequence>
-                                    <xs:element name="type" type="s7:byte"/>
+                                    <xs:element name="type" type="plc4x:uint8"/>
                                     <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
                                         <xs:element dfdl:choiceBranchKey="18" name="s7RequestParameterReadVarAnyItem"
                                                     type="s7:S7RequestParameterReadVarAnyItem"/>
@@ -660,34 +636,32 @@
 
     <xs:complexType name="S7RequestParameterReadVarAnyItem">
         <xs:sequence>
-            <xs:element name="paramLength" type="s7:byte"/><!-- fixed="10"-->
+            <xs:element name="paramLength" type="plc4x:uint8"/><!-- fixed="10"-->
             <!-- Addressing Mode: Any 0x10 -> 16 -->
-            <xs:element name="addressingMode" type="s7:byte"/><!-- fixed="16"-->
-            <xs:element name="dataType" type="s7:byte"/>
-            <xs:element name="numElements" type="s7:short"/>
-            <xs:element name="dataBlockNumber" type="s7:short"/>
-            <xs:element name="memoryArea" type="s7:byte"/>
+            <xs:element name="addressingMode" type="plc4x:uint8"/><!-- fixed="16"-->
+            <xs:element name="dataType" type="plc4x:uint8"/>
+            <xs:element name="numElements" type="plc4x:uint16"/>
+            <xs:element name="dataBlockNumber" type="plc4x:uint16"/>
+            <xs:element name="memoryArea" type="plc4x:uint8"/>
             <!--
              The next 3 bytes (24 bits) contain the byte- and bit-offset,
              were the last byte contains the bit-offset in the last 3 bits
              and the byteOffset is encoded in the higher level 21 bits
             -->
-            <xs:element name="byteOffset" type="xs:unsignedInt"
-                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bits" dfdl:length="21"/>
-            <xs:element name="bitOffset" type="xs:unsignedInt"
-                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bits" dfdl:length="3"/>
+            <xs:element name="byteOffset" type="plc4x:uint21"/>
+            <xs:element name="bitOffset" type="plc4x:uint3"/>
         </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="S7ResponseParameterReadVar">
         <xs:sequence>
-            <xs:element name="numItems" type="s7:byte"/>
+            <xs:element name="numItems" type="plc4x:uint8"/>
         </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="S7RequestParameterWriteVar">
         <xs:sequence>
-            <xs:element name="numItems" type="s7:byte"/>
+            <xs:element name="numItems" type="plc4x:uint8"/>
             <xs:element name="items" minOccurs="0"
                         dfdl:occursCountKind="expression" dfdl:occursCount="{if(../numItems gt 0) then 1 else 0}">
                 <xs:complexType>
@@ -696,7 +670,7 @@
                                     dfdl:occursCountKind="expression" dfdl:occursCount="{../../numItems}">
                             <xs:complexType>
                                 <xs:sequence>
-                                    <xs:element name="type" type="s7:byte"/>
+                                    <xs:element name="type" type="plc4x:uint8"/>
                                     <xs:choice dfdl:choiceDispatchKey="{xs:string(type)}">
                                         <xs:element dfdl:choiceBranchKey="18" name="s7RequestParameterWriteVarAnyItem"
                                                     type="s7:S7RequestParameterWriteVarAnyItem"/>
@@ -712,28 +686,26 @@
 
     <xs:complexType name="S7RequestParameterWriteVarAnyItem">
         <xs:sequence>
-            <xs:element name="itemLength" type="s7:byte"/><!-- fixed="10"-->
+            <xs:element name="itemLength" type="plc4x:uint8"/><!-- fixed="10"-->
             <!-- Addressing Mode: Any 0x10 -> 16 -->
-            <xs:element name="addressingMode" type="s7:byte"/><!-- fixed="16"-->
-            <xs:element name="dataType" type="s7:byte"/>
-            <xs:element name="numElements" type="s7:short"/>
-            <xs:element name="dataBlockNumber" type="s7:short"/>
-            <xs:element name="memoryArea" type="s7:byte"/>
+            <xs:element name="addressingMode" type="plc4x:uint8"/><!-- fixed="16"-->
+            <xs:element name="dataType" type="plc4x:uint8"/>
+            <xs:element name="numElements" type="plc4x:uint16"/>
+            <xs:element name="dataBlockNumber" type="plc4x:uint16"/>
+            <xs:element name="memoryArea" type="plc4x:uint8"/>
             <!--
              The next 3 bytes (24 bits) contain the byte- and bit-offset,
              were the last byte contains the bit-offset in the last 3 bits
              and the byteOffset is encoded in the higher level 21 bits
             -->
-            <xs:element name="byteOffset" type="xs:unsignedInt"
-                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bits" dfdl:length="21"/>
-            <xs:element name="bitOffset" type="xs:unsignedInt"
-                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bits" dfdl:length="3"/>
+            <xs:element name="byteOffset" type="plc4x:uint21"/>
+            <xs:element name="bitOffset" type="plc4x:uint3"/>
         </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="S7ResponseParameterWriteVar">
         <xs:sequence>
-            <xs:element name="numItems" type="s7:byte"/>
+            <xs:element name="numItems" type="plc4x:uint8"/>
         </xs:sequence>
     </xs:complexType>
 
@@ -745,19 +717,19 @@
 
     <xs:complexType name="S7GeneralPayloadSetupCommunication">
         <xs:sequence>
-            <xs:element name="data" type="xs:hexBinary" dfdl:lengthKind="explicit" dfdl:length="0"/>
+            <xs:element name="data" type="plc4x:null"/>
         </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="S7UserDataPayloadCpuServices">
         <xs:sequence>
-            <xs:element name="returnCode" type="s7:byte"/>
-            <xs:element name="transportSize" type="s7:byte"/><!-- fixed="9"-->
-            <xs:element name="length" type="s7:short"/>
-            <xs:element name="sslId" type="s7:short" minOccurs="0"
+            <xs:element name="returnCode" type="plc4x:uint8"/>
+            <xs:element name="transportSize" type="plc4x:uint8"/><!-- fixed="9"-->
+            <xs:element name="length" type="plc4x:uint16"/>
+            <xs:element name="sslId" type="plc4x:uint16" minOccurs="0"
                         dfdl:occursCountKind="expression"
                         dfdl:occursCount="{if(../returnCode eq 255) then 1 else 0}"/>
-            <xs:element name="sslIndex" type="s7:short" minOccurs="0"
+            <xs:element name="sslIndex" type="plc4x:uint16" minOccurs="0"
                         dfdl:occursCountKind="expression"
                         dfdl:occursCount="{if(../returnCode eq 255) then 1 else 0}"/>
             <xs:element name="partialList" minOccurs="0"
@@ -765,8 +737,8 @@
                         dfdl:occursCount="{if((../returnCode eq 255) and (../length gt 4)) then 1 else 0}">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element name="partialListLengthInBytes" type="s7:short"/>
-                        <xs:element name="partialListCount" type="s7:short"/>
+                        <xs:element name="partialListLengthInBytes" type="plc4x:uint16"/>
+                        <xs:element name="partialListCount" type="plc4x:uint16"/>
                         <xs:element name="sslDataRecords">
                             <xs:complexType>
                                 <xs:sequence>
@@ -794,26 +766,24 @@
 
     <xs:complexType name="S7ResponsePayloadCpuServicesSslDataRecordModuleIdentification">
         <xs:sequence>
-            <xs:element name="index" type="s7:short"/>
-            <xs:element name="articleNumber" type="xs:string" dfdl:textTrimKind="none" dfdl:alignmentUnits="bytes"
-                        dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="20"/>
-            <xs:element name="bgType" type="s7:short"/>
-            <xs:element name="moduleOrOsVersion" type="s7:short"/>
-            <xs:element name="pgDescriptionFileVersion" type="s7:short"/>
+            <xs:element name="index" type="plc4x:uint16"/>
+            <xs:element name="articleNumber" type="plc4x:stringN" dfdl:length="20"/>
+            <xs:element name="bgType" type="plc4x:uint16"/>
+            <xs:element name="moduleOrOsVersion" type="plc4x:uint16"/>
+            <xs:element name="pgDescriptionFileVersion" type="plc4x:uint16"/>
         </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="S7RequestPayloadReadVar">
         <xs:sequence>
-            <xs:element name="data"
-                        type="xs:hexBinary" dfdl:lengthKind="explicit" dfdl:length="0"/>
+            <xs:element name="data" type="plc4x:null"/>
         </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="S7ResponsePayloadReadVar">
         <xs:sequence>
             <!-- The number of items which should be read is transmitted in the matching parameter -->
-            <xs:element name="numItems" type="s7:byte"
+            <xs:element name="numItems" type="plc4x:uint8"
                         dfdl:inputValueCalc="{
                                 ../../../../parameters[1]/parameter[dfdl:occursIndex()]/s7ResponseParameterReadVar/numItems
                             }"/>
@@ -821,25 +791,23 @@
                         dfdl:occursCountKind="expression" dfdl:occursCount="{../numItems}">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element name="returnCode" type="s7:byte"/>
-                        <xs:element name="transportSize" type="s7:byte"/>
-                        <xs:element name="rawLength" type="s7:short"/>
+                        <xs:element name="returnCode" type="plc4x:uint8"/>
+                        <xs:element name="transportSize" type="plc4x:uint8"/>
+                        <xs:element name="rawLength" type="plc4x:uint16"/>
                         <!--
                             For some reason the types BIT, BYTE_WORD_DWORD and INTEGER are transferred in "bits",
                             the rest is transferred in "bytes"
                         -->
-                        <xs:element name="lengthInBytes" type="s7:short" dfdl:inputValueCalc="{
+                        <xs:element name="lengthInBytes" type="plc4x:uint16" dfdl:inputValueCalc="{
                                     xs:unsignedShort(if((../transportSize eq 3) or (../transportSize eq 4) or (../transportSize eq 5))
                                             then fn:ceiling(xs:double(../rawLength div 8))
                                             else ../rawLength)}"/>
-                        <xs:element name="data" type="xs:hexBinary"
-                                    dfdl:byteOrder="bigEndian" dfdl:lengthUnits="bytes" dfdl:lengthKind="explicit"
-                                    dfdl:length="{../lengthInBytes}"/>
+                        <xs:element name="data" type="plc4x:byteN" dfdl:length="{../lengthInBytes}"/>
                         <!--
                             Transport sizes: BIT, BYTE_WORD_DWORD and OCTET_STRING require a blank byte.
                             However only if this is not the last item in the result.
                         -->
-                        <xs:element name="fillByte" type="s7:byte" minOccurs="0"
+                        <xs:element name="fillByte" type="plc4x:uint8" minOccurs="0"
                                     dfdl:occursCountKind="expression" dfdl:occursCount="{
                                             if(((../lengthInBytes mod 2) eq 1) and
                                                 (dfdl:occursIndex() ne ../../numItems)) then 1 else 0}"/>
@@ -852,7 +820,7 @@
     <xs:complexType name="S7RequestPayloadWriteVar">
         <xs:sequence>
             <!-- The number of items which should be read is transmitted in the matching parameter -->
-            <xs:element name="numItems" type="s7:byte"
+            <xs:element name="numItems" type="plc4x:uint8"
                         dfdl:inputValueCalc="{
                                 ../../../../parameters[1]/parameter[dfdl:occursIndex()]/s7RequestParameterWriteVar/numItems
                             }"/>
@@ -860,25 +828,23 @@
                         dfdl:occursCountKind="expression" dfdl:occursCount="{../numItems}">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element name="returnCode" type="s7:byte"/>
-                        <xs:element name="transportSize" type="s7:byte"/>
-                        <xs:element name="rawLength" type="s7:short"/>
+                        <xs:element name="returnCode" type="plc4x:uint8"/>
+                        <xs:element name="transportSize" type="plc4x:uint8"/>
+                        <xs:element name="rawLength" type="plc4x:uint16"/>
                         <!--
                             For some reason the types BIT, BYTE_WORD_DWORD and INTEGER are transferred in "bits",
                             the rest is transferred in "bytes"
                         -->
-                        <xs:element name="lengthInBytes" type="s7:short" dfdl:inputValueCalc="{
+                        <xs:element name="lengthInBytes" type="plc4x:uint16" dfdl:inputValueCalc="{
                                     xs:unsignedShort(if((../transportSize eq 3) or (../transportSize eq 4) or (../transportSize eq 5))
                                             then fn:ceiling(../rawLength div 8)
                                             else ../rawLength)}"/>
-                        <xs:element name="data" type="xs:hexBinary"
-                                    dfdl:byteOrder="bigEndian" dfdl:lengthUnits="bytes" dfdl:lengthKind="explicit"
-                                    dfdl:length="{../lengthInBytes}"/>
+                        <xs:element name="data" type="plc4x:byteN" dfdl:length="{../lengthInBytes}"/>
                         <!--
                             It seems that the item payload must always be an even number of bytes. So if it's
                             not an even number, add a fill byte.
                         -->
-                        <xs:element name="fillByte" type="s7:byte" minOccurs="0"
+                        <xs:element name="fillByte" type="plc4x:uint8" minOccurs="0"
                                     dfdl:occursCountKind="expression" dfdl:occursCount="{
                                             if(((../lengthInBytes mod 2) eq 1) and
                                                 (dfdl:occursIndex() ne ../../numItems)) then 1 else 0}"/>
@@ -891,7 +857,7 @@
     <xs:complexType name="S7ResponsePayloadWriteVar">
         <xs:sequence>
             <!-- The number of items which should be read is transmitted in the matching parameter -->
-            <xs:element name="numItems" type="s7:byte"
+            <xs:element name="numItems" type="plc4x:uint8"
                         dfdl:inputValueCalc="{
                                 ../../../../parameters[1]/parameter[dfdl:occursIndex()]/s7ResponseParameterWriteVar/numItems
                             }"/>
@@ -899,7 +865,7 @@
                         dfdl:occursCountKind="expression" dfdl:occursCount="{../numItems}">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element name="returnCode" type="s7:byte"/>
+                        <xs:element name="returnCode" type="plc4x:uint8"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
diff --git a/protocols/s7/src/test/resources/org/apache/plc4x/protocols/s7/protocol.tdml b/protocols/s7/src/test/resources/org/apache/plc4x/protocols/s7/protocol.tdml
index 2a8c108..c8fb1cf 100644
--- a/protocols/s7/src/test/resources/org/apache/plc4x/protocols/s7/protocol.tdml
+++ b/protocols/s7/src/test/resources/org/apache/plc4x/protocols/s7/protocol.tdml
@@ -35,7 +35,7 @@
         <dfdl:format ref="s7:s7FullFormat"/>
 
         <!-- Define the root element name and type -->
-        <xs:element name="TpktMessage" type="s7:TpktMessageType"/>
+        <xs:element name="TpktMessage" type="s7:TpktMessage"/>
     </tdml:defineSchema>
 
     <!--
@@ -313,7 +313,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>0</endOfTransmission>
+                            <endOfTransmission>false</endOfTransmission>
                             <tpduRef>2</tpduRef>
                         </cotpTpduData>
                     </userData>
@@ -342,7 +342,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>2</tpduRef>
                         </cotpTpduData>
                     </userData>
@@ -711,7 +711,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>
@@ -779,7 +779,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>
@@ -835,7 +835,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>
@@ -894,7 +894,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>
@@ -959,7 +959,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>
@@ -1068,7 +1068,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>
@@ -1137,7 +1137,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>
@@ -1200,7 +1200,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>
@@ -1347,7 +1347,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>
@@ -1455,7 +1455,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>
@@ -1534,7 +1534,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>
@@ -1629,7 +1629,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>
@@ -1706,7 +1706,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>
@@ -1814,7 +1814,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>
@@ -1902,7 +1902,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>
@@ -1977,7 +1977,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>
@@ -2037,7 +2037,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>
@@ -2159,7 +2159,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>
@@ -2251,7 +2251,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>
@@ -2406,7 +2406,7 @@
                         <headerLength>2</headerLength>
                         <type>240</type>
                         <cotpTpduData>
-                            <endOfTransmission>1</endOfTransmission>
+                            <endOfTransmission>true</endOfTransmission>
                             <tpduRef>0</tpduRef>
                         </cotpTpduData>
                         <userData>