test(alarms): log raw source value-changes to capture source attribute type

This commit is contained in:
Joseph Doherty
2026-06-13 11:35:36 -04:00
parent 6226f2d864
commit 0213272d0a
@@ -368,6 +368,16 @@ public sealed class AlarmSubtagLiveSmokeTests
transitions.Enqueue(e);
};
// Log every raw subtag/source value-change so we can see the source
// attribute's runtime type + value (to drive it with the right type).
source.ValueChanged += (_, c) =>
{
string v = c.Value == null
? "<null>"
: string.Format("{0} ({1})", c.Value, c.Value.GetType().Name);
Log(string.Format("raw ValueChanged: {0} = {1}", c.ItemAddress, v));
};
// Advise the alarm subtags (InAlarm/Acked/Priority/AckMsg).
consumer.Subscribe(string.Format(@"\\{0}\Galaxy!{1}", Environment.MachineName, Group));
// Also advise the source attribute so it is an active, writable item