feat(composer): admit GalaxyMxGateway-backed equipment alias tags (+byte-parity)
This commit is contained in:
@@ -362,11 +362,16 @@ public static class Phase7Composer
|
||||
// Equipment tags = the inverse filter: a Tag bound to an Equipment (non-null EquipmentId)
|
||||
// whose driver's namespace is Equipment-kind. FullName is the driver-side wire reference
|
||||
// pulled from TagConfig — it becomes the variable's NodeId + read/write routing key.
|
||||
// A Galaxy alias is the one exception to the Equipment-kind namespace rule: a GalaxyMxGateway
|
||||
// driver lives in a SystemPlatform-kind namespace, yet an equipment-scoped alias Tag bound to
|
||||
// it must still surface as an equipment tag — so admit those by DriverType. The galaxyTags
|
||||
// producer keeps its `t.EquipmentId is null` guard, so an alias (EquipmentId set) never
|
||||
// double-counts there.
|
||||
var equipmentTags = tags
|
||||
.Where(t => t.EquipmentId is not null)
|
||||
.Where(t => driversById.TryGetValue(t.DriverInstanceId, out var di)
|
||||
&& namespacesById.TryGetValue(di.NamespaceId, out var ns)
|
||||
&& ns.Kind == NamespaceKind.Equipment)
|
||||
&& (ns.Kind == NamespaceKind.Equipment || di.DriverType == "GalaxyMxGateway"))
|
||||
.OrderBy(t => t.EquipmentId, StringComparer.Ordinal)
|
||||
.ThenBy(t => t.FolderPath ?? string.Empty, StringComparer.Ordinal) // coalesce so the sort matches the artifact-decode side exactly
|
||||
.ThenBy(t => t.Name, StringComparer.Ordinal)
|
||||
|
||||
Reference in New Issue
Block a user