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:
@@ -6,7 +6,7 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.FOCAS;
|
||||
|
||||
/// <summary>
|
||||
/// Polls the CNC active-alarm list (<c>cnc_rdalmmsg2</c>) of every device that owns a subscribed
|
||||
/// <c>ALARM:</c> raw tag and drives ONE Part 9 condition per such tag (Gitea #647).
|
||||
/// <c>ALARM:</c> raw tag and drives ONE Part 9 condition per such tag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
@@ -15,21 +15,21 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.FOCAS;
|
||||
/// arrive through <see cref="SubscribeAsync"/>. Every event uses the RawPath as
|
||||
/// <see cref="AlarmEventArgs.ConditionId"/> — the exact key the host routes on — and carries a
|
||||
/// <see cref="AlarmEventArgs.Kind"/>, without which the host's projector keeps the prior state. Before
|
||||
/// #647 this class treated the RawPaths as device-host filters (so nothing was ever polled) and raised
|
||||
/// alarm selectors were supported this class treated the RawPaths as device-host filters (so nothing was ever polled) and raised
|
||||
/// <c>"{host}#{Type}:{Number}"</c> with no kind (so nothing would have routed anyway).
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>A failed read is not an empty list.</b> <see cref="IFocasClient.ReadAlarmsAsync"/> throws on any
|
||||
/// failure; the device is then skipped for that tick and every condition on it keeps its state. The
|
||||
/// host already annotates the driver's conditions <c>BadNoCommunication</c> on comms loss (#477).
|
||||
/// host already annotates the driver's conditions <c>BadNoCommunication</c> on comms loss.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>Delivery is diffed against what the server was TOLD</b> (<see cref="_told"/>, the MTConnect #626
|
||||
/// <b>Delivery is diffed against what the server was TOLD</b> (<see cref="_told"/>, the MTConnect
|
||||
/// pattern), recorded only while an <c>OnAlarmEvent</c> handler is attached. The record lives on this
|
||||
/// object, which lives as long as the driver: it survives a re-subscribe with the same set (a reconnect),
|
||||
/// a re-initialise and a shutdown/re-init cycle — the server's condition nodes outlive all three, and
|
||||
/// re-raising there would un-acknowledge an acknowledged alarm. A changed subscribed set prunes only the
|
||||
/// RawPaths that LEFT it (the server carries every survivor across the rebuild, #641).
|
||||
/// RawPaths that LEFT it (the server carries every survivor across the rebuild).
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>One poll loop</b>, owned by the current subscription. Evaluation and delivery run under
|
||||
@@ -77,11 +77,11 @@ internal sealed class FocasAlarmProjection : IAsyncDisposable
|
||||
private const uint QualityBadNoCommunication = 0x80310000u;
|
||||
|
||||
/// <summary>
|
||||
/// Whether an alarm-read failure is a CNC REFUSAL (Gitea #647 re-review R2): the CNC answered with a non-OK
|
||||
/// Whether an alarm-read failure is a CNC REFUSAL: the CNC answered with a non-OK
|
||||
/// FOCAS return code, so the transport is fine and the control simply will not serve <c>cnc_rdalmmsg2</c>
|
||||
/// (e.g. <c>EW_FUNC</c>, as <c>cnc_rdparam</c> does on the Makino). That is a capability answer, not comms
|
||||
/// loss: it must NOT degrade driver health, or an alarm-only driver on such a control would be reconnected by
|
||||
/// the #527 watchdog every 90 s forever. Everything else (session down, wire fault, malformed reply, backoff)
|
||||
/// the comms-loss watchdog every 90 s forever. Everything else (session down, wire fault, malformed reply, backoff)
|
||||
/// is a transport failure.
|
||||
/// </summary>
|
||||
/// <param name="error">The alarm-read failure.</param>
|
||||
@@ -125,9 +125,9 @@ internal sealed class FocasAlarmProjection : IAsyncDisposable
|
||||
var sub = new Subscription(new FocasAlarmSubscriptionHandle(Interlocked.Increment(ref _nextId)), refs);
|
||||
lock (_alarmLock)
|
||||
{
|
||||
// Forget only the conditions that LEFT the set (#641) — the SAME set (a reconnect) prunes nothing.
|
||||
// Forget only the conditions that LEFT the set — the SAME set (a reconnect) prunes nothing.
|
||||
foreach (var gone in _told.Keys.Where(k => !refs.Contains(k)).ToList()) _told.Remove(gone);
|
||||
// A (re)subscribe follows a reconnect, where the host re-annotates every condition Good (#477); forget
|
||||
// A (re)subscribe follows a reconnect, where the host re-annotates every condition Good; forget
|
||||
// which conditions this projection marked Bad, so a still-failing device re-asserts its Bad.
|
||||
_qualityBadTold.Clear();
|
||||
Volatile.Write(ref _current, sub);
|
||||
@@ -173,7 +173,8 @@ internal sealed class FocasAlarmProjection : IAsyncDisposable
|
||||
/// <returns>A task representing the asynchronous operation.</returns>
|
||||
public Task ResumeAsync() => Volatile.Read(ref _current) is null ? Task.CompletedTask : RestartLoopAsync();
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>Stops the poll loop and releases the projection.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
public async ValueTask DisposeAsync() => await StopLoopAsync().ConfigureAwait(false);
|
||||
|
||||
private async Task RestartLoopAsync()
|
||||
@@ -328,8 +329,8 @@ internal sealed class FocasAlarmProjection : IAsyncDisposable
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A FAILED read of <paramref name="deviceHostAddress"/> (Gitea #647 review): conditions keep their state, but
|
||||
/// each subscribed one is annotated once per outage through the #626 quality-only path (no Active/Acked change,
|
||||
/// A FAILED read of <paramref name="deviceHostAddress"/>: conditions keep their state, but
|
||||
/// each subscribed one is annotated once per outage through the quality-only path (no Active/Acked change,
|
||||
/// no <c>/alerts</c> row) — <c>BadNoCommunication</c> for a transport failure, <c>BadNotSupported</c> for a CNC
|
||||
/// refusal (R2, <see cref="IsCncRefusal"/>) — and the first failure of the episode (per kind) logs one
|
||||
/// Warning. The next successful read lifts the Bad in <see cref="Tick"/>.
|
||||
@@ -379,7 +380,7 @@ internal sealed class FocasAlarmProjection : IAsyncDisposable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>A quality-only annotation (#626): <see cref="AlarmTransitionKind.Unspecified"/> + a status code.</summary>
|
||||
/// <summary>A quality-only annotation: <see cref="AlarmTransitionKind.Unspecified"/> + a status code.</summary>
|
||||
private AlarmEventArgs QualityOnly(FocasAlarmTag tag, IAlarmSubscriptionHandle handle, uint quality, DateTime now)
|
||||
{
|
||||
_told.TryGetValue(tag.RawPath, out var told);
|
||||
|
||||
Reference in New Issue
Block a user