Phase 2 PR 7 — wire IHistoryProvider.ReadProcessedAsync end-to-end #6
Reference in New Issue
Block a user
Delete Branch "phase-2-pr7-history-processed"
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
Wire
IHistoryProvider.ReadProcessedAsyncend-to-end. PR 5 portedHistorianDataSource.ReadAggregateAsyncinto Galaxy.Host but left it internal —GalaxyProxyDriver.ReadProcessedAsyncstill threwNotSupportedException, so OPC UAHistoryReadProcessedcalls against v2 were rejected at the driver boundary. This PR closes that gap.Changes
HistoryReadProcessedRequest/HistoryReadProcessedResponse+MessageKind0x62/0x63. CarriesIntervalMs+AggregateColumnstring so Galaxy.Host stays OPC-UA-free.GalaxyFrameHandlerroutes the new kind; all threeIGalaxyBackendimplementations getHistoryReadProcessedAsync;MxAccessGalaxyBackenddelegates toHistorianDataSource.ReadAggregateAsync, mapsHistorianAggregateSampletoGalaxyDataValue(null bucket →BadNoData 0x800E0000u, otherwiseGood 0u).ReadProcessedAsyncflipped from theNotSupportedthrow to a real IPC call; OPC UAHistoryAggregateTypemapped to Wonderware AnalogSummary column name (Average/Minimum/Maximum/ValueCount).TotalthrowsNotSupportedExceptionwith a message steering callers toAverage × Count— there's no matching SDK column.Guards
MxAccessGalaxyBackend.HistoryReadProcessedAsyncrejectshistorian=null("Historian disabled") andIntervalMs <= 0("HistoryReadProcessed requires IntervalMs > 0") up front.Success=falsewith the message chained into the Proxy'sInvalidOperationException.Tests
HistoryReadProcessedTests(4) — disabled path, zero-interval rejection, value + column + interval flow through, null bucket → BadNoData.AggregateColumnMappingTests(5) — theory over supported enum values,Total→ NotSupported.InternalsVisibleTo("...Proxy.Tests")added soMapAggregateToColumncan be tested without reflection.Test plan
dotnet build ZB.MOM.WW.OtOpcUa.slnx— 0 errors, 201 pre-existing warningsdotnet test tests/.../Host.Tests/ --filter "Category=Unit"— 28/28 passdotnet test tests/.../Proxy.Tests/ --filter "Category=Unit"— 14/14 passHistoryReadProcessedfrom the Client CLI against a historized attribute and compare per-bucket Average values againstaahHistorian.exefor parity.Deferred
ReadAtTime+ReadEvents+HealthIPC surfaces — ported in PR 5 but need their own contract messages.OnAlarmEventraising fromMxAccessGalaxyBackend) — overlaps theReadEventsAsyncIPC work since both come fromHistorianAccess.CreateEventQuery.DataValueSnapshottoISubscribableconsumers.Merge order
Branches off
phase-2-pr5-historian. Fast-forwards once PR 5 merges; otherwise rebase after PR 5 lands.🤖 Generated with Claude Code