docs: fill missing XML docs and strip tracking IDs from src comments

Clears CommentChecker findings in src/ (3,280 -> 209, the remainder being false
positives like PLC-5/IEEE-754/M0.0) by adding missing summaries/params/returns,
normalising inheritdoc usage, and removing Gitea/review tracking IDs while keeping
the rationale they annotated. Comment-only: comment-stripped sources are identical
to the parent commit.
This commit is contained in:
Joseph Doherty
2026-10-15 06:14:58 -04:00
parent ebcbd81fca
commit 826312befe
430 changed files with 4434 additions and 3923 deletions
@@ -15,10 +15,10 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway.Mapping;
/// Part 13 time-weighted evaluation needs the real bounding samples on both sides of the window (time, value and
/// quality of the latest sample before it), and the gateway has no "previous stored sample" read — a raw read streams
/// forward from its start and AVEVA replaces whatever lies before with an initial-value row stamped at the query start,
/// losing the original time a sloped segment across the window start needs (#681).
/// losing the original time a sloped segment across the window start needs.
/// </para>
/// <para>
/// Since #681 the per-sample aggregates (Average, Count, Minimum, Maximum, Range, Start, End, Delta,
/// The per-sample aggregates (Average, Count, Minimum, Maximum, Range, Start, End, Delta,
/// Minimum/MaximumActualTime) are NOT native: <see cref="GatewayHistorianDataSource"/> evaluates them from raw reads
/// with the SQL backends' shared evaluator (Minimum/Maximum used to map to AVEVA's <c>MinimumWithTime</c> /
/// <c>MaximumWithTime</c>). Every other member — incl. TimeAverage2, Total2, Interpolative, PercentGood, PercentBad — is
@@ -30,7 +30,7 @@ internal static class AggregateModeMapper
/// <summary>
/// The aggregates answered by a native AVEVA retrieval mode — every defined member <see cref="TryMap"/> maps, derived
/// from it so the dispatch and the declared set can never disagree. Part of
/// <see cref="GatewayHistorianDataSource.ServedAggregates"/> (#681/#682).
/// <see cref="GatewayHistorianDataSource.ServedAggregates"/>.
/// </summary>
public static readonly FrozenSet<HistoryAggregateType> NativeAggregates =
Enum.GetValues<HistoryAggregateType>().Where(a => TryMap(a) is not null).ToFrozenSet();
@@ -44,7 +44,7 @@ internal static class AggregateModeMapper
{
if (TryMap(aggregate) is { } mode) return mode;
// Part 13 aggregates the gateway has no retrieval mode for (#285) — an UNDEFINED enum value is a
// Part 13 aggregates the gateway has no retrieval mode for — an UNDEFINED enum value is a
// programming error, but a defined-yet-unserved member is a normal client request the server
// answers with BadAggregateNotSupported.
if (Enum.IsDefined(aggregate)) throw new HistoryAggregateNotSupportedException(aggregate);
@@ -6,7 +6,7 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway.Mapping;
/// <remarks>
/// <para>The driver layer is deliberately free of an OPC UA SDK reference, so status codes are spelled
/// as bare <c>uint</c>s. The cost of that is a value nobody checks against the name it is written
/// under — the defect class Gitea #497 found in six places across four drivers, one of them the
/// under — the defect class found in six places across four drivers, one of them the
/// <c>BadNoData</c> in <see cref="SampleMapper"/> that was really <c>BadServerHalted</c>.</para>
/// <para><b>Named, not inline, on purpose.</b> <c>StatusCodeParityTests</c> guards these by reflecting
/// over <c>const uint</c> fields and comparing each against <c>Opc.Ua.StatusCodes</c> in the pinned SDK.
@@ -13,7 +13,7 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway.Mapping;
/// upstream: <see cref="DriverDataType.UInt16"/> maps to <see cref="HistorianDataType.Uint4"/> (the
/// historian's <c>UInt2</c> write path is not proven), and <see cref="DriverDataType.Boolean"/> maps
/// to <see cref="HistorianDataType.Int2"/> — the historian's <c>Int1</c> analog-tag creation path is
/// server-degenerate (issue #441 / HistorianGateway #11: <c>EnsureTags(Int1)</c> stores an unusable
/// server-degenerate (HistorianGateway <c>EnsureTags(Int1)</c> stores an unusable
/// stub), so Boolean historizes as a small 0/1 integer instead. String / DateTime / Reference are not
/// historized in v1 and throw <see cref="NotSupportedException"/>; callers that want to skip them
/// without catching an exception should consult <see cref="IsHistorizable(DriverDataType)"/> first.
@@ -28,7 +28,7 @@ internal static class HistorianTypeMapper
/// </exception>
public static HistorianDataType ToHistorianDataType(DriverDataType dataType) => dataType switch
{
DriverDataType.Boolean => HistorianDataType.Int2, // Int1 analog-tag creation is server-degenerate (issue #441) → store 0/1
DriverDataType.Boolean => HistorianDataType.Int2, // Int1 analog-tag creation is server-degenerate → store 0/1
DriverDataType.Int16 => HistorianDataType.Int2,
DriverDataType.Int32 => HistorianDataType.Int4,
@@ -24,7 +24,7 @@ internal static class SampleMapper
/// <param name="sample">The gateway raw sample.</param>
/// <returns>The driver-agnostic snapshot.</returns>
/// <remarks>
/// #690: a Bad row carries no value. histsdk puts a value on EVERY row (<c>NumericValue = 0</c> on a numeric row,
/// a Bad row carries no value. histsdk puts a value on EVERY row (<c>NumericValue = 0</c> on a numeric row,
/// <c>StringValue = ""</c> on a string one), so a stored NULL arrives as <c>0</c> / <c>""</c> with a Bad OPC quality
/// (live: <c>q=1 opc=0</c>) — that 0 is not a value, and AVEVA stores a Bad-quality sample as NULL, so a Bad row never
/// carries a real one. The value is therefore dropped whenever the mapped status is Bad, matching the SqlServer/QuestDB
@@ -51,7 +51,7 @@ internal static class SampleMapper
ServerTimestampUtc: DateTime.UtcNow);
}
/// <summary>The OPC UA status of a raw sample (shared by raw reads and the #681 raw-evaluated aggregates).</summary>
/// <summary>The OPC UA status of a raw sample (shared by raw reads and the raw-evaluated aggregates).</summary>
/// <param name="sample">The gateway raw sample.</param>
/// <returns>The mapped status code.</returns>
public static uint ToStatus(HistorianSample sample)
@@ -85,14 +85,14 @@ internal static class SampleMapper
/// </para>
/// <list type="bullet">
/// <item>Good (≥ 192) ⇒ the value, <c>Good</c>.</item>
/// <item>Uncertain (64–191) ⇒ the value, <c>UncertainDataSubNormal</c> (#685): AVEVA marks an interval that holds a
/// <item>Uncertain (64–191) ⇒ the value, <c>UncertainDataSubNormal</c>: AVEVA marks an interval that holds a
/// NULL/Bad sample <c>opc_quality = 64</c> and still answers its value (computed over the interval's good time only —
/// see docs/Historian.md). It used to map to <c>BadNoData</c> with the value discarded. The sub-code is the one the SQL
/// backends' aggregates give an interval that includes non-good data.</item>
/// <item>Bad (&lt; 64) ⇒ <c>BadNoData</c>, null value (the wire's 0 is not a value).</item>
/// </list>
/// <para>
/// #681: every status carries the Calculated info bits (<c>0x401</c>) like every other backend's processed value, and
/// every status carries the Calculated info bits (<c>0x401</c>) like every other backend's processed value, and
/// the bucket is stamped with its interval START (Part 13; it was the interval end), falling back to the end only when
/// the start is absent (verified on live AVEVA 2026-10-12: <c>start_time</c> is the interval start).
/// </para>
@@ -113,7 +113,7 @@ internal static class SampleMapper
/// <summary>
/// True when the aggregate row's interval lies in the requested window — the span between <paramref name="startUtc"/>
/// and <paramref name="endUtc"/> in either order (a reverse request covers the same span). AVEVA answers one extra row
/// for the interval BEFORE the window (<c>[start − interval, start)</c>, #685), which Part 11/13 has no place for: an
/// for the interval BEFORE the window (<c>[start − interval, start)</c>), which Part 11/13 has no place for: an
/// interval belongs to the window when its start lies in <c>[lo, hi)</c>; a row without a start time (the mapper then
/// stamps it with its end) belongs when its end lies in <c>(lo, hi]</c>.
/// </summary>
@@ -138,7 +138,7 @@ internal static class SampleMapper
return false;
}
/// <summary>Maps the aggregate buckets of a window to value snapshots, in order, dropping rows outside it (#685).</summary>
/// <summary>Maps the aggregate buckets of a window to value snapshots, in order, dropping rows outside it.</summary>
/// <param name="aggregates">The gateway aggregate samples.</param>
/// <param name="startUtc">The request's start time.</param>
/// <param name="endUtc">The request's end time.</param>