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 2022/08/01 11:33:43 UTC

[plc4x] branch develop updated (9e877da9b -> b5195e253)

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

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


    from 9e877da9b chore(ads): Finished the auto-discovery feature for ADS (At least the protocol-side)
     new 93174d326 chore(ads): Added some more types and constants
     new de0931906 chore(protocols/opcua): Made the build compatible with my recent changes regarding 32bit unsigned constants.
     new b5f3117a8 chore(knx): Added new manufacturers for KNX.
     new b5195e253 chore(plc4go/ads): Updates for the latest changes in ADS.

The 4 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/ads/AdsDiscoverySerializerTest.xml   | 826 +++++++++++++--------
 plc4go/go.mod                                      |   2 +-
 plc4go/protocols/ads/readwrite/ParserHelper.go     |   2 +
 plc4go/protocols/ads/readwrite/XmlParserHelper.go  |   2 +
 .../knxnetip/readwrite/model/KnxManufacturer.go    |  26 +-
 .../knxnetip/readwrite/model/KnxManufacturer.cs    |  19 +-
 .../resources/protocols/ads/ads-discovery.mspec    |  12 +
 .../ads/src/main/resources/protocols/ads/ads.mspec |   4 +
 protocols/opcua/src/main/xslt/opc-status.xsl       |   2 +-
 9 files changed, 559 insertions(+), 336 deletions(-)


[plc4x] 04/04: chore(plc4go/ads): Updates for the latest changes in ADS.

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

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

commit b5195e2531bf24f0666de01600b107820f800379
Author: christoferdutz <ch...@c-ware.de>
AuthorDate: Mon Aug 1 13:33:35 2022 +0200

    chore(plc4go/ads): Updates for the latest changes in ADS.
---
 .../protocols/ads/AdsDiscoverySerializerTest.xml   | 826 +++++++++++++--------
 plc4go/go.mod                                      |   2 +-
 plc4go/protocols/ads/readwrite/ParserHelper.go     |   2 +
 plc4go/protocols/ads/readwrite/XmlParserHelper.go  |   2 +
 4 files changed, 508 insertions(+), 324 deletions(-)

diff --git a/plc4go/assets/testing/protocols/ads/AdsDiscoverySerializerTest.xml b/plc4go/assets/testing/protocols/ads/AdsDiscoverySerializerTest.xml
index 6521e503d..a12f2c3f2 100644
--- a/plc4go/assets/testing/protocols/ads/AdsDiscoverySerializerTest.xml
+++ b/plc4go/assets/testing/protocols/ads/AdsDiscoverySerializerTest.xml
@@ -18,7 +18,7 @@
   under the License.
   -->
 <test:testsuite xmlns:test="https://plc4x.apache.org/schemas/parser-serializer-testsuite.xsd"
-                byteOrder="BIG_ENDIAN">
+                byteOrder="LITTLE_ENDIAN">
 
   <name>Beckhoff ADS/AMS Discovery</name>
 
@@ -31,234 +31,391 @@
     <root-type>AdsDiscovery</root-type>
     <xml>
       <AdsDiscovery>
-        <header dataType="uint" bitLength="32">57021553</header>
-        <reserved dataType="uint" bitLength="32">0</reserved>
+        <header dataType="uint" bitLength="32">1897162243</header>
+        <requestId dataType="uint" bitLength="32">0</requestId>
         <operation>
-          <Operation dataType="uint" bitLength="8" stringRepresentation="DISCOVERY">1</Operation>
+          <Operation dataType="uint" bitLength="32" stringRepresentation="DISCOVERY_REQUEST">1</Operation>
         </operation>
-        <reserved dataType="uint" bitLength="16">0</reserved>
-        <direction>
-          <Direction dataType="uint" bitLength="8" stringRepresentation="REQUEST">0</Direction>
-        </direction>
-        <DiscoveryRequest>
-          <amsNetId>
-            <AmsNetId>
-              <octet1 dataType="uint" bitLength="8">10</octet1>
-              <octet2 dataType="uint" bitLength="8">10</octet2>
-              <octet3 dataType="uint" bitLength="8">10</octet3>
-              <octet4 dataType="uint" bitLength="8">10</octet4>
-              <octet5 dataType="uint" bitLength="8">1</octet5>
-              <octet6 dataType="uint" bitLength="8">1</octet6>
-            </AmsNetId>
-          </amsNetId>
-          <reserved dataType="uint" bitLength="16">4135</reserved>
-          <reserved dataType="uint" bitLength="32">0</reserved>
-        </DiscoveryRequest>
+        <amsNetId>
+          <AmsNetId>
+            <octet1 dataType="uint" bitLength="8">10</octet1>
+            <octet2 dataType="uint" bitLength="8">10</octet2>
+            <octet3 dataType="uint" bitLength="8">10</octet3>
+            <octet4 dataType="uint" bitLength="8">10</octet4>
+            <octet5 dataType="uint" bitLength="8">1</octet5>
+            <octet6 dataType="uint" bitLength="8">1</octet6>
+          </AmsNetId>
+        </amsNetId>
+        <portNumber>
+          <AdsPortNumbers dataType="uint" bitLength="16" stringRepresentation="SYSTEM_SERVICE">10000</AdsPortNumbers>
+        </portNumber>
+        <numBlocks dataType="uint" bitLength="32">0</numBlocks>
+        <blocks isList="true">
+        </blocks>
       </AdsDiscovery>
     </xml>
   </testcase>
 
   <testcase>
     <name>ADS Discovery Response from 192.168.2.221.1.1</name>
