using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Opc.Ua; namespace ZB.MOM.WW.OtOpcUa.Host.Historian { /// /// OPC UA-typed surface for the historian plugin. Host consumers depend only on this /// interface so the Wonderware Historian SDK assemblies are not required unless the /// plugin is loaded at runtime. /// public interface IHistorianDataSource : IDisposable { Task> ReadRawAsync( string tagName, DateTime startTime, DateTime endTime, int maxValues, CancellationToken ct = default); Task> ReadAggregateAsync( string tagName, DateTime startTime, DateTime endTime, double intervalMs, string aggregateColumn, CancellationToken ct = default); Task> ReadAtTimeAsync( string tagName, DateTime[] timestamps, CancellationToken ct = default); Task> ReadEventsAsync( string? sourceName, DateTime startTime, DateTime endTime, int maxEvents, CancellationToken ct = default); /// /// Returns a runtime snapshot of query success/failure counters and connection state. /// Consumed by the status dashboard and health check service so operators can detect /// silent query degradation that the load-time plugin status can't catch. /// HistorianHealthSnapshot GetHealthSnapshot(); } }