Files
histsdk/docs/reverse-engineering/native-event-vs-capture-server-latest.json
dohertj2 c95824a65d Initial commit: managed .NET 10 AVEVA Historian SDK + reverse-engineering toolkit
Full read-only SDK (src/AVEVA.Historian.Client) implementing the CLAUDE.md required
surface against AVEVA Historian's binary WCF protocol — no native AVEVA runtime
dependency. All operations live-verified against a local Historian:

- ProbeAsync, ReadRawAsync, ReadAggregateAsync, ReadAtTimeAsync, ReadEventsAsync
- BrowseTagNamesAsync, GetTagMetadataAsync (17 native data-type codes mapped)
- GetConnectionStatusAsync, GetStoreForwardStatusAsync, GetSystemParameterAsync
- 108/108 unit + integration tests pass

Includes the reverse-engineering toolkit (tools/AVEVA.Historian.ReverseEngineering)
used to decode the protocol: WCF probes, IL inspection via dnlib, and IL-rewrite
instrumentation (instrument-wcf-{write,read}message etc.) plus the .NET Framework
trace harness (tools/AVEVA.Historian.NativeTraceHarness) for parity testing.

Sanitized handoff evidence under docs/reverse-engineering/. Native AVEVA binaries
(current/, aveva-install-x64/, aveva-install-x86/) are gitignored — fetch separately
from the AVEVA installer.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 06:31:48 -04:00

2 lines
6.6 KiB
JSON