-    <raw>036614710000000001000080c0a802dd0101102704000000050010004445534b544f502d54304e36554e4200</raw>
-    <!--
-    remaining part of frame
-    04001401140100000a00000000000000bb4700000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 [...]
-    -->
+    <raw>036614710000000001000080c0a802dd0101102704000000050010004445534b544f502d54304e36554e420004001401140100000a00000000000000bb4700000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 [...]
+    <root-type>AdsDiscovery</root-type>
+    <xml>
+      <AdsDiscovery>
+        <header dataType="uint" bitLength="32">1897162243</header>
+        <requestId dataType="uint" bitLength="32">0</requestId>
+        <operation>
+          <Operation dataType="uint" bitLength="32" stringRepresentation="DISCOVERY_RESPONSE">2147483649</Operation>
+        </operation>
+        <amsNetId>
+          <AmsNetId>
+            <octet1 dataType="uint" bitLength="8">192</octet1>
+            <octet2 dataType="uint" bitLength="8">168</octet2>
+            <octet3 dataType="uint" bitLength="8">2</octet3>
+            <octet4 dataType="uint" bitLength="8">221</octet4>
+            <octet5 dataType="uint" bitLength="8">1</octet5>
+            <octet6 dataType="uint" bitLength="8">1</octet6>
+          </AmsNetId>
+        </amsNetId>
+        <portNumber>
+          <AdsPortNumbers dataType="uint" bitLength="16" stringRepresentation="SYSTEM_SERVICE">10000</AdsPortNumbers>
+        </portNumber>
+        <numBlocks dataType="uint" bitLength="32">4</numBlocks>
+        <blocks isList="true">
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="HOST_NAME">5</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockHostName>
+              <hostName>
+                <AmsString>
+                  <len dataType="uint" bitLength="16">16</len>
+                  <text dataType="string" bitLength="120" encoding="UTF-8">DESKTOP-T0N6UNB</text>
+                  <reserved dataType="uint" bitLength="8">0</reserved>
+                </AmsString>
+              </hostName>
+            </AdsDiscoveryBlockHostName>
+          </AdsDiscoveryBlock>
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="OS_DATA">4</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockOsData>
+              <osDataLen dataType="uint" bitLength="16">276</osDataLen>
+              <osData dataType="byte" bitLength="2208">0x140100000a00000000000000bb4700000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 [...]
+            </AdsDiscoveryBlockOsData>
+          </AdsDiscoveryBlock>
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="VERSION">3</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockVersion>
+              <versionDataLen dataType="uint" bitLength="16">4</versionDataLen>
+              <versionData dataType="byte" bitLength="32">0x0301b80f</versionData>
+            </AdsDiscoveryBlockVersion>
+          </AdsDiscoveryBlock>
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="FINGERPRINT">18</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockFingerprint>
+              <dataLen dataType="uint" bitLength="16">65</dataLen>
+              <data dataType="byte" bitLength="520">0x3363303937326134386664623736663132613831323839613335643461333731653138666333303736363038323839373031386138626638386439393264633800</data>
+            </AdsDiscoveryBlockFingerprint>
+          </AdsDiscoveryBlock>
+        </blocks>
+      </AdsDiscovery>
+    </xml>
+  </testcase>
+
+  <testcase>
+    <name>ADS Discovery Request from 192.168.23.209.1.1</name>
+    <raw>036614710000000001000000c0a817d10101102700000000</raw>
+    <root-type>AdsDiscovery</root-type>
+    <xml>
+      <AdsDiscovery>
+        <header dataType="uint" bitLength="32">1897162243</header>
+        <requestId dataType="uint" bitLength="32">0</requestId>
+        <operation>
+          <Operation dataType="uint" bitLength="32" stringRepresentation="DISCOVERY_REQUEST">1</Operation>
+        </operation>
+        <amsNetId>
+          <AmsNetId>
+            <octet1 dataType="uint" bitLength="8">192</octet1>
+            <octet2 dataType="uint" bitLength="8">168</octet2>
+            <octet3 dataType="uint" bitLength="8">23</octet3>
+            <octet4 dataType="uint" bitLength="8">209</octet4>
+            <octet5 dataType="uint" bitLength="8">1</octet5>
+            <octet6 dataType="uint" bitLength="8">1</octet6>
+          </AmsNetId>
+        </amsNetId>
+        <portNumber>
+          <AdsPortNumbers dataType="uint" bitLength="16" stringRepresentation="SYSTEM_SERVICE">10000</AdsPortNumbers>
+        </portNumber>
+        <numBlocks dataType="uint" bitLength="32">0</numBlocks>
+        <blocks isList="true">
+        </blocks>
+      </AdsDiscovery>
+    </xml>
+  </testcase>
+
+  <testcase>
+    <name>ADS Discovery Response from 192.168.23.20.1.1</name>
+    <raw>036614710000000001000080c0a81714010110270400000005000700424b5f4950430004001401140100000600000001000000b11d000002000000530065007200760069006300650020005000610063006b0020003100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 [...]
     <root-type>AdsDiscovery</root-type>
     <xml>
       <AdsDiscovery>
-        <header dataType="uint" bitLength="32">57021553</header>
-        <reserved dataType="uint" bitLength="32">0</reserved>
+        <header dataType="uint" bitLength="32">1897162243</header>
+        <requestId dataType="uint" bitLength="32">0</requestId>
         <operation>
-          <Operation dataType="uint" bitLength="8" stringRepresentation="DISCOVERY">1</Operation>
+          <Operation dataType="uint" bitLength="32" stringRepresentation="DISCOVERY_RESPONSE">2147483649</Operation>
         </operation>
-        <reserved dataType="uint" bitLength="16">0</reserved>
-        <direction>
-          <Direction dataType="uint" bitLength="8" stringRepresentation="RESPONSE">128</Direction>
-        </direction>
-        <DiscoveryResponse>
-          <amsNetId>
-            <AmsNetId>
-              <octet1 dataType="uint" bitLength="8">192</octet1>
-              <octet2 dataType="uint" bitLength="8">168</octet2>
-              <octet3 dataType="uint" bitLength="8">2</octet3>
-              <octet4 dataType="uint" bitLength="8">221</octet4>
-              <octet5 dataType="uint" bitLength="8">1</octet5>
-              <octet6 dataType="uint" bitLength="8">1</octet6>
-            </AmsNetId>
-          </amsNetId>
-          <reserved dataType="uint" bitLength="16">4135</reserved>
-          <reserved dataType="uint" bitLength="16">1024</reserved>
-          <reserved dataType="uint" bitLength="24">5</reserved>
-          <name>
-            <AmsMagicString>
-              <len dataType="uint" bitLength="16">16</len>
-              <reserved dataType="uint" bitLength="8">0</reserved>
-              <text dataType="string" bitLength="120" encoding="UTF-8">DESKTOP-T0N6UNB</text>
-              <reserved dataType="uint" bitLength="8">0</reserved>
-            </AmsMagicString>
-          </name>
-        </DiscoveryResponse>
+        <amsNetId>
+          <AmsNetId>
+            <octet1 dataType="uint" bitLength="8">192</octet1>
+            <octet2 dataType="uint" bitLength="8">168</octet2>
+            <octet3 dataType="uint" bitLength="8">23</octet3>
+            <octet4 dataType="uint" bitLength="8">20</octet4>
+            <octet5 dataType="uint" bitLength="8">1</octet5>
+            <octet6 dataType="uint" bitLength="8">1</octet6>
+          </AmsNetId>
+        </amsNetId>
+        <portNumber>
+          <AdsPortNumbers dataType="uint" bitLength="16" stringRepresentation="SYSTEM_SERVICE">10000</AdsPortNumbers>
+        </portNumber>
+        <numBlocks dataType="uint" bitLength="32">4</numBlocks>
+        <blocks isList="true">
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="HOST_NAME">5</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockHostName>
+              <hostName>
+                <AmsString>
+                  <len dataType="uint" bitLength="16">7</len>
+                  <text dataType="string" bitLength="48" encoding="UTF-8">BK_IPC</text>
+                  <reserved dataType="uint" bitLength="8">0</reserved>
+                </AmsString>
+              </hostName>
+            </AdsDiscoveryBlockHostName>
+          </AdsDiscoveryBlock>
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="OS_DATA">4</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockOsData>
+              <osDataLen dataType="uint" bitLength="16">276</osDataLen>
+              <osData dataType="byte" bitLength="2208">0x140100000600000001000000b11d000002000000530065007200760069006300650020005000610063006b0020003100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 [...]
+            </AdsDiscoveryBlockOsData>
+          </AdsDiscoveryBlock>
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="VERSION">3</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockVersion>
+              <versionDataLen dataType="uint" bitLength="16">4</versionDataLen>
+              <versionData dataType="byte" bitLength="32">0x0301b80f</versionData>
+            </AdsDiscoveryBlockVersion>
+          </AdsDiscoveryBlock>
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="FINGERPRINT">18</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockFingerprint>
+              <dataLen dataType="uint" bitLength="16">65</dataLen>
+              <data dataType="byte" bitLength="520">0x3365383565393165353864346663613166643663636133323332336338613561326665306334323132343532343833303662373638353034323665353532623100</data>
+            </AdsDiscoveryBlockFingerprint>
+          </AdsDiscoveryBlock>
+        </blocks>
       </AdsDiscovery>
     </xml>
   </testcase>
 
   <testcase>
-    <name>ADS Route Request from 10.10.10.10.1.1 via 10.10.10.10 with user='username' and pwd='password'</name>
+    <name>ADS Add Route Request from 10.10.10.10.1.1 via 10.10.10.10 with user='username' and pwd='password'</name>
     <raw>0366147100000000060000000a0a0a0a01011027050000000c000c0031302e31302e31302e313000070006000a0a0a0a01010d000900757365726e616d65000200090070617373776f72640005000c0031302e31302e31302e313000</raw>
     <root-type>AdsDiscovery</root-type>
     <xml>
       <AdsDiscovery>
