worker: aaAlarmManagedClient discovery + reference (alarm-helper foundation) #115
Reference in New Issue
Block a user
Delete Branch "track-alarm-helper-discovery"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Discovers the surface of
aaAlarmManagedClient.dlland stages the worker csproj reference so subsequent PRs can wire native MxAccess alarm subscription. Replaces the speculative "two paths forward" framing inMxAccessAlarmEventSinkwith the validated architecture.Key findings
aaAlarmManagedClient.dllis x86 + .NET Framework (mixed-mode C++/CLI; PE Machine = i386, NativeEntryPoint flag set). The "x64-only" framing in the prior follow-up was wrong — confused by the file path underWonderware\Historian\x64\. The assembly is bitness- and runtime-compatible with the worker (net48 x86), so it loads in the existing worker process. No sub-process needed.AlarmClientis the public class. Its model mirrors MxAccess:RegisterConsumertakes a WindowshWndand the AVEVA alarm service WM_APP-pokes that hwnd when alarms change. The worker's existing STA + WM_APP pump can drive both the data-change COM subscriber and the alarm-client consumer.AlarmAckByGUID(alarmGuid, ackComment, oprName, oprNode, oprDomain, oprFullName)— the native ack carries the operator's full identity atomically with the comment. Closes the v1 operator-comment fidelity gap completely.What this PR does
aaAlarmManagedClient.dllreference toMxGateway.Worker.csproj. Worker still builds clean.AlarmClientDiscoveryTestsas a Skip-gated reflection probe; flip the Skip parameter to dump the public type surface for reference. The output was captured into theMxAccessAlarmEventSinkdoc so it doesn't have to be re-run.MxAccessAlarmEventSink's "two paths forward" doc with the actual wiring plan againstAlarmClient.RegisterConsumer+Subscribe+AlarmAckByGUID.Test plan
Follow-up PRs
Gated on STA + WM_APP integration testing on the dev rig:
RegisterConsumer+Subscribeat session-startup; route WM_APP messages throughGetStatistics+GetAlarmExtendedRecintoEnqueueTransition.AcknowledgeAlarmRPC to a worker command that callsAlarmAckByGUIDwith the OPC UA operator's identity; replaces the worker-pending diagnostic from PR A.3.QueryActiveAlarmsto a worker command that walksGetStatistics's reported handles viaGetAlarmExtendedRec.