test(alarms): advise AlarmExtension diagnostics to discover the alarm source attribute
This commit is contained in:
@@ -380,10 +380,19 @@ public sealed class AlarmSubtagLiveSmokeTests
|
|||||||
|
|
||||||
// Advise the alarm subtags (InAlarm/Acked/Priority/AckMsg).
|
// Advise the alarm subtags (InAlarm/Acked/Priority/AckMsg).
|
||||||
consumer.Subscribe(string.Format(@"\\{0}\Galaxy!{1}", Environment.MachineName, Group));
|
consumer.Subscribe(string.Format(@"\\{0}\Galaxy!{1}", Environment.MachineName, Group));
|
||||||
// Also advise the source attribute so it is an active, writable item
|
// Also advise the source attribute + AlarmExtension diagnostic fields so
|
||||||
// (MXAccess rejects writes to added-but-not-advised items).
|
// we can discover which attribute actually drives the alarm
|
||||||
source.Advise(new List<string> { AlarmSourceTag });
|
// (AlarmSourceAttr names it) before attempting to write.
|
||||||
Log("Subscribed + advised source. Pumping to activate items ...");
|
source.Advise(new List<string>
|
||||||
|
{
|
||||||
|
AlarmSourceTag,
|
||||||
|
AlarmSourceTag + ".AlarmSourceAttr",
|
||||||
|
AlarmSourceTag + ".Condition",
|
||||||
|
AlarmSourceTag + ".AlarmMode",
|
||||||
|
AlarmSourceTag + ".ActiveAlarmState",
|
||||||
|
AlarmSourceTag + ".DescAttrName",
|
||||||
|
});
|
||||||
|
Log("Subscribed + advised source + diagnostics. Pumping to activate items ...");
|
||||||
PumpFor(TimeSpan.FromSeconds(7));
|
PumpFor(TimeSpan.FromSeconds(7));
|
||||||
|
|
||||||
// Baseline OFF: drive the source false and drain whatever transitions
|
// Baseline OFF: drive the source false and drain whatever transitions
|
||||||
|
|||||||
Reference in New Issue
Block a user