docs(xmldoc): fill missing XML docs + strip tracking-ID comments across src
v2-ci / build (push) Failing after 41s
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>/<returns>/<inheritdoc> where missing and removes
project bookkeeping IDs (task/tracking refs) from shipped code comments,
so the docs read cleanly and CommentChecker is quiet except for known
false positives (PLC/protocol terms, event/IEqualityComparer inheritdoc).
Doc/comment-only; no logic changed; solution builds clean.
This commit is contained in:
Joseph Doherty
2026-07-07 12:38:39 -04:00
parent 384dbd7d36
commit 9cad9ed0fc
375 changed files with 1899 additions and 2493 deletions
@@ -133,18 +133,6 @@ public sealed class GatewayHistorianDataSource : IHistorianDataSource, IAsyncDis
}
/// <inheritdoc />
/// <remarks>
/// Depends on the target gateway running with <c>RuntimeDb:EventReadsEnabled=true</c> (the
/// SQL alarm-history path). The <paramref name="sourceName"/> is passed through to the
/// gateway, but its SQL <c>ReadEvents</c> source filter may not be present yet — so this
/// adapter also filters the mapped events by <see cref="HistoricalEvent.SourceName"/>
/// client-side (defensive; remove once the server filter is confirmed). The
/// <paramref name="maxEvents"/> cap is enforced client-side by early stream termination:
/// a non-positive value applies no client cap (the gateway may still apply its
/// <c>EventReadMaxRows</c>); a positive cap stops at N and sets a non-null
/// <see cref="HistoricalEventsResult.ContinuationPoint"/> iff at least one further matching
/// event existed (the Core.Abstractions-009 truncation signal).
/// </remarks>
public async Task<HistoricalEventsResult> ReadEventsAsync(
string? sourceName, DateTime startUtc, DateTime endUtc, int maxEvents,
CancellationToken cancellationToken)
@@ -169,7 +157,7 @@ public sealed class GatewayHistorianDataSource : IHistorianDataSource, IAsyncDis
}
// One more matching event arriving once the cap is full means the result is
// truncated — stop draining and flag it (Core.Abstractions-009).
// truncated — stop draining and flag it.
if (hasCap && collected.Count == maxEvents)
{
truncated = true;
@@ -180,7 +168,7 @@ public sealed class GatewayHistorianDataSource : IHistorianDataSource, IAsyncDis
}
RecordOutcome(success: true, error: null);
// A non-null, opaque token signals truncation to the caller (Core.Abstractions-009).
// A non-null, opaque token signals truncation to the caller.
// The gateway has no resumable cursor, so the token's contents carry no paging state —
// its presence alone is the "more events exist" signal. A fresh array per call keeps it
// from being shared/mutated.
@@ -73,14 +73,6 @@ public sealed class HistorianGatewayClientAdapter : IHistorianGatewayClient, IDi
_inner.ReadAtTimeAsync(tag, timestampsUtc, ct);
/// <inheritdoc />
/// <remarks>
/// <paramref name="sourceName"/> is rendered into the gateway's one server-filterable predicate —
/// a <c>Source_Object</c> <see cref="HistorianEventComparison.Equal"/> filter the SQL ReadEvents
/// path binds as <c>WHERE Source_Object = @source</c>. A <c>null</c> source passes a null filter
/// (full window). <paramref name="maxEvents"/> is intentionally ignored here: the gateway wire
/// contract carries no per-call cap, so the cap is enforced upstream by
/// <see cref="GatewayHistorianDataSource"/> via early stream termination.
/// </remarks>
public IAsyncEnumerable<HistorianEvent> ReadEventsAsync(
string? sourceName, DateTime startUtc, DateTime endUtc, int maxEvents, CancellationToken ct)
{
@@ -12,6 +12,12 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway;
public interface IHistorianGatewayClient : IAsyncDisposable
{
/// <summary>Streams raw historian samples for a tag over a time window.</summary>
/// <param name="tag">The historian tag name to read.</param>
/// <param name="startUtc">Inclusive start of the requested time window (UTC).</param>
/// <param name="endUtc">Exclusive end of the requested time window (UTC).</param>
/// <param name="maxValues">The maximum number of raw samples to return.</param>
/// <param name="ct">Cancellation token.</param>
/// <returns>An async stream of raw historian samples for the tag.</returns>
IAsyncEnumerable<HistorianSample> ReadRawAsync(
string tag,
DateTime startUtc,
@@ -20,6 +26,13 @@ public interface IHistorianGatewayClient : IAsyncDisposable
CancellationToken ct);
/// <summary>Streams aggregate samples for a tag using the given retrieval mode and interval.</summary>
/// <param name="tag">The historian tag name to read.</param>
/// <param name="startUtc">Inclusive start of the requested time window (UTC).</param>
/// <param name="endUtc">Exclusive end of the requested time window (UTC).</param>
/// <param name="mode">The aggregate retrieval mode to apply.</param>
/// <param name="interval">The aggregation bucket interval.</param>
/// <param name="ct">Cancellation token.</param>
/// <returns>An async stream of aggregate samples for the tag.</returns>
IAsyncEnumerable<HistorianAggregateSample> ReadAggregateAsync(
string tag,
DateTime startUtc,
@@ -29,6 +42,10 @@ public interface IHistorianGatewayClient : IAsyncDisposable
CancellationToken ct);
/// <summary>Reads the samples nearest to each of the requested timestamps (unary).</summary>
/// <param name="tag">The historian tag name to read.</param>
/// <param name="timestampsUtc">The timestamps (UTC) to find the nearest sample for.</param>
/// <param name="ct">Cancellation token.</param>
/// <returns>The samples nearest to each requested timestamp.</returns>
Task<IReadOnlyList<HistorianSample>> ReadAtTimeAsync(
string tag,
IReadOnlyList<DateTime> timestampsUtc,
@@ -45,6 +62,7 @@ public interface IHistorianGatewayClient : IAsyncDisposable
/// <c>RuntimeDb:EventReadMaxRows</c>); a positive value stops draining after that many events.
/// </param>
/// <param name="ct">Cancellation token.</param>
/// <returns>An async stream of historian events within the window.</returns>
IAsyncEnumerable<HistorianEvent> ReadEventsAsync(
string? sourceName,
DateTime startUtc,
@@ -53,22 +71,36 @@ public interface IHistorianGatewayClient : IAsyncDisposable
CancellationToken ct);
/// <summary>Writes live values for a tag through the gateway's SQL live-write path.</summary>
/// <param name="tag">The historian tag name to write values for.</param>
/// <param name="values">The live values to write.</param>
/// <param name="ct">Cancellation token.</param>
/// <returns>The write acknowledgement returned by the gateway.</returns>
Task<WriteAck> WriteLiveValuesAsync(
string tag,
IReadOnlyList<HistorianLiveValue> values,
CancellationToken ct);
/// <summary>Sends a single historian event.</summary>
/// <param name="evt">The historian event to send.</param>
/// <param name="ct">Cancellation token.</param>
/// <returns>The write acknowledgement returned by the gateway.</returns>
Task<WriteAck> SendEventAsync(HistorianEvent evt, CancellationToken ct);
/// <summary>Ensures the supplied tag definitions exist (create-or-update).</summary>
/// <param name="definitions">The tag definitions to create or update.</param>
/// <param name="ct">Cancellation token.</param>
/// <returns>Per-tag outcomes for the create-or-update operation.</returns>
Task<TagOperationResults> EnsureTagsAsync(
IReadOnlyList<HistorianTagDefinition> definitions,
CancellationToken ct);
/// <summary>Probes gateway/historian reachability.</summary>
/// <param name="ct">Cancellation token.</param>
/// <returns><c>true</c> when the gateway and historian are reachable; otherwise <c>false</c>.</returns>
Task<bool> ProbeAsync(CancellationToken ct);
/// <summary>Reads the gateway's current historian connection status.</summary>
/// <param name="ct">Cancellation token.</param>
/// <returns>The current connection status reported by the gateway.</returns>
Task<ConnectionStatus> GetConnectionStatusAsync(CancellationToken ct);
}
@@ -47,6 +47,7 @@ internal static class HistorianTypeMapper
/// provisioning hook skip deferred types without catching <see cref="NotSupportedException"/>.
/// </summary>
/// <param name="dataType">The driver-agnostic data type.</param>
/// <returns>True if the type is one of the nine historizable numeric types; otherwise false.</returns>
public static bool IsHistorizable(DriverDataType dataType) => dataType switch
{
DriverDataType.Boolean
@@ -91,5 +91,6 @@ public sealed class GatewayHistorianValueWriter : IHistorianValueWriter, IAsyncD
/// Disposes the underlying gateway client (and its gRPC channel). The DI container owns this
/// writer as a singleton, so this fires once at host shutdown — closing the channel gracefully.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
public ValueTask DisposeAsync() => _client.DisposeAsync();
}
@@ -18,6 +18,8 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway.Recorder;
internal static class HistorizationOutboxEntrySerializer
{
/// <summary>Serializes <paramref name="entry"/> to a fixed-layout little-endian byte array.</summary>
/// <param name="entry">The outbox entry to serialize.</param>
/// <returns>The fixed-layout little-endian byte array.</returns>
public static byte[] Serialize(HistorizationOutboxEntry entry)
{
ArgumentNullException.ThrowIfNull(entry);
@@ -41,6 +43,8 @@ internal static class HistorizationOutboxEntrySerializer
}
/// <summary>Reconstructs a <see cref="HistorizationOutboxEntry"/> from its serialized bytes.</summary>
/// <param name="span">The fixed-layout little-endian bytes produced by <see cref="Serialize"/>.</param>
/// <returns>The reconstructed outbox entry.</returns>
public static HistorizationOutboxEntry Deserialize(ReadOnlySpan<byte> span)
{
var id = new Guid(span[..16]);