diff --git a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway/IHistorianGatewayClient.cs b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway/IHistorianGatewayClient.cs index efb969a4..e11bad58 100644 --- a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway/IHistorianGatewayClient.cs +++ b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway/IHistorianGatewayClient.cs @@ -35,6 +35,16 @@ public interface IHistorianGatewayClient : IAsyncDisposable CancellationToken ct); /// Streams historian events over a window, optionally filtered to a single source name. + /// Optional source-name filter; null returns events from all sources. + /// Inclusive start of the time window (UTC). + /// Exclusive end of the time window (UTC). + /// + /// Caps the number of events returned. The gateway wire contract (ReadEventsRequest) has + /// no per-call server cap, so this limit is enforced client-side by early stream termination: + /// 0 or negative means no client-side limit (the gateway may still apply its configured + /// RuntimeDb:EventReadMaxRows); a positive value stops draining after that many events. + /// + /// Cancellation token. IAsyncEnumerable ReadEventsAsync( string? sourceName, DateTime startUtc, diff --git a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway/ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway.csproj b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway/ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway.csproj index aad1040c..1f2994d9 100644 --- a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway/ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway.csproj +++ b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway/ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway.csproj @@ -4,6 +4,7 @@ true true $(NoWarn);CS1591 + AnyCPU;x64 ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway diff --git a/tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway.Tests/FakeHistorianGatewayClient.cs b/tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway.Tests/FakeHistorianGatewayClient.cs index 1eda81d0..38f78ae4 100644 --- a/tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway.Tests/FakeHistorianGatewayClient.cs +++ b/tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway.Tests/FakeHistorianGatewayClient.cs @@ -209,6 +209,6 @@ public sealed class FakeHistorianGatewayClient : IHistorianGatewayClient yield return item; } - await Task.CompletedTask.ConfigureAwait(false); + await ValueTask.CompletedTask.ConfigureAwait(false); } }