-        <header dataType="uint" bitLength="32">57021553</header>
-        <reserved dataType="uint" bitLength="32">0</reserved>
+        <header dataType="uint" bitLength="32">1897162243</header>
+        <requestId dataType="uint" bitLength="32">0</requestId>
         <operation>
-          <Operation dataType="uint" bitLength="8" stringRepresentation="ROUTE">6</Operation>
+          <Operation dataType="uint" bitLength="32" stringRepresentation="ADD_ROUTE_REQUEST">6</Operation>
         </operation>
-        <reserved dataType="uint" bitLength="16">0</reserved>
-        <direction>
-          <Direction dataType="uint" bitLength="8" stringRepresentation="REQUEST">0</Direction>
-        </direction>
-        <RouteRequest>
-          <sender>
-            <AmsNetId>
-              <octet1 dataType="uint" bitLength="8">10</octet1>
-              <octet2 dataType="uint" bitLength="8">10</octet2>
-              <octet3 dataType="uint" bitLength="8">10</octet3>
-              <octet4 dataType="uint" bitLength="8">10</octet4>
-              <octet5 dataType="uint" bitLength="8">1</octet5>
-              <octet6 dataType="uint" bitLength="8">1</octet6>
-            </AmsNetId>
-          </sender>
-          <reserved dataType="uint" bitLength="16">4135</reserved>
-          <reserved dataType="uint" bitLength="16">1280</reserved>
-          <reserved dataType="uint" bitLength="24">12</reserved>
-          <routeName>
-            <AmsMagicString>
-              <len dataType="uint" bitLength="16">12</len>
-              <reserved dataType="uint" bitLength="8">0</reserved>
-              <text dataType="string" bitLength="88" encoding="UTF-8">10.10.10.10</text>
-              <reserved dataType="uint" bitLength="8">0</reserved>
-            </AmsMagicString>
-          </routeName>
-          <reserved dataType="uint" bitLength="16">1792</reserved>
-          <amsSize dataType="uint" bitLength="8">6</amsSize>
-          <targetPrefix dataType="uint" bitLength="8">0</targetPrefix>
-          <target>
-            <AmsNetId>
-              <octet1 dataType="uint" bitLength="8">10</octet1>
-              <octet2 dataType="uint" bitLength="8">10</octet2>
-              <octet3 dataType="uint" bitLength="8">10</octet3>
-              <octet4 dataType="uint" bitLength="8">10</octet4>
-              <octet5 dataType="uint" bitLength="8">1</octet5>
-              <octet6 dataType="uint" bitLength="8">1</octet6>
-            </AmsNetId>
-          </target>
-          <usernamePrefix dataType="uint" bitLength="8">13</usernamePrefix>
-          <username>
-            <AmsMagicString>
-              <len dataType="uint" bitLength="16">9</len>
-              <reserved dataType="uint" bitLength="8">0</reserved>
-              <text dataType="string" bitLength="64" encoding="UTF-8">username</text>
-              <reserved dataType="uint" bitLength="8">0</reserved>
-            </AmsMagicString>
-          </username>
-          <passwordPrefix dataType="uint" bitLength="8">2</passwordPrefix>
-          <password>
-            <AmsMagicString>
-              <len dataType="uint" bitLength="16">9</len>
-              <reserved dataType="uint" bitLength="8">0</reserved>
-              <text dataType="string" bitLength="64" encoding="UTF-8">password</text>
-              <reserved dataType="uint" bitLength="8">0</reserved>
-            </AmsMagicString>
-          </password>
-          <routePrefix dataType="uint" bitLength="8">5</routePrefix>
-          <address>
-            <AmsMagicString>
-              <len dataType="uint" bitLength="16">12</len>
-              <reserved dataType="uint" bitLength="8">0</reserved>
-              <text dataType="string" bitLength="88" encoding="UTF-8">10.10.10.10</text>
-              <reserved dataType="uint" bitLength="8">0</reserved>
-            </AmsMagicString>
-          </address>
-        </RouteRequest>
+        <amsNetId>
+          <AmsNetId>
+            <octet1 dataType="uint" bitLength="8">10</octet1>
+            <octet2 dataType="uint" bitLength="8">10</octet2>
+            <octet3 dataType="uint" bitLength="8">10</octet3>
+            <octet4 dataType="uint" bitLength="8">10</octet4>
+            <octet5 dataType="uint" bitLength="8">1</octet5>
+            <octet6 dataType="uint" bitLength="8">1</octet6>
+          </AmsNetId>
+        </amsNetId>
+        <portNumber>
+          <AdsPortNumbers dataType="uint" bitLength="16" stringRepresentation="SYSTEM_SERVICE">10000</AdsPortNumbers>
+        </portNumber>
+        <numBlocks dataType="uint" bitLength="32">5</numBlocks>
+        <blocks isList="true">
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="ROUTE_NAME">12</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockRouteName>
+              <routeName>
+                <AmsString>
+                  <len dataType="uint" bitLength="16">12</len>
+                  <text dataType="string" bitLength="88" encoding="UTF-8">10.10.10.10</text>
+                  <reserved dataType="uint" bitLength="8">0</reserved>
+                </AmsString>
+              </routeName>
+            </AdsDiscoveryBlockRouteName>
+          </AdsDiscoveryBlock>
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="AMS_NET_ID">7</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockAmsNetId>
+              <amsNetIdLength dataType="uint" bitLength="16">6</amsNetIdLength>
+              <amsNetId>
+                <AmsNetId>
+                  <octet1 dataType="uint" bitLength="8">10</octet1>
+                  <octet2 dataType="uint" bitLength="8">10</octet2>
+                  <octet3 dataType="uint" bitLength="8">10</octet3>
+                  <octet4 dataType="uint" bitLength="8">10</octet4>
+                  <octet5 dataType="uint" bitLength="8">1</octet5>
+                  <octet6 dataType="uint" bitLength="8">1</octet6>
+                </AmsNetId>
+              </amsNetId>
+            </AdsDiscoveryBlockAmsNetId>
+          </AdsDiscoveryBlock>
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="USER_NAME">13</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockUserName>
+              <userName>
+                <AmsString>
+                  <len dataType="uint" bitLength="16">9</len>
+                  <text dataType="string" bitLength="64" encoding="UTF-8">username</text>
+                  <reserved dataType="uint" bitLength="8">0</reserved>
+                </AmsString>
+              </userName>
+            </AdsDiscoveryBlockUserName>
+          </AdsDiscoveryBlock>
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="PASSWORD">2</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockPassword>
+              <password>
+                <AmsString>
+                  <len dataType="uint" bitLength="16">9</len>
+                  <text dataType="string" bitLength="64" encoding="UTF-8">password</text>
+                  <reserved dataType="uint" bitLength="8">0</reserved>
+                </AmsString>
+              </password>
+            </AdsDiscoveryBlockPassword>
+          </AdsDiscoveryBlock>
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="HOST_NAME">5</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockHostName>
+              <hostName>
+                <AmsString>
+                  <len dataType="uint" bitLength="16">12</len>
+                  <text dataType="string" bitLength="88" encoding="UTF-8">10.10.10.10</text>
+                  <reserved dataType="uint" bitLength="8">0</reserved>
+                </AmsString>
+              </hostName>
+            </AdsDiscoveryBlockHostName>
+          </AdsDiscoveryBlock>
+        </blocks>
       </AdsDiscovery>
     </xml>
   </testcase>
 
   <testcase>
