namespace ZB.MOM.WW.ScadaBridge.DataConnectionLayer; /// /// Configuration options for the Data Connection Layer. /// public class DataConnectionOptions { /// Fixed interval between reconnect attempts after disconnect. public TimeSpan ReconnectInterval { get; set; } = TimeSpan.FromSeconds(5); /// Interval for retrying failed tag path resolution. public TimeSpan TagResolutionRetryInterval { get; set; } = TimeSpan.FromSeconds(10); /// Timeout for synchronous write operations to devices. public TimeSpan WriteTimeout { get; set; } = TimeSpan.FromSeconds(30); /// /// Per-tag timeout applied to each /// call on the initial-subscribe seed path (and reconnect re-seed). A hung device read would /// otherwise delay SubscribeCompleted and its acknowledgement indefinitely. On timeout /// the tag is treated the same as any other failed seed read — it stays in the pending set and /// is retried up to , then left Uncertain until a change /// notification arrives. /// public TimeSpan SeedReadTimeout { get; set; } = TimeSpan.FromSeconds(30); /// /// Minimum time a connection must stay up before it is considered stable. /// If a connection drops before this threshold, it counts as an unstable /// disconnect toward the failover retry count. /// public TimeSpan StableConnectionThreshold { get; set; } = TimeSpan.FromSeconds(60); /// /// Total number of attempts the seed read makes per tag /// before giving up. The initial subscribe seed (and the reconnect re-seed) reads /// each just-advised tag to capture its current value; on a cold/fresh advise the /// read can race the subscription and return an empty/failed result. A STATIC tag /// (one that never fires another OnDataChange) would then stay Uncertain forever, /// because its bridge value depends entirely on that seed. Re-reading the still-empty /// subset a bounded number of times lets the advise warm up. Minimum 1 (1 = single /// read, no retry). /// public int SeedReadMaxAttempts { get; set; } = 3; /// /// Delay between seed-read attempts for the tags that have /// not yet returned a usable value. Applied once per round across the whole pending /// subset, so the total added latency is bounded to /// (SeedReadMaxAttempts - 1) × SeedReadRetryDelay regardless of tag count. /// public TimeSpan SeedReadRetryDelay { get; set; } = TimeSpan.FromMilliseconds(250); }