Phase 2 PR 10 � HistoryReadAtTime IPC surface #9

Merged
dohertj2 merged 1 commits from phase-2-pr10-history-attime into v2 2026-04-18 07:22:17 -04:00
Owner

Adds HistoryReadAtTimeRequest/Response messages, routes through GalaxyFrameHandler, wires MxAccessGalaxyBackend.HistoryReadAtTimeAsync to HistorianDataSource.ReadAtTimeAsync (ported in PR 5, exposed here). 4 new tests covering disabled-path, empty-timestamp short-circuit, Unix-ms round-trip, and Quality=0 ? Bad mapping. Galaxy.Host.Tests 31/31 pass, 0 errors. Proxy-side IHistoryProvider method not added yet since Core.Abstractions doesn't expose ReadAtTime in IHistoryProvider today � that can flow whenever a consumer needs it.

Adds HistoryReadAtTimeRequest/Response messages, routes through GalaxyFrameHandler, wires MxAccessGalaxyBackend.HistoryReadAtTimeAsync to HistorianDataSource.ReadAtTimeAsync (ported in PR 5, exposed here). 4 new tests covering disabled-path, empty-timestamp short-circuit, Unix-ms round-trip, and Quality=0 ? Bad mapping. Galaxy.Host.Tests 31/31 pass, 0 errors. Proxy-side IHistoryProvider method not added yet since Core.Abstractions doesn't expose ReadAtTime in IHistoryProvider today � that can flow whenever a consumer needs it.
dohertj2 added 1 commit 2026-04-18 07:05:06 -04:00
Phase 2 PR 10 — HistoryReadAtTime IPC surface. New Shared.Contracts messages HistoryReadAtTimeRequest/Response (MessageKind 0x64/0x65), IGalaxyBackend gains HistoryReadAtTimeAsync, Stub/DbBacked return canonical pending error, MxAccessGalaxyBackend delegates to _historian.ReadAtTimeAsync (ported in PR 5, exposed now) — request timestamp array is flow-encoded as Unix ms to avoid MessagePack DateTime quirks then re-hydrated to DateTime on the Host side. Per-sample mapping uses the same ToWire(HistorianSample) helper as ReadRawAsync so the category→StatusCode mapping stays consistent (Quality byte 192+ → Good 0u, 64-191 → Uncertain, 0-63 → Bad 0x80000000u). Guards: null historian → "Historian disabled" (symmetric with other history paths); empty timestamp array short-circuits to Success=true, Values=[] without an SDK round-trip; SDK exception → Success=false with the message chained. Proxy-side IHistoryProvider.ReadAtTimeAsync capability doesn't exist in Core.Abstractions yet (OPC UA HistoryReadAtTime service is supported but the current IHistoryProvider only has ReadRawAsync + ReadProcessedAsync) — this PR adds the Host-side surface so a future Core.Abstractions extension can wire it through without needing another IPC change. Tests (4 new): disabled-error when historian null, empty-timestamp short-circuit without SDK call, Unix-ms↔DateTime round-trip with Good samples at two distinct timestamps, missing sample (Quality=0) maps to 0x80000000u Bad category. Galaxy.Host.Tests Unit suite: 31 pass / 0 fail (4 new at-time + 27 pre-existing). Galaxy.Host builds clean. Branches off v2. d13f919112
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dohertj2 merged commit 053c4e0566 into v2 2026-04-18 07:22:17 -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#9