Merge B1-focas: v3 RawPath read-path

This commit is contained in:
Joseph Doherty
2026-07-15 20:20:49 -04:00
23 changed files with 467 additions and 350 deletions
@@ -74,9 +74,12 @@ public sealed class FocasCommandBaseBuildOptionsTests
options.Devices[0].Series.ShouldBe(FocasCncSeries.Zero_i_F);
}
/// <summary>Verifies that BuildOptions forwards tag list verbatim.</summary>
/// <summary>
/// Verifies that BuildOptions turns each typed def into a v3 <c>RawTagEntry</c> — RawPath = def.Name,
/// DeviceName = def.DeviceHostAddress, and a TagConfig blob that round-trips through the mapper.
/// </summary>
[Fact]
public void BuildOptions_forwards_tag_list_verbatim()
public void BuildOptions_maps_tags_to_rawtag_entries()
{
var sut = new ProbeOnly { CncHost = "h" };
var tag = new FocasTagDefinition(
@@ -88,7 +91,14 @@ public sealed class FocasCommandBaseBuildOptionsTests
var options = sut.Invoke([tag]);
options.Tags.Count.ShouldBe(1);
options.Tags[0].ShouldBeSameAs(tag);
options.RawTags.Count.ShouldBe(1);
var entry = options.RawTags[0];
entry.RawPath.ShouldBe("t");
entry.DeviceName.ShouldBe("focas://h:8193");
entry.WriteIdempotent.ShouldBeFalse();
FocasTagDefinitionFactory.FromTagConfig(entry.TagConfig, entry.RawPath, out var round).ShouldBeTrue();
round.Address.ShouldBe("R100");
round.DataType.ShouldBe(FocasDataType.Int16);
round.Writable.ShouldBeFalse();
}
}