feat(abcip): thread nested-struct template id so nested UDT members are addressable (#6)

This commit is contained in:
Joseph Doherty
2026-06-18 11:33:41 -04:00
parent 56c136b0fd
commit 3d8ce4e85f
5 changed files with 122 additions and 13 deletions
@@ -54,8 +54,16 @@ public sealed record AbCipUdtShape(
IReadOnlyList<AbCipUdtMember> Members);
/// <summary>One member of a Logix UDT.</summary>
/// <param name="Name">Member name as reported by the Template Object.</param>
/// <param name="Offset">Byte offset of the member from the struct start.</param>
/// <param name="DataType">Decoded member data type (<see cref="AbCipDataType.Structure"/> for a nested UDT).</param>
/// <param name="ArrayLength">Element count (1 for a scalar member).</param>
/// <param name="NestedTemplateId">For a nested-struct member, the nested UDT's CIP template instance id
/// (low 12 bits of the member info, same encoding as the Symbol Object) so the nested shape can be
/// fetched via <see cref="AbCipDriver.FetchUdtShapeAsync"/>; <c>null</c> for a scalar member.</param>
public sealed record AbCipUdtMember(
string Name,
int Offset,
AbCipDataType DataType,
int ArrayLength);
int ArrayLength,
uint? NestedTemplateId = null);