Verifies libplctag's GetString/SetString round-trips ST file strings (1-word length prefix + 82 ASCII bytes) end-to-end through the driver, and adds a client-side length guard so over-82-char writes return BadOutOfRange instead of being silently truncated by libplctag. - LibplctagLegacyTagRuntime.EncodeValue: throws ArgumentOutOfRangeException for >82-char String writes (StFileMaxStringLength constant). - AbLegacyDriver.WriteAsync: catches ArgumentOutOfRangeException and maps to BadOutOfRange. - AbLegacyStringEncodingTests: 16 unit tests covering empty / 41-char / 82-char / embedded-NUL / non-ASCII reads + writes; over-length writes return BadOutOfRange and never call WriteAsync; both Slc500 and Plc5 family paths exercised. Closes #249 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
23 KiB
23 KiB