-    <name>ADS Route Response with Success status</name>
+    <name>ADS Add Route Response with Success status</name>
     <raw>036614710000000006000080c0a802dd01011027010000000100040000000000</raw>
     <root-type>AdsDiscovery</root-type>
     <xml>
       <AdsDiscovery>
-        <header dataType="uint" bitLength="32">57021553</header>
-        <reserved dataType="uint" bitLength="32">0</reserved>
+        <header dataType="uint" bitLength="32">1897162243</header>
+        <requestId dataType="uint" bitLength="32">0</requestId>
         <operation>
-          <Operation dataType="uint" bitLength="8" stringRepresentation="ROUTE">6</Operation>
+          <Operation dataType="uint" bitLength="32" stringRepresentation="ADD_ROUTE_RESPONSE">2147483654</Operation>
         </operation>
-        <reserved dataType="uint" bitLength="16">0</reserved>
-        <direction>
-          <Direction dataType="uint" bitLength="8" stringRepresentation="RESPONSE">128</Direction>
-        </direction>
-        <RouteResponse>
-          <amsNetId>
-            <AmsNetId>
-              <octet1 dataType="uint" bitLength="8">192</octet1>
-              <octet2 dataType="uint" bitLength="8">168</octet2>
-              <octet3 dataType="uint" bitLength="8">2</octet3>
-              <octet4 dataType="uint" bitLength="8">221</octet4>
-              <octet5 dataType="uint" bitLength="8">1</octet5>
-              <octet6 dataType="uint" bitLength="8">1</octet6>
-            </AmsNetId>
-          </amsNetId>
-          <reserved dataType="uint" bitLength="16">4135</reserved>
-          <reserved dataType="uint" bitLength="16">256</reserved>
-          <reserved dataType="uint" bitLength="32">256</reserved>
-          <status>
-            <RouteStatus dataType="uint" bitLength="24" stringRepresentation="SUCCESS">262144</RouteStatus>
-          </status>
-          <reserved dataType="uint" bitLength="24">0</reserved>
-        </RouteResponse>
+        <amsNetId>
+          <AmsNetId>
+            <octet1 dataType="uint" bitLength="8">192</octet1>
+            <octet2 dataType="uint" bitLength="8">168</octet2>
+            <octet3 dataType="uint" bitLength="8">2</octet3>
+            <octet4 dataType="uint" bitLength="8">221</octet4>
+            <octet5 dataType="uint" bitLength="8">1</octet5>
+            <octet6 dataType="uint" bitLength="8">1</octet6>
+          </AmsNetId>
+        </amsNetId>
+        <portNumber>
+          <AdsPortNumbers dataType="uint" bitLength="16" stringRepresentation="SYSTEM_SERVICE">10000</AdsPortNumbers>
+        </portNumber>
+        <numBlocks dataType="uint" bitLength="32">1</numBlocks>
+        <blocks isList="true">
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="STATUS">1</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockStatus>
+              <statusLength dataType="uint" bitLength="16">4</statusLength>
+              <status>
+                <Status dataType="uint" bitLength="32" stringRepresentation="SUCCESS">0</Status>
+              </status>
+            </AdsDiscoveryBlockStatus>
+          </AdsDiscoveryBlock>
+        </blocks>
       </AdsDiscovery>
-
     </xml>
   </testcase>
 
   <testcase>
-    <name>ADS Route Response with Failure status</name>
-    <raw>036614710000000006000080c0a802dd01011027010000000100000407000000</raw>
+    <name>ADS Add Route Response with Failure status</name>
+    <raw>036614710000000006000080c0a802dd01011027010000000100040007000000</raw>
     <root-type>AdsDiscovery</root-type>
     <xml>
       <AdsDiscovery>
-        <header dataType="uint" bitLength="32">57021553</header>
-        <reserved dataType="uint" bitLength="32">0</reserved>
+        <header dataType="uint" bitLength="32">1897162243</header>
+        <requestId dataType="uint" bitLength="32">0</requestId>
         <operation>
-          <Operation dataType="uint" bitLength="8" stringRepresentation="ROUTE">6</Operation>
+          <Operation dataType="uint" bitLength="32" stringRepresentation="ADD_ROUTE_RESPONSE">2147483654</Operation>
         </operation>
-        <reserved dataType="uint" bitLength="16">0</reserved>
-        <direction>
-          <Direction dataType="uint" bitLength="8" stringRepresentation="RESPONSE">128</Direction>
-        </direction>
-        <RouteResponse>
-          <amsNetId>
-            <AmsNetId>
-              <octet1 dataType="uint" bitLength="8">192</octet1>
-              <octet2 dataType="uint" bitLength="8">168</octet2>
-              <octet3 dataType="uint" bitLength="8">2</octet3>
-              <octet4 dataType="uint" bitLength="8">221</octet4>
-              <octet5 dataType="uint" bitLength="8">1</octet5>
-              <octet6 dataType="uint" bitLength="8">1</octet6>
-            </AmsNetId>
-          </amsNetId>
-          <reserved dataType="uint" bitLength="16">4135</reserved>
-          <reserved dataType="uint" bitLength="16">256</reserved>
-          <reserved dataType="uint" bitLength="32">256</reserved>
-          <status>
-            <RouteStatus dataType="uint" bitLength="24" stringRepresentation="FAILURE">1031</RouteStatus>
-          </status>
-          <reserved dataType="uint" bitLength="24">0</reserved>
-        </RouteResponse>
+        <amsNetId>
+          <AmsNetId>
+            <octet1 dataType="uint" bitLength="8">192</octet1>
+            <octet2 dataType="uint" bitLength="8">168</octet2>
+            <octet3 dataType="uint" bitLength="8">2</octet3>
+            <octet4 dataType="uint" bitLength="8">221</octet4>
+            <octet5 dataType="uint" bitLength="8">1</octet5>
+            <octet6 dataType="uint" bitLength="8">1</octet6>
+          </AmsNetId>
+        </amsNetId>
+        <portNumber>
+          <AdsPortNumbers dataType="uint" bitLength="16" stringRepresentation="SYSTEM_SERVICE">10000</AdsPortNumbers>
+        </portNumber>
+        <numBlocks dataType="uint" bitLength="32">1</numBlocks>
+        <blocks isList="true">
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="STATUS">1</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockStatus>
+              <statusLength dataType="uint" bitLength="16">4</statusLength>
+              <status>
+                <Status dataType="uint" bitLength="32" stringRepresentation="FAILURE">7</Status>
+              </status>
+            </AdsDiscoveryBlockStatus>
+          </AdsDiscoveryBlock>
+        </blocks>
       </AdsDiscovery>
     </xml>
   </testcase>
@@ -269,29 +426,27 @@
     <root-type>AdsDiscovery</root-type>
     <xml>
       <AdsDiscovery>
-        <header dataType="uint" bitLength="32">57021553</header>
-        <reserved dataType="uint" bitLength="32">0</reserved>
+        <header dataType="uint" bitLength="32">1897162243</header>
+        <requestId dataType="uint" bitLength="32">0</requestId>
         <operation>
-          <Operation dataType="uint" bitLength="8" stringRepresentation="DISCOVERY">1</Operation>
+          <Operation dataType="uint" bitLength="32" stringRepresentation="DISCOVERY_REQUEST">1</Operation>
         </operation>
