feat(alarms): materialise a Part 9 condition for an alarm equipment tag (Phase B WS-3)

This commit is contained in:
Joseph Doherty
2026-06-14 03:37:51 -04:00
parent 4c56a1719b
commit b50ef9fc2d
2 changed files with 75 additions and 1 deletions
@@ -189,7 +189,16 @@ public sealed class Phase7Applier
? tag.EquipmentId
: EquipmentNodeIds.SubFolder(tag.EquipmentId, tag.FolderPath);
var nodeId = EquipmentNodeIds.Variable(tag.EquipmentId, tag.FolderPath, tag.Name);
SafeEnsureVariable(nodeId, parent, tag.Name, tag.DataType, tag.Writable);
if (tag.Alarm is not null)
{
// Native alarm tag → a real Part 9 condition node (reuses the scripted-alarm path),
// NOT a value variable. Parent is the sub-folder when set, else the equipment folder.
SafeMaterialiseAlarmCondition(nodeId, parent, tag.Name, tag.Alarm.AlarmType, tag.Alarm.Severity);
}
else
{
SafeEnsureVariable(nodeId, parent, tag.Name, tag.DataType, tag.Writable);
}
}
_logger.LogInformation(