Auto: abcip-1.3 — array-slice read addressing

Closes #227
This commit is contained in:
Joseph Doherty
2026-04-25 13:03:45 -04:00
parent 29edd835a3
commit 767ac4aec5
8 changed files with 480 additions and 6 deletions

View File

@@ -30,6 +30,11 @@ internal sealed class LibplctagTagRuntime : IAbCipTagRuntime
// boundary. Null leaves libplctag at its default 82-byte STRING for back-compat.
if (p.StringMaxCapacity is int cap && cap > 0)
_tag.StringMaxCapacity = (uint)cap;
// PR abcip-1.3 — slice reads. Setting ElementCount tells libplctag to allocate a buffer
// covering N consecutive elements; the array-read planner pairs this with TagName=Tag[N]
// to issue one Rockwell array read for a [N..M] slice.
if (p.ElementCount is int n && n > 0)
_tag.ElementCount = n;
}
public Task InitializeAsync(CancellationToken cancellationToken) => _tag.InitializeAsync(cancellationToken);