probe: subscribe-parameter sweep — alarms still absent, producer-side blocked
Tried every documented subscription knob with InitializeConsumer present + provider visible at status 100: - qtSummary AND qtHistory (the only eQueryType values). - Priority 1..999 AND 0..32767. - FilterMask/Spec asNone AND asAlarmActiveNow. eAlarmFilterState is single-state-valued (asNone=0, asAlarmActiveNow=1, asAlarmAcked=2, asShelved=3), not flag bits, so the filter surface is exhausted. GetStatistics continued to report total=0 active=0 codes=[7] for every poll across all combinations. User confirmation: the BoolAlarm extension on TestMachine_001.TestAlarm001 is evaluating (the $Alarm.InAlarm sub-attribute flips true/false in lockstep with the script writes, visible in aaObjectViewer). So the consumer chain is verified working end-to-end on our side. What's missing is producer-side publication into the aaAlarmManagedClient stream. Probable causes (config, not code): - BoolAlarm extension's "publish to alarm manager" / "Active" / "Enabled" flag may be off. - Alarm-vs-event mode setting may have it routing to events, not alarms. - Platform alarm area may not match the consumer's subscription scope. Resolution path: check the BoolAlarm extension's config in System Platform IDE; check aaObjectViewer's Active Alarms panel (not attribute panel) to see if the alarm appears there. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -257,14 +257,38 @@ public sealed class AlarmClientWmProbeTests : IDisposable
|
||||
|
||||
LogProviders(client, "after Register");
|
||||
|
||||
// Dump the eQueryType enum so we can see what alternatives exist
|
||||
// beyond qtSummary, in case Summary aggregates and we need a
|
||||
// List/Snapshot mode instead.
|
||||
try
|
||||
{
|
||||
Type qt = typeof(eQueryType);
|
||||
Log($"eQueryType enum values: " +
|
||||
string.Join(", ", Enum.GetNames(qt).Select(n =>
|
||||
$"{n}=0x{Convert.ToInt32(Enum.Parse(qt, n)):X}")));
|
||||
Type af = typeof(eAlarmFilterState);
|
||||
Log($"eAlarmFilterState enum values: " +
|
||||
string.Join(", ", Enum.GetNames(af).Select(n =>
|
||||
$"{n}=0x{Convert.ToInt32(Enum.Parse(af, n)):X}")));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log($"Enum dump threw: {ex.Message}");
|
||||
}
|
||||
|
||||
// qtHistory + state=ActiveNow: stream historical alarm transitions
|
||||
// including active alarms. asNone for FilterMask/Spec might
|
||||
// literally mean "match alarms in state 'none'" (i.e., nothing),
|
||||
// since the eAlarmFilterState enum is 0/1/2/3 single-states not
|
||||
// flag bits. Try ActiveNow explicitly.
|
||||
int subscribe = client.Subscribe(
|
||||
szSubscription: SubscriptionExpression,
|
||||
wFromPri: 1, wToPri: 999,
|
||||
QueryType: eQueryType.qtSummary,
|
||||
wFromPri: 0, wToPri: short.MaxValue,
|
||||
QueryType: eQueryType.qtHistory,
|
||||
SortFlags: eSortFlags.sfReturnNewestFirst,
|
||||
FilterMask: eAlarmFilterState.asNone,
|
||||
FilterSpecification: eAlarmFilterState.asNone);
|
||||
Log($"Subscribe('{SubscriptionExpression}') -> {subscribe}");
|
||||
FilterMask: eAlarmFilterState.asAlarmActiveNow,
|
||||
FilterSpecification: eAlarmFilterState.asAlarmActiveNow);
|
||||
Log($"Subscribe('{SubscriptionExpression}', qtHistory, state=ActiveNow, pri=[0..32767]) -> {subscribe}");
|
||||
|
||||
LogProviders(client, "after Subscribe");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user