docs: add XML doc comments across src + Sister Projects section in CLAUDE.md

Bulk CommentChecker pass: fills in <param>/<inheritdoc> tags on public
APIs across all 23 src/ projects so the doc-coverage gate is green. Also
adds a Sister Projects section to CLAUDE.md pointing at the MxAccess
Gateway and OtOpcUa sibling repos, and gitignores local credential
captures (*login*.txt) and the wonder-app-vd03 deploy/ artifacts.
This commit is contained in:
Joseph Doherty
2026-05-28 01:55:24 -04:00
parent 6731845473
commit 1eb6e972b0
381 changed files with 5788 additions and 532 deletions
@@ -31,6 +31,9 @@ internal static class AlarmTriggerConfigCodec
/// type. Returns a model with default values on null/empty/malformed input
/// or for missing keys — never throws.
/// </summary>
/// <param name="json">The trigger configuration JSON string, or null/empty for defaults.</param>
/// <param name="type">The alarm trigger type that determines which properties to extract.</param>
/// <returns>A populated AlarmTriggerModel with default values for missing fields.</returns>
internal static AlarmTriggerModel Parse(string? json, AlarmTriggerType type)
{
var model = new AlarmTriggerModel();
@@ -115,6 +118,9 @@ internal static class AlarmTriggerConfigCodec
/// current trigger type. <c>Expression</c> is not bound to a single
/// attribute, so <c>attributeName</c> is omitted for it.
/// </summary>
/// <param name="model">The AlarmTriggerModel to serialize.</param>
/// <param name="type">The alarm trigger type determining which properties to serialize.</param>
/// <returns>The serialized JSON representation of the model.</returns>
internal static string Serialize(AlarmTriggerModel model, AlarmTriggerType type)
{
using var stream = new MemoryStream();
@@ -174,6 +180,11 @@ internal static class AlarmTriggerConfigCodec
return Encoding.UTF8.GetString(stream.ToArray());
}
/// <summary>
/// Normalizes a direction string to one of: rising, falling, or either.
/// </summary>
/// <param name="raw">The raw direction string to normalize.</param>
/// <returns>Normalized direction: "rising", "falling", or "either".</returns>
internal static string NormalizeDirection(string? raw) => raw?.ToLowerInvariant() switch
{
"rising" or "up" or "positive" => "rising",
@@ -213,47 +224,122 @@ internal static class AlarmTriggerConfigCodec
internal sealed class AlarmTriggerModel
{
/// <summary>
/// The attribute name bound to this trigger.
/// </summary>
public string? AttributeName { get; set; }
// ValueMatch
/// <summary>
/// The value to match against the attribute for ValueMatch triggers.
/// </summary>
public string? MatchValue { get; set; }
/// <summary>
/// Indicates whether the match should be inverted (not equal) for ValueMatch triggers.
/// </summary>
public bool NotEquals { get; set; }
// RangeViolation
/// <summary>
/// The minimum threshold for RangeViolation triggers.
/// </summary>
public double? Min { get; set; }
/// <summary>
/// The maximum threshold for RangeViolation triggers.
/// </summary>
public double? Max { get; set; }
// RateOfChange
/// <summary>
/// The threshold per second for RateOfChange triggers.
/// </summary>
public double? ThresholdPerSecond { get; set; }
/// <summary>
/// The time window in seconds for RateOfChange rate calculation.
/// </summary>
public double? WindowSeconds { get; set; }
/// <summary>
/// The direction of change: "rising", "falling", or "either" for RateOfChange triggers.
/// </summary>
public string Direction { get; set; } = "either";
// HiLo — any subset of setpoints may be set; per-setpoint priorities
// override the alarm-level priority for that band.
/// <summary>
/// The low-low setpoint for HiLo triggers.
/// </summary>
public double? LoLo { get; set; }
/// <summary>
/// The low setpoint for HiLo triggers.
/// </summary>
public double? Lo { get; set; }
/// <summary>
/// The high setpoint for HiLo triggers.
/// </summary>
public double? Hi { get; set; }
/// <summary>
/// The high-high setpoint for HiLo triggers.
/// </summary>
public double? HiHi { get; set; }
/// <summary>
/// The priority for low-low alarm state.
/// </summary>
public int? LoLoPriority { get; set; }
/// <summary>
/// The priority for low alarm state.
/// </summary>
public int? LoPriority { get; set; }
/// <summary>
/// The priority for high alarm state.
/// </summary>
public int? HiPriority { get; set; }
/// <summary>
/// The priority for high-high alarm state.
/// </summary>
public int? HiHiPriority { get; set; }
// Hysteresis: optional deactivation deadband per setpoint. Once at the
// band, the setpoint threshold is relaxed by this amount before the alarm
// de-escalates. Prevents flapping when the value hovers at the boundary.
/// <summary>
/// The deadband for low-low alarm de-escalation.
/// </summary>
public double? LoLoDeadband { get; set; }
/// <summary>
/// The deadband for low alarm de-escalation.
/// </summary>
public double? LoDeadband { get; set; }
/// <summary>
/// The deadband for high alarm de-escalation.
/// </summary>
public double? HiDeadband { get; set; }
/// <summary>
/// The deadband for high-high alarm de-escalation.
/// </summary>
public double? HiHiDeadband { get; set; }
// Per-band operator message. Optional; surfaces on AlarmStateChanged.Message
// and may be used by notification routing or operator displays.
/// <summary>
/// The operator message for low-low alarm state.
/// </summary>
public string? LoLoMessage { get; set; }
/// <summary>
/// The operator message for low alarm state.
/// </summary>
public string? LoMessage { get; set; }
/// <summary>
/// The operator message for high alarm state.
/// </summary>
public string? HiMessage { get; set; }
/// <summary>
/// The operator message for high-high alarm state.
/// </summary>
public string? HiHiMessage { get; set; }
// Expression — boolean C# expression evaluated on attribute updates.
/// <summary>
/// The boolean C# expression to evaluate for Expression triggers.
/// </summary>
public string? Expression { get; set; }
}