Files
ScadaBridge/src/ZB.MOM.WW.ScadaBridge.DataConnectionLayer/DataConnectionOptions.cs
T
Joseph Doherty 9cff87fe85 docs(comments): strip internal task/milestone/bundle bookkeeping from code comments
Remove project bookkeeping citations from shipped code comments across the
solution: hyphenated task IDs (WP-14, StoreAndForward-025), milestone/task/
issue refs (M3, Task 4, Audit Log #23, #21), Bundle X task-bundle labels,
and C/D/K/S/T phase labels.

Comment text only — no code logic, string/log literals, or XML-doc structure
changed. Genuine descriptions are preserved (only the citation is stripped),
and technical lookalikes are retained (UTF-8, SHA-256, T00:00:00, M365,
UTC-5, pre-C4/pre-C5 schema versions). Flagged by the new CommentChecker
TaskReferenceInComment / TrackingReferenceInComment checks plus targeted
grep passes; full solution builds clean, append-only guard tests pass.
2026-07-07 11:03:26 -04:00

54 lines
2.7 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace ZB.MOM.WW.ScadaBridge.DataConnectionLayer;
/// <summary>
/// Configuration options for the Data Connection Layer.
/// </summary>
public class DataConnectionOptions
{
/// <summary>Fixed interval between reconnect attempts after disconnect.</summary>
public TimeSpan ReconnectInterval { get; set; } = TimeSpan.FromSeconds(5);
/// <summary>Interval for retrying failed tag path resolution.</summary>
public TimeSpan TagResolutionRetryInterval { get; set; } = TimeSpan.FromSeconds(10);
/// <summary>Timeout for synchronous write operations to devices.</summary>
public TimeSpan WriteTimeout { get; set; } = TimeSpan.FromSeconds(30);
/// <summary>
/// Per-tag timeout applied to each <see cref="IDataConnection.ReadAsync"/>
/// call on the initial-subscribe seed path (and reconnect re-seed). A hung device read would
/// otherwise delay <c>SubscribeCompleted</c> 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 <see cref="SeedReadMaxAttempts"/>, then left Uncertain until a change
/// notification arrives.
/// </summary>
public TimeSpan SeedReadTimeout { get; set; } = TimeSpan.FromSeconds(30);
/// <summary>
/// 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.
/// </summary>
public TimeSpan StableConnectionThreshold { get; set; } = TimeSpan.FromSeconds(60);
/// <summary>
/// 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).
/// </summary>
public int SeedReadMaxAttempts { get; set; } = 3;
/// <summary>
/// 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
/// <c>(SeedReadMaxAttempts - 1) × SeedReadRetryDelay</c> regardless of tag count.
/// </summary>
public TimeSpan SeedReadRetryDelay { get; set; } = TimeSpan.FromMilliseconds(250);
}