test(abcip): read-only differential harness comparing native and libplctag on one target

This commit is contained in:
Joseph Doherty
2026-10-07 17:58:47 -04:00
parent d1ad2600d1
commit 0e20a8e5a9
7 changed files with 831 additions and 1 deletions
@@ -53,6 +53,12 @@ internal sealed class LibplctagTagRuntime : IAbCipTagRuntime
/// <inheritdoc />
public int GetSize() => LibplctagStatusTranslation.WrapSync(() => _tag.GetSize());
/// <summary>
/// A copy of the bytes of the last read, for the read-only differential harness (Task 18) to compare
/// against the native runtime byte for byte. Not part of <see cref="IAbCipTagRuntime"/>.
/// </summary>
internal ReadOnlyMemory<byte> RawBuffer => LibplctagStatusTranslation.WrapSync(() => _tag.GetBuffer());
/// <inheritdoc />
public object? DecodeValue(AbCipDataType type, int? bitIndex) => DecodeValueAt(type, 0, bitIndex);
@@ -209,6 +209,12 @@ internal sealed class NativeAbCipTagRuntime : IAbCipTagRuntime
/// <inheritdoc />
public int GetSize() => _data.Length;
/// <summary>
/// The bytes of the last read, for the read-only differential harness (Task 18) to compare against
/// libplctag byte for byte. Not part of <see cref="IAbCipTagRuntime"/>.
/// </summary>
internal ReadOnlyMemory<byte> RawBuffer => _data;
/// <inheritdoc />
public object? DecodeValue(AbCipDataType type, int? bitIndex) => DecodeValueAt(type, 0, bitIndex);
@@ -28,6 +28,7 @@
<ItemGroup>
<InternalsVisibleTo Include="ZB.MOM.WW.OtOpcUa.Driver.AbCip.Tests"/>
<InternalsVisibleTo Include="ZB.MOM.WW.OtOpcUa.Driver.AbCip.IntegrationTests"/>
</ItemGroup>
</Project>