{"Operation":"NativeTraceHarness.IntegratedRead","Scenario":"event","ServerName":"localhost","DirectConnection":false,"ProxyServer":null,"TagName":"OtOpcUaParityTest_001.Counter","LookbackMinutes":1440,"RetrievalMode":"Full","ResolutionTicks":0,"StartUtc":"2026-04-30T17:34:48.7372651Z","EndUtc":"2026-05-01T17:34:48.7372651Z","OpenSuccess":true,"OpenErrorType":"NoError","OpenErrorCode":"Success","OpenErrorDescription":"No error type set","ConnectedToServer":true,"Pending":false,"ErrorOccurred":false,"StartQuerySuccess":true,"StartQueryErrorType":"NoError","StartQueryErrorCode":"Success","StartQueryErrorDescription":"No error type set","StartQueryException":null,"MoveTerminalDescription":null,"RowCount":1,"Rows":[{"EventTime":"2026-05-01T13:22:45.9820000-04:00","ReceivedTime":"2026-05-01T13:22:46.3680345-04:00","EventType":"Alarm.Set","Type":"Alarm.Set","DisplayText":"\u003cunreadable:TargetInvocationException\u003e","Area":"\u003cunreadable:TargetInvocationException\u003e","Source":"\u003cunreadable:TargetInvocationException\u003e","System":"\u003cunreadable:TargetInvocationException\u003e","Severity":"\u003cunreadable:TargetInvocationException\u003e","Priority":"\u003cunreadable:TargetInvocationException\u003e","IsAlarm":"\u003cunreadable:TargetInvocationException\u003e"}],"Snapshots":{"ConnectionArgs":{"field:tcpPort":33268,"field:serverName":"localhost","field:readOnly":true,"field:bandwidthLimit":0,"field:compression":false,"field:packetTimeout":1000,"field:storeForwardPath":"","field:storeForwardFreeDiskSpace":125,"field:minStoreForwardDuration":30,"field:bufferMemory":8,"field:connectionType":"Event","field:details":"","field:consoleAccess":false,"field:metadataNamespace":null,"field:directConnection":false,"field:proxyServer":"","field:futureTimeThreshold":0,"field:futureTimeThresholdSpecified":false,"property:ProxyServer":"","property:BufferMemory":8,"property:MinStoreForwardDuration":30,"property:StoreForwardFreeDiskSpace":125,"property:StoreForwardPath":"","property:PacketTimeout":1000,"property:Compression":false,"property:BandwidthLimit":0,"property:ConsoleAccess":false,"property:ReadOnly":true,"property:Details":"","property:ServerName":"localhost","property:TcpPort":33268,"property:ConnectionType":"Event","property:FutureTimeThreshold":0,"property:DirectConnection":false,"property:MetaDataNamespace":null},"AccessAfterOpen":{"field:clientHandlerArray":[0,1],"field:ptrClientArray":"\u003cunreadable:NotSupportedException\u003e","field:connectionType":"Event","field:eventTagHandle":10000000},"EventQueryAfterCreate":{"field:m_historianClient":"\u003cSystem.Reflection.Pointer\u003e","field:queryResult":null,"field:m_queryFilters":"\u003cSystem.Reflection.Pointer\u003e","field:m_FilterCount":0,"field:m_queryArgs":null,"field:m_bGetallEvents":false,"field:queryHandle":0,"field:retrievalMode":"Cyclic","field:dataVersion":"Original","field:resolution":0,"property:QueryResult":null},"EventQueryArgsBeforeStart":{"field:eventCount":1,"field:eventOrder":"Ascending","field:eventQueryType":"Events","field:skipCount":0,"property:SkipCount":0,"property:QueryType":"Events","property:EventOrder":"Ascending","property:EventCount":1,"property:DurationHours":0,"property:EndDateTime":"2026-05-01T17:34:48.7372651Z","property:StartDateTime":"2026-04-30T17:34:48.7372651Z"},"EventQueryAfterStart":{"field:m_historianClient":"\u003cSystem.Reflection.Pointer\u003e","field:queryResult":null,"field:m_queryFilters":"\u003cSystem.Reflection.Pointer\u003e","field:m_FilterCount":0,"field:m_queryArgs":"\u003cArchestrA.EventQueryArgs\u003e","field:m_bGetallEvents":false,"field:queryHandle":1,"field:retrievalMode":"Cyclic","field:dataVersion":"Original","field:resolution":0,"property:QueryResult":null},"EventQueryArgsAfterStart":{"field:eventCount":1,"field:eventOrder":"Ascending","field:eventQueryType":"Events","field:skipCount":0,"property:StartDateTime":"2026-04-30T17:34:48.7372651Z","property:EndDateTime":"2026-05-01T17:34:48.7372651Z","property:EventCount":1,"property:QueryType":"Events","property:EventOrder":"Ascending","property:SkipCount":0,"property:DurationHours":0},"EventQueryAfterFirstMove":{"field:m_historianClient":"\u003cSystem.Reflection.Pointer\u003e","field:queryResult":"\u003cArchestrA.HistorianEvent\u003e","field:m_queryFilters":"\u003cSystem.Reflection.Pointer\u003e","field:m_FilterCount":0,"field:m_queryArgs":"\u003cArchestrA.EventQueryArgs\u003e","field:m_bGetallEvents":false,"field:queryHandle":1,"field:retrievalMode":"Cyclic","field:dataVersion":"Original","field:resolution":0,"property:QueryResult":"\u003cArchestrA.HistorianEvent\u003e"},"EventResultAfterFirstMove":{"field:source_name":null,"field:source_namespace":null,"field:area":null,"field:displayText":null,"field:eventTime":"2026-05-01T13:22:45.9820000-04:00","field:eventType":"Alarm.Set","field:id":"\u003cSystem.Guid\u003e","field:receivedTime":"2026-05-01T13:22:46.3680345-04:00","field:source":null,"field:system":null,"field:properties":"\u003cSystem.Collections.Generic.SortedList`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Tuple`2[[ArchestrA.HistorianEventPropertyType, aahClientManaged, Version=2.0.0.0, Culture=neutral, PublicKeyToken=33bb9b233ad963e6],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]\u003e","field:priority":null,"field:severity":null,"field:isAlarm":null,"field:isSilenced":null,"field:isUpdate":false,"field:isDelete":false,"field:revisionVersion":0,"field:version":5,"field:bGetModel":false,"property:IsSilenced":"\u003cunreadable:TargetInvocationException\u003e","property:IsAlarm":"\u003cunreadable:TargetInvocationException\u003e","property:System":"\u003cunreadable:TargetInvocationException\u003e","property:Source":"\u003cunreadable:TargetInvocationException\u003e","property:ReceivedTime":"2026-05-01T13:22:46.3680345-04:00","property:Severity":"\u003cunreadable:TargetInvocationException\u003e","property:Priority":"\u003cunreadable:TargetInvocationException\u003e","property:ID":"\u003cSystem.Guid\u003e","property:Type":"Alarm.Set","property:EventType":"Alarm.Set","property:EventTime":"2026-05-01T13:22:45.9820000-04:00","property:DisplayText":"\u003cunreadable:TargetInvocationException\u003e","property:Area":"\u003cunreadable:TargetInvocationException\u003e","property:Source_Name":null,"property:Namespace":null,"property:RevisionVersion":0,"property:Delete":false,"property:Update":false}},"TracePath":"C:\\Users\\dohertj2\\Desktop\\histsdk\\docs\\reverse-engineering\\native-wcf-message-log.svclog","TraceExists":false,"TraceBytes":0}