docs: backfill XML documentation across 756 files
v2-ci / build (push) Failing after 1m43s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped

Adds <summary>, <param>, <typeparam>, and <inheritdoc/> tags to public
members surfaced by commentchecker — resolves 5,847 of 5,869 issues
(99.6%) across three /fixdocs passes.
This commit is contained in:
Joseph Doherty
2026-05-28 08:10:17 -04:00
parent f9fc7dd2e1
commit 64e3fbe035
756 changed files with 9876 additions and 96 deletions
@@ -39,6 +39,10 @@ internal sealed class AbCipAlarmProjection : IAsyncDisposable
private readonly Lock _subsLock = new();
private long _nextId;
/// <summary>Initializes a new instance of the <see cref="AbCipAlarmProjection"/> class.</summary>
/// <param name="driver">The AB CIP driver instance.</param>
/// <param name="pollInterval">The interval at which to poll for alarm state changes.</param>
/// <param name="logger">Optional logger instance.</param>
public AbCipAlarmProjection(AbCipDriver driver, TimeSpan pollInterval, ILogger? logger = null)
{
_driver = driver;
@@ -46,6 +50,10 @@ internal sealed class AbCipAlarmProjection : IAsyncDisposable
_logger = logger ?? NullLogger.Instance;
}
/// <summary>Subscribes to alarm events for the specified source nodes.</summary>
/// <param name="sourceNodeIds">The node identifiers to monitor for alarm state changes.</param>
/// <param name="cancellationToken">A cancellation token to stop the operation.</param>
/// <returns>A subscription handle for managing the subscription.</returns>
public async Task<IAlarmSubscriptionHandle> SubscribeAsync(
IReadOnlyList<string> sourceNodeIds, CancellationToken cancellationToken)
{
@@ -61,6 +69,10 @@ internal sealed class AbCipAlarmProjection : IAsyncDisposable
return handle;
}
/// <summary>Unsubscribes from alarm events using the provided subscription handle.</summary>
/// <param name="handle">The subscription handle obtained from <see cref="SubscribeAsync"/>.</param>
/// <param name="cancellationToken">A cancellation token to stop the operation.</param>
/// <returns>A task representing the asynchronous unsubscribe operation.</returns>
public async Task UnsubscribeAsync(IAlarmSubscriptionHandle handle, CancellationToken cancellationToken)
{
if (handle is not AbCipAlarmSubscriptionHandle h) return;
@@ -74,6 +86,10 @@ internal sealed class AbCipAlarmProjection : IAsyncDisposable
sub.Cts.Dispose();
}
/// <summary>Acknowledges one or more active alarms.</summary>
/// <param name="acknowledgements">The list of acknowledgement requests specifying which alarms to acknowledge.</param>
/// <param name="cancellationToken">A cancellation token to stop the operation.</param>
/// <returns>A task representing the asynchronous acknowledgement operation.</returns>
public async Task AcknowledgeAsync(
IReadOnlyList<AlarmAcknowledgeRequest> acknowledgements, CancellationToken cancellationToken)
{
@@ -91,6 +107,8 @@ internal sealed class AbCipAlarmProjection : IAsyncDisposable
_ = await _driver.WriteAsync(requests, cancellationToken).ConfigureAwait(false);
}
/// <summary>Releases all resources associated with this alarm projection.</summary>
/// <returns>A task representing the asynchronous disposal operation.</returns>
public async ValueTask DisposeAsync()
{
List<Subscription> snap;
@@ -108,6 +126,8 @@ internal sealed class AbCipAlarmProjection : IAsyncDisposable
/// in the subscription, diffs each against last-seen state, fires raise/clear events.
/// Extracted so tests can drive one tick without standing up the Task.Run loop.
/// </summary>
/// <param name="sub">The subscription to process.</param>
/// <param name="results">The data values read from the subscription source nodes.</param>
internal void Tick(Subscription sub, IReadOnlyList<DataValueSnapshot> results)
{
// results index layout: for each sourceNode, [InFaulted, Severity] in order.
@@ -176,6 +196,9 @@ internal sealed class AbCipAlarmProjection : IAsyncDisposable
}
}
/// <summary>Maps a raw severity value to an <see cref="AlarmSeverity"/> enum value.</summary>
/// <param name="raw">The raw severity value from the alarm data.</param>
/// <returns>The corresponding alarm severity level.</returns>
internal static AlarmSeverity MapSeverity(int raw) => raw switch
{
<= 250 => AlarmSeverity.Low,
@@ -203,14 +226,28 @@ internal sealed class AbCipAlarmProjection : IAsyncDisposable
internal sealed class Subscription
{
/// <summary>Initializes a new instance of the <see cref="Subscription"/> class.</summary>
/// <param name="handle">The subscription handle.</param>
/// <param name="sourceNodeIds">The source node identifiers to monitor.</param>
/// <param name="cts">The cancellation token source for stopping the subscription.</param>
public Subscription(AbCipAlarmSubscriptionHandle handle, IReadOnlyList<string> sourceNodeIds, CancellationTokenSource cts)
{
Handle = handle; SourceNodeIds = sourceNodeIds; Cts = cts;
}
/// <summary>Gets the subscription handle.</summary>
public AbCipAlarmSubscriptionHandle Handle { get; }
/// <summary>Gets the source node identifiers being monitored.</summary>
public IReadOnlyList<string> SourceNodeIds { get; }
/// <summary>Gets the cancellation token source for this subscription.</summary>
public CancellationTokenSource Cts { get; }
/// <summary>Gets or sets the polling loop task.</summary>
public Task Loop { get; set; } = Task.CompletedTask;
/// <summary>Gets the dictionary tracking the last known InFaulted state for each node.</summary>
public Dictionary<string, bool> LastInFaulted { get; } = new(StringComparer.Ordinal);
}
}
@@ -218,6 +255,7 @@ internal sealed class AbCipAlarmProjection : IAsyncDisposable
/// <summary>Handle returned by <see cref="AbCipAlarmProjection.SubscribeAsync"/>.</summary>
public sealed record AbCipAlarmSubscriptionHandle(long Id) : IAlarmSubscriptionHandle
{
/// <summary>Gets a diagnostic identifier for this subscription.</summary>
public string DiagnosticId => $"abcip-alarm-sub-{Id}";
}
@@ -234,6 +272,8 @@ public static class AbCipAlarmDetector
/// (analog alarms with <c>HHLimit</c>/<c>HLimit</c>/<c>LLimit</c>/<c>LLLimit</c>)
/// ships as a follow-up.
/// </summary>
/// <param name="tag">The tag definition to check for ALMD signature.</param>
/// <returns>True if the tag has the ALMD alarm signature; false otherwise.</returns>
public static bool IsAlmd(AbCipTagDefinition tag)
{
if (tag.DataType != AbCipDataType.Structure || tag.Members is null) return false;