using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; namespace ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Backend { /// /// OPC-UA-free surface for the Wonderware Historian subsystem inside the historian /// sidecar process. Implementations read via the aahClient* SDK; the .NET 10 /// WonderwareHistorianClient on the other side of the named-pipe IPC maps /// returned samples to OPC UA DataValue. The v1 Galaxy.Host / Proxy hosts /// this lived in retired in PR 7.2. /// public interface IHistorianDataSource : IDisposable { /// Reads raw historical samples asynchronously. /// The tag name to read from. /// The start time of the time range. /// The end time of the time range. /// The maximum number of values to return. /// The cancellation token. /// A task representing the asynchronous operation that returns a list of historian samples. Task> ReadRawAsync( string tagName, DateTime startTime, DateTime endTime, int maxValues, CancellationToken ct = default); /// Reads aggregate historical samples asynchronously. /// The tag name to read from. /// The start time of the time range. /// The end time of the time range. /// The interval in milliseconds for aggregation. /// The column to aggregate. /// The cancellation token. /// A task representing the asynchronous operation that returns a list of aggregate samples. Task> ReadAggregateAsync( string tagName, DateTime startTime, DateTime endTime, double intervalMs, string aggregateColumn, CancellationToken ct = default); /// Reads historical samples at specific times asynchronously. /// The tag name to read from. /// The array of timestamps at which to read values. /// The cancellation token. /// A task representing the asynchronous operation that returns a list of historian samples. Task> ReadAtTimeAsync( string tagName, DateTime[] timestamps, CancellationToken ct = default); /// Reads historical events asynchronously. /// The source name to filter events, or null for all sources. /// The start time of the time range. /// The end time of the time range. /// The maximum number of events to return. /// The cancellation token. /// A task representing the asynchronous operation that returns a list of historian events. Task> ReadEventsAsync( string? sourceName, DateTime startTime, DateTime endTime, int maxEvents, CancellationToken ct = default); /// Gets a health snapshot of the data source. /// A HistorianHealthSnapshot containing the current health information. HistorianHealthSnapshot GetHealthSnapshot(); } }