This is an automated email from the ASF dual-hosted git repository. cdutz pushed a commit to branch feature/cdutz/go-ads-ng in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 03c9fdb76008b1a6c822c3affaa84eef970f1a78 Author: Christofer Dutz <[email protected]> AuthorDate: Tue Nov 1 19:19:55 2022 +0100 chore(protocols): Added a pointer to a possibly interesting protocol specification. - renamed the property "len" to "strLen" to avoid problems in Go --- .../main/resources/protocols/ads/ads-discovery.mspec | 6 +++--- .../protocols/ads/AdsDiscoverySerializerTest.xml | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) 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 44dfcb8ce..a8bcb78dd 100644 --- a/protocols/ads/src/main/resources/protocols/ads/ads-discovery.mspec +++ b/protocols/ads/src/main/resources/protocols/ads/ads-discovery.mspec @@ -135,9 +135,9 @@ ] [type AmsString - [implicit uint 16 len 'STR_LEN(text) + 1'] - [simple vstring '8 * (len - 1)' text encoding='"UTF-8"' ] - [reserved uint 8 '0x00' ] + [implicit uint 16 strLen 'STR_LEN(text) + 1'] + [simple vstring '8 * (strLen - 1)' text encoding='"UTF-8"' ] + [reserved uint 8 '0x00' ] ] [type AmsNetId diff --git a/protocols/ads/src/test/resources/protocols/ads/AdsDiscoverySerializerTest.xml b/protocols/ads/src/test/resources/protocols/ads/AdsDiscoverySerializerTest.xml index 0d8c92de3..eeef853c5 100644 --- a/protocols/ads/src/test/resources/protocols/ads/AdsDiscoverySerializerTest.xml +++ b/protocols/ads/src/test/resources/protocols/ads/AdsDiscoverySerializerTest.xml @@ -89,7 +89,7 @@ <AdsDiscoveryBlockHostName> <hostName> <AmsString> - <len dataType="uint" bitLength="16">16</len> + <strLen dataType="uint" bitLength="16">16</strLen> <text dataType="string" bitLength="120" encoding="UTF-8">DESKTOP-T0N6UNB</text> <reserved dataType="uint" bitLength="8">0</reserved> </AmsString> @@ -192,7 +192,7 @@ <AdsDiscoveryBlockHostName> <hostName> <AmsString> - <len dataType="uint" bitLength="16">7</len> + <strLen dataType="uint" bitLength="16">7</strLen> <text dataType="string" bitLength="48" encoding="UTF-8">BK_IPC</text> <reserved dataType="uint" bitLength="8">0</reserved> </AmsString> @@ -264,7 +264,7 @@ <AdsDiscoveryBlockRouteName> <routeName> <AmsString> - <len dataType="uint" bitLength="16">12</len> + <strLen dataType="uint" bitLength="16">12</strLen> <text dataType="string" bitLength="88" encoding="UTF-8">10.10.10.10</text> <reserved dataType="uint" bitLength="8">0</reserved> </AmsString> @@ -296,7 +296,7 @@ <AdsDiscoveryBlockUserName> <userName> <AmsString> - <len dataType="uint" bitLength="16">9</len> + <strLen dataType="uint" bitLength="16">9</strLen> <text dataType="string" bitLength="64" encoding="UTF-8">username</text> <reserved dataType="uint" bitLength="8">0</reserved> </AmsString> @@ -310,7 +310,7 @@ <AdsDiscoveryBlockPassword> <password> <AmsString> - <len dataType="uint" bitLength="16">9</len> + <strLen dataType="uint" bitLength="16">9</strLen> <text dataType="string" bitLength="64" encoding="UTF-8">password</text> <reserved dataType="uint" bitLength="8">0</reserved> </AmsString> @@ -324,7 +324,7 @@ <AdsDiscoveryBlockHostName> <hostName> <AmsString> - <len dataType="uint" bitLength="16">12</len> + <strLen dataType="uint" bitLength="16">12</strLen> <text dataType="string" bitLength="88" encoding="UTF-8">10.10.10.10</text> <reserved dataType="uint" bitLength="8">0</reserved> </AmsString> @@ -539,7 +539,7 @@ <AdsDiscoveryBlockRouteName> <routeName> <AmsString> - <len dataType="uint" bitLength="16">16</len> + <strLen dataType="uint" bitLength="16">16</strLen> <text dataType="string" bitLength="120" encoding="UTF-8">DESKTOP-3PJ1A5D</text> <reserved dataType="uint" bitLength="8">0</reserved> </AmsString> @@ -571,7 +571,7 @@ <AdsDiscoveryBlockUserName> <userName> <AmsString> - <len dataType="uint" bitLength="16">14</len> + <strLen dataType="uint" bitLength="16">14</strLen> <text dataType="string" bitLength="104" encoding="UTF-8">Administrator</text> <reserved dataType="uint" bitLength="8">0</reserved> </AmsString> @@ -585,7 +585,7 @@ <AdsDiscoveryBlockPassword> <password> <AmsString> - <len dataType="uint" bitLength="16">1</len> + <strLen dataType="uint" bitLength="16">1</strLen> <text dataType="string" bitLength="0" encoding="UTF-8"></text> <reserved dataType="uint" bitLength="8">0</reserved> </AmsString> @@ -599,7 +599,7 @@ <AdsDiscoveryBlockHostName> <hostName> <AmsString> - <len dataType="uint" bitLength="16">16</len> + <strLen dataType="uint" bitLength="16">16</strLen> <text dataType="string" bitLength="120" encoding="UTF-8">DESKTOP-3PJ1A5D</text> <reserved dataType="uint" bitLength="8">0</reserved> </AmsString>
