chrisdutz commented on code in PR #352:
URL: https://github.com/apache/plc4x/pull/352#discussion_r854001057


##########
protocols/modbus/src/main/resources/protocols/modbus/modbus.mspec:
##########
@@ -416,6 +416,15 @@
         ['WCHAR' List
             [array uint 16 value count 'numberOfValues']
         ]
+        ['STRING','1' STRING
+            [simple vstring '8' value encoding='"UTF-8"']
+        ]
+        ['STRING' List
+            [simple vstring '8 * numberOfValues' value encoding='"UTF-8"']

Review Comment:
   I think you are mis-understanding the concept here ... 
   A field of type "string" or "vstring" can contain a string of multiple 
characters. But with "STRING[10]" we are not reading one String with a length 
of 10 characters, but 10 strings of individual length (In S7 this would be 255 
chars long) ... if you want to explicitly control the string lenght that you 
want to read use round bracets ... so STRING(10)[20] would read 20 strings of 
each 10 chars length. You are currently mixing up the array size and the lenght.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to