feat: HistorianGateway as the OtOpcUa historian backend (read/write/alarms + continuous historization); retire Wonderware #423

Merged
dohertj2 merged 40 commits from feat/historian-gateway-backend into master 2026-06-27 11:09:04 -04:00
2 changed files with 11 additions and 2 deletions
Showing only changes of commit 1d5fa8230e - Show all commits
@@ -335,8 +335,8 @@ public sealed class GatewayHistorianDataSource : IHistorianDataSource, IAsyncDis
}
}
/// <summary>Disposes the underlying gateway client.</summary>
public void Dispose() => _client.DisposeAsync().AsTask().GetAwaiter().GetResult();
/// <summary>Disposes the underlying gateway client. Prefer <see cref="DisposeAsync"/>.</summary>
public void Dispose() => DisposeAsync().AsTask().GetAwaiter().GetResult();
/// <summary>Asynchronously disposes the underlying gateway client.</summary>
/// <returns>A task that completes when the client has been disposed.</returns>
@@ -69,6 +69,15 @@ public sealed class GatewayHistorianDataSourceTests
Assert.Equal(1, fake.DisposeCallCount);
}
[Fact]
public void Dispose_via_sync_path_disposes_client()
{
var fake = new FakeHistorianGatewayClient();
var ds = new GatewayHistorianDataSource(fake, NullLogger<GatewayHistorianDataSource>.Instance);
((IDisposable)ds).Dispose();
Assert.Equal(1, fake.DisposeCallCount);
}
// Ts(...) builds a Google.Protobuf.WellKnownTypes.Timestamp from UTC parts.
private static Timestamp Ts(int y, int mo, int d, int h, int mi, int s)
=> Timestamp.FromDateTime(new DateTime(y, mo, d, h, mi, s, DateTimeKind.Utc));