-        <reserved dataType="uint" bitLength="16">0</reserved>
-        <direction>
-          <Direction dataType="uint" bitLength="8" stringRepresentation="REQUEST">0</Direction>
-        </direction>
-        <DiscoveryRequest>
-          <amsNetId>
-            <AmsNetId>
-              <octet1 dataType="uint" bitLength="8">192</octet1>
-              <octet2 dataType="uint" bitLength="8">168</octet2>
-              <octet3 dataType="uint" bitLength="8">2</octet3>
-              <octet4 dataType="uint" bitLength="8">232</octet4>
-              <octet5 dataType="uint" bitLength="8">1</octet5>
-              <octet6 dataType="uint" bitLength="8">1</octet6>
-            </AmsNetId>
-          </amsNetId>
-          <reserved dataType="uint" bitLength="16">4135</reserved>
-          <reserved dataType="uint" bitLength="32">0</reserved>
-        </DiscoveryRequest>
+        <amsNetId>
+          <AmsNetId>
+            <octet1 dataType="uint" bitLength="8">192</octet1>
+            <octet2 dataType="uint" bitLength="8">168</octet2>
+            <octet3 dataType="uint" bitLength="8">2</octet3>
+            <octet4 dataType="uint" bitLength="8">232</octet4>
+            <octet5 dataType="uint" bitLength="8">1</octet5>
+            <octet6 dataType="uint" bitLength="8">1</octet6>
+          </AmsNetId>
+        </amsNetId>
+        <portNumber>
+          <AdsPortNumbers dataType="uint" bitLength="16" stringRepresentation="SYSTEM_SERVICE">10000</AdsPortNumbers>
+        </portNumber>
+        <numBlocks dataType="uint" bitLength="32">0</numBlocks>
+        <blocks isList="true">
+        </blocks>
       </AdsDiscovery>
     </xml>
   </testcase>
@@ -302,29 +457,27 @@
     <root-type>AdsDiscovery</root-type>
     <xml>
       <AdsDiscovery>
-        <header dataType="uint" bitLength="32">57021553</header>
-        <reserved dataType="uint" bitLength="32">0</reserved>
+        <header dataType="uint" bitLength="32">1897162243</header>
+        <requestId dataType="uint" bitLength="32">0</requestId>
         <operation>
-          <Operation dataType="uint" bitLength="8" stringRepresentation="DISCOVERY">1</Operation>
+          <Operation dataType="uint" bitLength="32" stringRepresentation="DISCOVERY_REQUEST">1</Operation>
         </operation>
-        <reserved dataType="uint" bitLength="16">0</reserved>
-        <direction>
-          <Direction dataType="uint" bitLength="8" stringRepresentation="REQUEST">0</Direction>
-        </direction>
-        <DiscoveryRequest>
-          <amsNetId>
-            <AmsNetId>
-              <octet1 dataType="uint" bitLength="8">192</octet1>
-              <octet2 dataType="uint" bitLength="8">168</octet2>
-              <octet3 dataType="uint" bitLength="8">0</octet3>
-              <octet4 dataType="uint" bitLength="8">137</octet4>
-              <octet5 dataType="uint" bitLength="8">1</octet5>
-              <octet6 dataType="uint" bitLength="8">1</octet6>
-            </AmsNetId>
-          </amsNetId>
-          <reserved dataType="uint" bitLength="16">4135</reserved>
-          <reserved dataType="uint" bitLength="32">0</reserved>
-        </DiscoveryRequest>
+        <amsNetId>
+          <AmsNetId>
+            <octet1 dataType="uint" bitLength="8">192</octet1>
+            <octet2 dataType="uint" bitLength="8">168</octet2>
+            <octet3 dataType="uint" bitLength="8">0</octet3>
+            <octet4 dataType="uint" bitLength="8">137</octet4>
+            <octet5 dataType="uint" bitLength="8">1</octet5>
+            <octet6 dataType="uint" bitLength="8">1</octet6>
+          </AmsNetId>
+        </amsNetId>
+        <portNumber>
+          <AdsPortNumbers dataType="uint" bitLength="16" stringRepresentation="SYSTEM_SERVICE">10000</AdsPortNumbers>
+        </portNumber>
+        <numBlocks dataType="uint" bitLength="32">0</numBlocks>
+        <blocks isList="true">
+        </blocks>
       </AdsDiscovery>
     </xml>
   </testcase>
@@ -355,83 +508,106 @@
   -->
 
   <testcase>
-    <name>ADS Route Request (TC2)</name>
+    <name>ADS Add Route Request (TC2)</name>
     <raw>036614710000000006000000c0a8008901011027050000000c0010004445534b544f502d33504a314135440007000600c0a8008901010d000e0041646d696e6973747261746f72000200010000050010004445534b544f502d33504a3141354400</raw>
     <root-type>AdsDiscovery</root-type>
     <xml>
       <AdsDiscovery>
-        <header dataType="uint" bitLength="32">57021553</header>
-        <reserved dataType="uint" bitLength="32">0</reserved>
+        <header dataType="uint" bitLength="32">1897162243</header>
+        <requestId dataType="uint" bitLength="32">0</requestId>
         <operation>
-          <Operation dataType="uint" bitLength="8" stringRepresentation="ROUTE">6</Operation>
+          <Operation dataType="uint" bitLength="32" stringRepresentation="ADD_ROUTE_REQUEST">6</Operation>
         </operation>
