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
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:
@@ -32,6 +32,10 @@ public static class Part9StateMachine
|
||||
/// branch-stack increment when a new active arrives while prior active is
|
||||
/// still un-acked, and shelving suppression.
|
||||
/// </summary>
|
||||
/// <param name="current">The current alarm condition state.</param>
|
||||
/// <param name="predicateTrue">Whether the predicate is true.</param>
|
||||
/// <param name="nowUtc">The current UTC time.</param>
|
||||
/// <returns>The transition result.</returns>
|
||||
public static TransitionResult ApplyPredicate(
|
||||
AlarmConditionState current,
|
||||
bool predicateTrue,
|
||||
@@ -86,6 +90,11 @@ public static class Part9StateMachine
|
||||
}
|
||||
|
||||
/// <summary>Operator acknowledges the currently-active transition.</summary>
|
||||
/// <param name="current">The current alarm condition state.</param>
|
||||
/// <param name="user">The user who is acknowledging.</param>
|
||||
/// <param name="comment">An optional comment.</param>
|
||||
/// <param name="nowUtc">The current UTC time.</param>
|
||||
/// <returns>The transition result.</returns>
|
||||
public static TransitionResult ApplyAcknowledge(
|
||||
AlarmConditionState current,
|
||||
string user,
|
||||
@@ -112,6 +121,11 @@ public static class Part9StateMachine
|
||||
}
|
||||
|
||||
/// <summary>Operator confirms the cleared transition. Part 9 requires confirm after clear for retain-flag alarms.</summary>
|
||||
/// <param name="current">The current alarm condition state.</param>
|
||||
/// <param name="user">The user who is confirming.</param>
|
||||
/// <param name="comment">An optional comment.</param>
|
||||
/// <param name="nowUtc">The current UTC time.</param>
|
||||
/// <returns>The transition result.</returns>
|
||||
public static TransitionResult ApplyConfirm(
|
||||
AlarmConditionState current,
|
||||
string user,
|
||||
@@ -137,6 +151,13 @@ public static class Part9StateMachine
|
||||
return new TransitionResult(next, EmissionKind.Confirmed);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Applies a one-shot shelving action.
|
||||
/// </summary>
|
||||
/// <param name="current">The current alarm condition state.</param>
|
||||
/// <param name="user">The user applying the shelving.</param>
|
||||
/// <param name="nowUtc">The current UTC time.</param>
|
||||
/// <returns>The transition result.</returns>
|
||||
public static TransitionResult ApplyOneShotShelve(
|
||||
AlarmConditionState current, string user, DateTime nowUtc)
|
||||
{
|
||||
@@ -154,6 +175,14 @@ public static class Part9StateMachine
|
||||
return new TransitionResult(next, EmissionKind.Shelved);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Applies a timed shelving action.
|
||||
/// </summary>
|
||||
/// <param name="current">The current alarm condition state.</param>
|
||||
/// <param name="user">The user applying the shelving.</param>
|
||||
/// <param name="unshelveAtUtc">The UTC time at which the alarm should be unshelved.</param>
|
||||
/// <param name="nowUtc">The current UTC time.</param>
|
||||
/// <returns>The transition result.</returns>
|
||||
public static TransitionResult ApplyTimedShelve(
|
||||
AlarmConditionState current, string user, DateTime unshelveAtUtc, DateTime nowUtc)
|
||||
{
|
||||
@@ -172,6 +201,13 @@ public static class Part9StateMachine
|
||||
return new TransitionResult(next, EmissionKind.Shelved);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Applies an unshelving action.
|
||||
/// </summary>
|
||||
/// <param name="current">The current alarm condition state.</param>
|
||||
/// <param name="user">The user applying the unshelving.</param>
|
||||
/// <param name="nowUtc">The current UTC time.</param>
|
||||
/// <returns>The transition result.</returns>
|
||||
public static TransitionResult ApplyUnshelve(AlarmConditionState current, string user, DateTime nowUtc)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(user)) throw new ArgumentException("User required.", nameof(user));
|
||||
@@ -188,6 +224,13 @@ public static class Part9StateMachine
|
||||
return new TransitionResult(next, EmissionKind.Unshelved);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Applies an enable action.
|
||||
/// </summary>
|
||||
/// <param name="current">The current alarm condition state.</param>
|
||||
/// <param name="user">The user enabling the alarm.</param>
|
||||
/// <param name="nowUtc">The current UTC time.</param>
|
||||
/// <returns>The transition result.</returns>
|
||||
public static TransitionResult ApplyEnable(AlarmConditionState current, string user, DateTime nowUtc)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(user)) throw new ArgumentException("User required.", nameof(user));
|
||||
@@ -204,6 +247,13 @@ public static class Part9StateMachine
|
||||
return new TransitionResult(next, EmissionKind.Enabled);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Applies a disable action.
|
||||
/// </summary>
|
||||
/// <param name="current">The current alarm condition state.</param>
|
||||
/// <param name="user">The user disabling the alarm.</param>
|
||||
/// <param name="nowUtc">The current UTC time.</param>
|
||||
/// <returns>The transition result.</returns>
|
||||
public static TransitionResult ApplyDisable(AlarmConditionState current, string user, DateTime nowUtc)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(user)) throw new ArgumentException("User required.", nameof(user));
|
||||
@@ -220,6 +270,14 @@ public static class Part9StateMachine
|
||||
return new TransitionResult(next, EmissionKind.Disabled);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Applies an add comment action.
|
||||
/// </summary>
|
||||
/// <param name="current">The current alarm condition state.</param>
|
||||
/// <param name="user">The user adding the comment.</param>
|
||||
/// <param name="text">The comment text.</param>
|
||||
/// <param name="nowUtc">The current UTC time.</param>
|
||||
/// <returns>The transition result.</returns>
|
||||
public static TransitionResult ApplyAddComment(
|
||||
AlarmConditionState current, string user, string text, DateTime nowUtc)
|
||||
{
|
||||
@@ -236,6 +294,9 @@ public static class Part9StateMachine
|
||||
/// the (possibly unshelved) state + emission hint so the engine knows to
|
||||
/// publish an Unshelved event at the right moment.
|
||||
/// </summary>
|
||||
/// <param name="current">The current alarm condition state.</param>
|
||||
/// <param name="nowUtc">The current UTC time.</param>
|
||||
/// <returns>The transition result.</returns>
|
||||
public static TransitionResult ApplyShelvingCheck(AlarmConditionState current, DateTime nowUtc)
|
||||
{
|
||||
if (current.Shelving.Kind != ShelvingKind.Timed) return TransitionResult.None(current);
|
||||
@@ -284,7 +345,19 @@ public static class Part9StateMachine
|
||||
/// </remarks>
|
||||
public sealed record TransitionResult(AlarmConditionState State, EmissionKind Emission, string? NoOpReason = null)
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a transition result with no change and no emission.
|
||||
/// </summary>
|
||||
/// <param name="state">The alarm condition state.</param>
|
||||
/// <returns>The transition result.</returns>
|
||||
public static TransitionResult None(AlarmConditionState state) => new(state, EmissionKind.None);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a transition result indicating a no-op operation with a reason.
|
||||
/// </summary>
|
||||
/// <param name="state">The alarm condition state.</param>
|
||||
/// <param name="reason">The reason for the no-op.</param>
|
||||
/// <returns>The transition result.</returns>
|
||||
public static TransitionResult NoOp(AlarmConditionState state, string reason)
|
||||
=> new(state, EmissionKind.None, reason);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user