Files
histsdk/tests/AVEVA.Historian.Client.Tests/EnumCompatibilityTests.cs
T
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

34 lines
1.0 KiB
C#

using AVEVA.Historian.Client.Models;
namespace AVEVA.Historian.Client.Tests;
public sealed class EnumCompatibilityTests
{
[Fact]
public void RetrievalMode_ValuesMatchManagedWrapper()
{
Assert.Equal(0, (int)RetrievalMode.Cyclic);
Assert.Equal(1, (int)RetrievalMode.Delta);
Assert.Equal(2, (int)RetrievalMode.Full);
Assert.Equal(3, (int)RetrievalMode.Interpolated);
Assert.Equal(11, (int)RetrievalMode.ValueState);
Assert.Equal(14, (int)RetrievalMode.EndBound);
}
[Fact]
public void ConnectionKind_ValuesMatchManagedWrapper()
{
Assert.Equal(1, (int)HistorianConnectionKind.Process);
Assert.Equal(2, (int)HistorianConnectionKind.Event);
}
[Fact]
public void InterpolationType_ValuesMatchManagedWrapper()
{
Assert.Equal(0, (int)InterpolationType.StairStep);
Assert.Equal(1, (int)InterpolationType.Linear);
Assert.Equal(254, (int)InterpolationType.SystemDefault);
Assert.Equal(255, (int)InterpolationType.None);
}
}