-        <reserved dataType="uint" bitLength="16">0</reserved>
-        <direction>
-          <Direction dataType="uint" bitLength="8" stringRepresentation="REQUEST">0</Direction>
-        </direction>
-        <RouteRequest>
-          <sender>
-            <AmsNetId>
-              <octet1 dataType="uint" bitLength="8">192</octet1>
-              <octet2 dataType="uint" bitLength="8">168</octet2>
-              <octet3 dataType="uint" bitLength="8">0</octet3>
-              <octet4 dataType="uint" bitLength="8">137</octet4>
-              <octet5 dataType="uint" bitLength="8">1</octet5>
-              <octet6 dataType="uint" bitLength="8">1</octet6>
-            </AmsNetId>
-          </sender>
-          <reserved dataType="uint" bitLength="16">4135</reserved>
-          <reserved dataType="uint" bitLength="16">1280</reserved>
-          <reserved dataType="uint" bitLength="24">12</reserved>
-          <routeName>
-            <AmsMagicString>
-              <len dataType="uint" bitLength="16">16</len>
-              <reserved dataType="uint" bitLength="8">0</reserved>
-              <text dataType="string" bitLength="120" encoding="UTF-8">DESKTOP-3PJ1A5D</text>
-              <reserved dataType="uint" bitLength="8">0</reserved>
-            </AmsMagicString>
-          </routeName>
-          <reserved dataType="uint" bitLength="16">1792</reserved>
-          <amsSize dataType="uint" bitLength="8">6</amsSize>
-          <targetPrefix dataType="uint" bitLength="8">0</targetPrefix>
-          <target>
-            <AmsNetId>
-              <octet1 dataType="uint" bitLength="8">192</octet1>
-              <octet2 dataType="uint" bitLength="8">168</octet2>
-              <octet3 dataType="uint" bitLength="8">0</octet3>
-              <octet4 dataType="uint" bitLength="8">137</octet4>
-              <octet5 dataType="uint" bitLength="8">1</octet5>
-              <octet6 dataType="uint" bitLength="8">1</octet6>
-            </AmsNetId>
-          </target>
-          <usernamePrefix dataType="uint" bitLength="8">13</usernamePrefix>
-          <username>
-            <AmsMagicString>
-              <len dataType="uint" bitLength="16">14</len>
-              <reserved dataType="uint" bitLength="8">0</reserved>
-              <text dataType="string" bitLength="104" encoding="UTF-8">Administrator</text>
-              <reserved dataType="uint" bitLength="8">0</reserved>
-            </AmsMagicString>
-          </username>
-          <passwordPrefix dataType="uint" bitLength="8">2</passwordPrefix>
-          <password>
-            <AmsMagicString>
-              <len dataType="uint" bitLength="16">1</len>
-              <reserved dataType="uint" bitLength="8">0</reserved>
-              <text dataType="string" bitLength="0" encoding="UTF-8"></text>
-              <reserved dataType="uint" bitLength="8">0</reserved>
-            </AmsMagicString>
-          </password>
-          <routePrefix dataType="uint" bitLength="8">5</routePrefix>
-          <address>
-            <AmsMagicString>
-              <len dataType="uint" bitLength="16">16</len>
-              <reserved dataType="uint" bitLength="8">0</reserved>
-              <text dataType="string" bitLength="120" encoding="UTF-8">DESKTOP-3PJ1A5D</text>
-              <reserved dataType="uint" bitLength="8">0</reserved>
-            </AmsMagicString>
-          </address>
-        </RouteRequest>
+        <amsNetId>
+          <AmsNetId>
+            <octet1 dataType="uint" bitLength="8">192</octet1>
+            <octet2 dataType="uint" bitLength="8">168</octet2>
+            <octet3 dataType="uint" bitLength="8">0</octet3>
+            <octet4 dataType="uint" bitLength="8">137</octet4>
+            <octet5 dataType="uint" bitLength="8">1</octet5>
+            <octet6 dataType="uint" bitLength="8">1</octet6>
+          </AmsNetId>
+        </amsNetId>
+        <portNumber>
+          <AdsPortNumbers dataType="uint" bitLength="16" stringRepresentation="SYSTEM_SERVICE">10000</AdsPortNumbers>
+        </portNumber>
+        <numBlocks dataType="uint" bitLength="32">5</numBlocks>
+        <blocks isList="true">
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="ROUTE_NAME">12</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockRouteName>
+              <routeName>
+                <AmsString>
+                  <len dataType="uint" bitLength="16">16</len>
+                  <text dataType="string" bitLength="120" encoding="UTF-8">DESKTOP-3PJ1A5D</text>
+                  <reserved dataType="uint" bitLength="8">0</reserved>
+                </AmsString>
+              </routeName>
+            </AdsDiscoveryBlockRouteName>
+          </AdsDiscoveryBlock>
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="AMS_NET_ID">7</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockAmsNetId>
+              <amsNetIdLength dataType="uint" bitLength="16">6</amsNetIdLength>
+              <amsNetId>
+                <AmsNetId>
+                  <octet1 dataType="uint" bitLength="8">192</octet1>
+                  <octet2 dataType="uint" bitLength="8">168</octet2>
+                  <octet3 dataType="uint" bitLength="8">0</octet3>
+                  <octet4 dataType="uint" bitLength="8">137</octet4>
+                  <octet5 dataType="uint" bitLength="8">1</octet5>
+                  <octet6 dataType="uint" bitLength="8">1</octet6>
+                </AmsNetId>
+              </amsNetId>
+            </AdsDiscoveryBlockAmsNetId>
+          </AdsDiscoveryBlock>
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="USER_NAME">13</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockUserName>
+              <userName>
+                <AmsString>
+                  <len dataType="uint" bitLength="16">14</len>
+                  <text dataType="string" bitLength="104" encoding="UTF-8">Administrator</text>
+                  <reserved dataType="uint" bitLength="8">0</reserved>
+                </AmsString>
+              </userName>
+            </AdsDiscoveryBlockUserName>
+          </AdsDiscoveryBlock>
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="PASSWORD">2</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockPassword>
+              <password>
+                <AmsString>
+                  <len dataType="uint" bitLength="16">1</len>
+                  <text dataType="string" bitLength="0" encoding="UTF-8"></text>
+                  <reserved dataType="uint" bitLength="8">0</reserved>
+                </AmsString>
+              </password>
+            </AdsDiscoveryBlockPassword>
+          </AdsDiscoveryBlock>
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="HOST_NAME">5</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockHostName>
+              <hostName>
+                <AmsString>
+                  <len dataType="uint" bitLength="16">16</len>
+                  <text dataType="string" bitLength="120" encoding="UTF-8">DESKTOP-3PJ1A5D</text>
+                  <reserved dataType="uint" bitLength="8">0</reserved>
+                </AmsString>
+              </hostName>
+            </AdsDiscoveryBlockHostName>
+          </AdsDiscoveryBlock>
+        </blocks>
       </AdsDiscovery>
     </xml>
   </testcase>
@@ -442,34 +618,38 @@
     <root-type>AdsDiscovery</root-type>
     <xml>
       <AdsDiscovery>
-        <header dataType="uint" bitLength="32">57021553</header>
-        <reserved dataType="uint" bitLength="32">0</reserved>
+        <header dataType="uint" bitLength="32">1897162243</header>
+        <requestId dataType="uint" bitLength="32">0</requestId>
         <operation>
-          <Operation dataType="uint" bitLength="8" stringRepresentation="ROUTE">6</Operation>
+          <Operation dataType="uint" bitLength="32" stringRepresentation="ADD_ROUTE_RESPONSE">2147483654</Operation>
         </operation>
-        <reserved dataType="uint" bitLength="16">0</reserved>
-        <direction>
-          <Direction dataType="uint" bitLength="8" stringRepresentation="RESPONSE">128</Direction>
-        </direction>
-        <RouteResponse>
-          <amsNetId>
-            <AmsNetId>
-              <octet1 dataType="uint" bitLength="8">5</octet1>
-              <octet2 dataType="uint" bitLength="8">28</octet2>
-              <octet3 dataType="uint" bitLength="8">91</octet3>
-              <octet4 dataType="uint" bitLength="8">140</octet4>
-              <octet5 dataType="uint" bitLength="8">1</octet5>
-              <octet6 dataType="uint" bitLength="8">1</octet6>
-            </AmsNetId>
-          </amsNetId>
-          <reserved dataType="uint" bitLength="16">4135</reserved>
-          <reserved dataType="uint" bitLength="16">256</reserved>
-          <reserved dataType="uint" bitLength="32">256</reserved>
-          <status>
-            <RouteStatus dataType="uint" bitLength="24" stringRepresentation="SUCCESS">262144</RouteStatus>
-          </status>
-          <reserved dataType="uint" bitLength="24">0</reserved>
-        </RouteResponse>
+        <amsNetId>
+          <AmsNetId>
+            <octet1 dataType="uint" bitLength="8">5</octet1>
+            <octet2 dataType="uint" bitLength="8">28</octet2>
+            <octet3 dataType="uint" bitLength="8">91</octet3>
+            <octet4 dataType="uint" bitLength="8">140</octet4>
+            <octet5 dataType="uint" bitLength="8">1</octet5>
+            <octet6 dataType="uint" bitLength="8">1</octet6>
+          </AmsNetId>
+        </amsNetId>
+        <portNumber>
+          <AdsPortNumbers dataType="uint" bitLength="16" stringRepresentation="SYSTEM_SERVICE">10000</AdsPortNumbers>
+        </portNumber>
+        <numBlocks dataType="uint" bitLength="32">1</numBlocks>
+        <blocks isList="true">
+          <AdsDiscoveryBlock>
+            <blockType>
+              <AdsDiscoveryBlockType dataType="uint" bitLength="16" stringRepresentation="STATUS">1</AdsDiscoveryBlockType>
+            </blockType>
+            <AdsDiscoveryBlockStatus>
+              <statusLength dataType="uint" bitLength="16">4</statusLength>
+              <status>
+                <Status dataType="uint" bitLength="32" stringRepresentation="SUCCESS">0</Status>
+              </status>
+            </AdsDiscoveryBlockStatus>
+          </AdsDiscoveryBlock>
+        </blocks>
       </AdsDiscovery>
     </xml>
   </testcase>
