Merge #839 #846 Heidenhain alarms + MTConnect comms loss

This commit is contained in:
Joseph Doherty
2026-11-11 03:50:08 -05:00
23 changed files with 1115 additions and 49 deletions
@@ -122,4 +122,27 @@ public sealed class HeidenhainAuthoringTests
TagConfigValidator.Validate(DriverTypeNames.Heidenhain, json).ShouldBeNull();
HeidenhainTagConfigModel.FromJson(json).Address.ShouldBe(address);
}
/// <summary>
/// lmxopcua#839: every <c>ALARM:</c> selector the browse picker offers commits as a complete condition tag — the
/// paired <c>alarm</c> object seeded, Boolean, accepted by the driver's own factory and the editor's validator —
/// so a browse-commit never lands a tag the deploy gate would refuse.
/// </summary>
[Fact]
public void Browse_committed_alarm_selectors_are_complete_conditions_the_driver_accepts()
{
HeidenhainAlarmClasses.BrowseSelectors.Count.ShouldBeGreaterThan(2);
foreach (var (_, name, address) in HeidenhainAlarmClasses.BrowseSelectors)
{
var row = RawBrowseCommitMapper.MapLeaf(
DriverTypeNames.Heidenhain, address, name, nameof(DriverDataType.Boolean), "String",
groupPrefix: null, folderPath: null, createGroups: false);
row.Tag.DataType.ShouldBe("Boolean");
var json = row.Tag.TagConfig!;
JsonNode.Parse(json)!["alarm"].ShouldNotBeNull(address);
HeidenhainTagDefinitionFactory.TryFromTagConfig("p", "d", json, out var def, out var error).ShouldBeTrue(error);
def!.IsAlarmCondition.ShouldBeTrue();
TagConfigValidator.Validate(DriverTypeNames.Heidenhain, json).ShouldBeNull();
}
}
}