using System.Collections.Generic; namespace ZB.MOM.WW.OtOpcUa.Host.Configuration { /// /// Wonderware Historian SDK configuration for OPC UA historical data access. /// public class HistorianConfiguration { /// /// Gets or sets a value indicating whether OPC UA historical data access is enabled. /// public bool Enabled { get; set; } = false; /// /// Gets or sets the single Historian server hostname used when /// is empty. Preserved for backward compatibility with pre-cluster deployments. /// public string ServerName { get; set; } = "localhost"; /// /// Gets or sets the ordered list of Historian cluster nodes. When non-empty, this list /// supersedes : the data source attempts each node in order on /// connect, falling through to the next on failure. A failed node is placed in cooldown /// for before being re-eligible. /// public List ServerNames { get; set; } = new(); /// /// Gets or sets the cooldown window, in seconds, that a historian node is skipped after /// a connection failure. A value of zero retries the node on every request. Default 60s. /// public int FailureCooldownSeconds { get; set; } = 60; /// /// Gets or sets a value indicating whether Windows Integrated Security is used. /// When false, and are used instead. /// public bool IntegratedSecurity { get; set; } = true; /// /// Gets or sets the username for Historian authentication when is false. /// public string? UserName { get; set; } /// /// Gets or sets the password for Historian authentication when is false. /// public string? Password { get; set; } /// /// Gets or sets the Historian server TCP port. /// public int Port { get; set; } = 32568; /// /// Gets or sets the packet timeout in seconds for Historian SDK operations. /// public int CommandTimeoutSeconds { get; set; } = 30; /// /// Gets or sets the maximum number of values returned per HistoryRead request. /// public int MaxValuesPerRead { get; set; } = 10000; /// /// Gets or sets an outer safety timeout, in seconds, applied to sync-over-async Historian /// operations invoked from the OPC UA stack thread (HistoryReadRaw, HistoryReadProcessed, /// HistoryReadAtTime, HistoryReadEvents). This is a backstop for the case where a /// historian query hangs outside — e.g., a slow SDK /// reconnect or mid-failover cluster node. Must be comfortably larger than /// so normal operation is never affected. Default 60s. /// public int RequestTimeoutSeconds { get; set; } = 60; } }