diff --git a/plc4go/go.mod b/plc4go/go.mod
index acc8c15ad..f75cc69f3 100644
--- a/plc4go/go.mod
+++ b/plc4go/go.mod
@@ -41,6 +41,7 @@ require (
 	github.com/stretchr/testify v1.8.0
 	github.com/subchen/go-xmldom v1.1.2
 	github.com/viney-shih/go-lock v1.1.2
+	gopkg.in/yaml.v3 v3.0.1
 )
 
 require (
@@ -73,5 +74,4 @@ require (
 	golang.org/x/text v0.3.7 // indirect
 	gopkg.in/ini.v1 v1.66.4 // indirect
 	gopkg.in/yaml.v2 v2.4.0 // indirect
-	gopkg.in/yaml.v3 v3.0.1 // indirect
 )
diff --git a/plc4go/protocols/ads/readwrite/ParserHelper.go b/plc4go/protocols/ads/readwrite/ParserHelper.go
index 4aeaf8103..802fd848c 100644
--- a/plc4go/protocols/ads/readwrite/ParserHelper.go
+++ b/plc4go/protocols/ads/readwrite/ParserHelper.go
@@ -65,6 +65,8 @@ func (m AdsParserHelper) Parse(typeName string, arguments []string, io utils.Rea
 		return model.AdsStampHeaderParse(io)
 	case "AmsSerialResetFrame":
 		return model.AmsSerialResetFrameParse(io)
+	case "AdsConstants":
+		return model.AdsConstantsParse(io)
 	case "AdsNotificationSample":
 		return model.AdsNotificationSampleParse(io)
 	case "AmsTCPPacket":
diff --git a/plc4go/protocols/ads/readwrite/XmlParserHelper.go b/plc4go/protocols/ads/readwrite/XmlParserHelper.go
index f27e6b08b..e09831b45 100644
--- a/plc4go/protocols/ads/readwrite/XmlParserHelper.go
+++ b/plc4go/protocols/ads/readwrite/XmlParserHelper.go
@@ -72,6 +72,8 @@ func (m AdsXmlParserHelper) Parse(typeName string, xmlString string, parserArgum
 		return model.AdsStampHeaderParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
 	case "AmsSerialResetFrame":
 		return model.AmsSerialResetFrameParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+	case "AdsConstants":
+		return model.AdsConstantsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
 	case "AdsNotificationSample":
 		return model.AdsNotificationSampleParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
 	case "AmsTCPPacket":


[plc4x] 02/04: chore(protocols/opcua): Made the build compatible with my recent changes regarding 32bit unsigned constants.

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

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

commit de09319069219b01d3849f00308880e5a068abd7
Author: christoferdutz <ch...@c-ware.de>
AuthorDate: Mon Aug 1 13:32:10 2022 +0200

    chore(protocols/opcua): Made the build compatible with my recent changes regarding 32bit unsigned constants.
---
 protocols/opcua/src/main/xslt/opc-status.xsl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/protocols/opcua/src/main/xslt/opc-status.xsl b/protocols/opcua/src/main/xslt/opc-status.xsl
index 41f252dda..62165dc4e 100644
--- a/protocols/opcua/src/main/xslt/opc-status.xsl
+++ b/protocols/opcua/src/main/xslt/opc-status.xsl
@@ -53,7 +53,7 @@
 [enum uint 32 OpcuaStatusCode<xsl:text>
     </xsl:text>
         <xsl:for-each select="$tokenizedLine">
-            <xsl:variable select="tokenize(., ',')" name="values" />    ['<xsl:value-of select="$values[2]"/>L'  <xsl:value-of select="$values[1]"/>]<xsl:text>
+            <xsl:variable select="tokenize(., ',')" name="values" />    ['<xsl:value-of select="$values[2]"/>'  <xsl:value-of select="$values[1]"/>]<xsl:text>
     </xsl:text>
         </xsl:for-each>
 ]


[plc4x] 01/04: chore(ads): Added some more types and constants

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

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

commit 93174d326cac72c953f74493053f211cbb2bf66c
Author: christoferdutz <ch...@c-ware.de>
AuthorDate: Mon Aug 1 13:31:15 2022 +0200

    chore(ads): Added some more types and constants
---
 .../ads/src/main/resources/protocols/ads/ads-discovery.mspec | 12 ++++++++++++
 protocols/ads/src/main/resources/protocols/ads/ads.mspec     |  4 ++++
 2 files changed, 16 insertions(+)

diff --git a/protocols/ads/src/main/resources/protocols/ads/ads-discovery.mspec b/protocols/ads/src/main/resources/protocols/ads/ads-discovery.mspec
index ef362e375..bb4867c19 100644
--- a/protocols/ads/src/main/resources/protocols/ads/ads-discovery.mspec
+++ b/protocols/ads/src/main/resources/protocols/ads/ads-discovery.mspec
@@ -114,10 +114,22 @@
     ['0x80000000' GET_AMS_NET_ID_RESPONSE]
     ['0x00000001' DISCOVERY_REQUEST      ]
     ['0x80000001' DISCOVERY_RESPONSE     ]
+    ['0x00000002' UNKNOWN_2_REQUEST ]
+    ['0x80000002' UNKNOWN_2_RESPONSE]
+    ['0x00000003' UNKNOWN_3_REQUEST ]
+    ['0x80000003' UNKNOWN_3_RESPONSE]
+    ['0x00000004' UNKNOWN_4_REQUEST ]
+    ['0x80000004' UNKNOWN_4_RESPONSE]
+    ['0x00000005' UNKNOWN_5_REQUEST ]
+    ['0x80000005' UNKNOWN_5_RESPONSE]
     ['0x00000006' ADD_ROUTE_REQUEST      ]
     ['0x80000006' ADD_ROUTE_RESPONSE     ]
     ['0x00000007' DEL_ROUTE_REQUEST      ]
     ['0x80000007' DEL_ROUTE_RESPONSE     ]
+    ['0x00000008' UNKNOWN_8_REQUEST ]
+    ['0x80000008' UNKNOWN_8_RESPONSE]
+    ['0x00000009' UNKNOWN_9_REQUEST ]
+    ['0x80000009' UNKNOWN_9_RESPONSE]
 ]
 
 [enum uint 32 Status
diff --git a/protocols/ads/src/main/resources/protocols/ads/ads.mspec b/protocols/ads/src/main/resources/protocols/ads/ads.mspec
index dd5f6de7b..f8b69bb1d 100644
--- a/protocols/ads/src/main/resources/protocols/ads/ads.mspec
+++ b/protocols/ads/src/main/resources/protocols/ads/ads.mspec
@@ -17,6 +17,10 @@
  * under the License.
  */
 
+[type AdsConstants
+    [const          uint 16     adsTcpDefaultPort 48898]
+]
+
 ////////////////////////////////////////////////////////////////
 // AMS/TCP Packet
 ////////////////////////////////////////////////////////////////


[plc4x] 03/04: chore(knx): Added new manufacturers for KNX.

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

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

commit b5f3117a8de6b788992bba801622215fc5bbc39c
Author: christoferdutz <ch...@c-ware.de>
AuthorDate: Mon Aug 1 13:32:39 2022 +0200

    chore(knx): Added new manufacturers for KNX.
---
 .../knxnetip/readwrite/model/KnxManufacturer.go    | 26 +++++++++++++++++-----
 .../knxnetip/readwrite/model/KnxManufacturer.cs    | 19 +++++++++++-----
 2 files changed, 34 insertions(+), 11 deletions(-)

diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxManufacturer.go b/plc4go/protocols/knxnetip/readwrite/model/KnxManufacturer.go
index b4930814a..f02aad83a 100644
--- a/plc4go/protocols/knxnetip/readwrite/model/KnxManufacturer.go
+++ b/plc4go/protocols/knxnetip/readwrite/model/KnxManufacturer.go
@@ -630,8 +630,9 @@ const (
 	KnxManufacturer_M_FEISHELEC                                          KnxManufacturer = 590
 	KnxManufacturer_M_GORDIC                                             KnxManufacturer = 591
 	KnxManufacturer_M_DELTA_ELECTRONICS                                  KnxManufacturer = 592
-	KnxManufacturer_M_ABB___RESERVED                                     KnxManufacturer = 593
-	KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED                    KnxManufacturer = 594
+	KnxManufacturer_M_SHANGHAI_LEWIN_INTELLIGENT_TECHNOLOGY_CO__LTD_     KnxManufacturer = 593
+	KnxManufacturer_M_ABB___RESERVED                                     KnxManufacturer = 594
+	KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED                    KnxManufacturer = 595
 )
 
 var KnxManufacturerValues []KnxManufacturer
@@ -1232,6 +1233,7 @@ func init() {
 		KnxManufacturer_M_FEISHELEC,
 		KnxManufacturer_M_GORDIC,
 		KnxManufacturer_M_DELTA_ELECTRONICS,
+		KnxManufacturer_M_SHANGHAI_LEWIN_INTELLIGENT_TECHNOLOGY_CO__LTD_,
 		KnxManufacturer_M_ABB___RESERVED,
 		KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED,
 	}
@@ -3437,10 +3439,14 @@ func (e KnxManufacturer) Number() uint16 {
 		}
 	case 593:
 		{ /* '593' */
-			return 43954
+			return 651
 		}
 	case 594:
 		{ /* '594' */
+			return 43954
+		}
+	case 595:
+		{ /* '595' */
 			return 43959
 		}
 	case 6:
@@ -5835,10 +5841,14 @@ func (e KnxManufacturer) Name() string {
 		}
 	case 593:
 		{ /* '593' */
-			return "ABB - reserved"
+			return "Shanghai Lewin Intelligent Technology Co.,Ltd."
 		}
 	case 594:
 		{ /* '594' */
+			return "ABB - reserved"
+		}
+	case 595:
+		{ /* '595' */
 			return "Busch-Jaeger Elektro - reserved"
 		}
 	case 6:
@@ -7133,8 +7143,10 @@ func KnxManufacturerByValue(value uint16) (enum KnxManufacturer, ok bool) {
 	case 592:
 		return KnxManufacturer_M_DELTA_ELECTRONICS, true
 	case 593:
-		return KnxManufacturer_M_ABB___RESERVED, true
+		return KnxManufacturer_M_SHANGHAI_LEWIN_INTELLIGENT_TECHNOLOGY_CO__LTD_, true
 	case 594:
+		return KnxManufacturer_M_ABB___RESERVED, true
+	case 595:
 		return KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED, true
 	case 6:
 		return KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO, true
@@ -8328,6 +8340,8 @@ func KnxManufacturerByName(value string) (enum KnxManufacturer, ok bool) {
 		return KnxManufacturer_M_GORDIC, true
 	case "M_DELTA_ELECTRONICS":
 		return KnxManufacturer_M_DELTA_ELECTRONICS, true
+	case "M_SHANGHAI_LEWIN_INTELLIGENT_TECHNOLOGY_CO__LTD_":
+		return KnxManufacturer_M_SHANGHAI_LEWIN_INTELLIGENT_TECHNOLOGY_CO__LTD_, true
 	case "M_ABB___RESERVED":
 		return KnxManufacturer_M_ABB___RESERVED, true
 	case "M_BUSCH_JAEGER_ELEKTRO___RESERVED":
@@ -9569,6 +9583,8 @@ func (e KnxManufacturer) PLC4XEnumName() string {
 		return "M_GORDIC"
 	case KnxManufacturer_M_DELTA_ELECTRONICS:
 		return "M_DELTA_ELECTRONICS"
+	case KnxManufacturer_M_SHANGHAI_LEWIN_INTELLIGENT_TECHNOLOGY_CO__LTD_:
+		return "M_SHANGHAI_LEWIN_INTELLIGENT_TECHNOLOGY_CO__LTD_"
 	case KnxManufacturer_M_ABB___RESERVED:
 		return "M_ABB___RESERVED"
 	case KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED:
diff --git a/plc4net/drivers/knxnetip/src/drivers/knxnetip/readwrite/model/KnxManufacturer.cs b/plc4net/drivers/knxnetip/src/drivers/knxnetip/readwrite/model/KnxManufacturer.cs
index 7e1adac6e..2f99ff138 100644
--- a/plc4net/drivers/knxnetip/src/drivers/knxnetip/readwrite/model/KnxManufacturer.cs
+++ b/plc4net/drivers/knxnetip/src/drivers/knxnetip/readwrite/model/KnxManufacturer.cs
@@ -617,8 +617,9 @@ namespace org.apache.plc4net.drivers.knxnetip.readwrite.model
         M_FEISHELEC = 590,
         M_GORDIC = 591,
         M_DELTA_ELECTRONICS = 592,
-        M_ABB___RESERVED = 593,
-        M_BUSCH_JAEGER_ELEKTRO___RESERVED = 594,
+        M_SHANGHAI_LEWIN_INTELLIGENT_TECHNOLOGY_CO__LTD_ = 593,
+        M_ABB___RESERVED = 594,
+        M_BUSCH_JAEGER_ELEKTRO___RESERVED = 595,
     }
 
     public static class KnxManufacturerInfo
@@ -2275,10 +2276,13 @@ namespace org.apache.plc4net.drivers.knxnetip.readwrite.model
                 case KnxManufacturer.M_DELTA_ELECTRONICS: { /* '592' */
                     return 650;
                 }
-                case KnxManufacturer.M_ABB___RESERVED: { /* '593' */
+                case KnxManufacturer.M_SHANGHAI_LEWIN_INTELLIGENT_TECHNOLOGY_CO__LTD_: { /* '593' */
+                    return 651;
+                }
+                case KnxManufacturer.M_ABB___RESERVED: { /* '594' */
                     return 43954;
                 }
-                case KnxManufacturer.M_BUSCH_JAEGER_ELEKTRO___RESERVED: { /* '594' */
+                case KnxManufacturer.M_BUSCH_JAEGER_ELEKTRO___RESERVED: { /* '595' */
                     return 43959;
                 }
                 case KnxManufacturer.M_BUSCH_JAEGER_ELEKTRO: { /* '6' */
@@ -4070,10 +4074,13 @@ namespace org.apache.plc4net.drivers.knxnetip.readwrite.model
                 case KnxManufacturer.M_DELTA_ELECTRONICS: { /* '592' */
                     return "Delta Electronics";
                 }
-                case KnxManufacturer.M_ABB___RESERVED: { /* '593' */
+                case KnxManufacturer.M_SHANGHAI_LEWIN_INTELLIGENT_TECHNOLOGY_CO__LTD_: { /* '593' */
+                    return "Shanghai Lewin Intelligent Technology Co.,Ltd.";
+                }
+                case KnxManufacturer.M_ABB___RESERVED: { /* '594' */
                     return "ABB - reserved";
                 }
-                case KnxManufacturer.M_BUSCH_JAEGER_ELEKTRO___RESERVED: { /* '594' */
+                case KnxManufacturer.M_BUSCH_JAEGER_ELEKTRO___RESERVED: { /* '595' */
                     return "Busch-Jaeger Elektro - reserved";
                 }
                 case KnxManufacturer.M_BUSCH_JAEGER_ELEKTRO: { /* '6' */