Phase 2 PR 11 � HistoryReadEvents IPC (alarm history) #10

Merged
dohertj2 merged 1 commits from phase-2-pr11-history-events into v2 2026-04-18 07:22:34 -04:00
Owner

Exposes HistorianDataSource.ReadEventsAsync through IPC for OPC UA HistoryReadEvents + alarm-history use cases. New GalaxyHistoricalEvent DTO carries both EventTime and ReceivedTime (distinct from live GalaxyAlarmEvent which is a single point-in-time with StateTransition � historical rows have no lifecycle context). Branches off PR 10 to share the MessageKind enum extension. 3 new tests, 34/34 Host.Tests Unit pass.

Exposes HistorianDataSource.ReadEventsAsync through IPC for OPC UA HistoryReadEvents + alarm-history use cases. New GalaxyHistoricalEvent DTO carries both EventTime and ReceivedTime (distinct from live GalaxyAlarmEvent which is a single point-in-time with StateTransition � historical rows have no lifecycle context). Branches off PR 10 to share the MessageKind enum extension. 3 new tests, 34/34 Host.Tests Unit pass.
dohertj2 changed target branch from phase-2-pr10-history-attime to v2 2026-04-18 07:22:30 -04:00
dohertj2 added 1 commit 2026-04-18 07:22:30 -04:00
Phase 2 PR 11 — HistoryReadEvents IPC (alarm history). New Shared.Contracts messages HistoryReadEventsRequest/Response + GalaxyHistoricalEvent DTO (MessageKind 0x66/0x67). IGalaxyBackend gains HistoryReadEventsAsync, Stub/DbBacked return canonical pending error, MxAccessGalaxyBackend delegates to _historian.ReadEventsAsync (ported in PR 5) and maps HistorianEventDto → GalaxyHistoricalEvent — Guid.ToString() for EventId wire shape, DateTime → Unix ms for both EventTime (when the event fired in the process) and ReceivedTime (when the Historian persisted it), DisplayText + Severity pass through. SourceName is string? — null means 'all sources' (passed straight through to HistorianDataSource.ReadEventsAsync which adds the AddEventFilter('Source', Equal, ...) only when non-null). Distinct from the live GalaxyAlarmEvent type because historical rows carry both timestamps and lack StateTransition (Historian logs instantaneous events, not the OPC UA Part 9 alarm lifecycle; translating to OPC UA event lifecycle is the alarm-subsystem's job). Guards: null historian → Historian-disabled error; SDK exception → Success=false with message chained. Tests (3 new): disabled-error when historian null, maps HistorianEventDto with full field set (Id/Source/EventTime/ReceivedTime/DisplayText/Severity=900) to GalaxyHistoricalEvent, null SourceName passes through unchanged (verifies the 'all sources' contract). Galaxy.Host.Tests Unit suite 34 pass / 0 fail. Galaxy.Host builds clean. Branches off phase-2-pr10-history-attime since both extend the MessageKind enum; fast-forwards if PR 10 merges first. ca025ebe0c
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dohertj2 merged commit d96b513bbc into v2 2026-04-18 07:22:34 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#10