Files
mxaccessgw/src/ZB.MOM.WW.MxGateway.Worker/MxAccess/MxAlarmSnapshot.cs
T
Joseph Doherty 64dc1215fd
ci / nightly-windev (push) Has been skipped
ci / windows-x86 (push) Successful in 2m7s
ci / java (push) Failing after 2m17s
ci / portable (push) Failing after 2m23s
feat(worker): attribute alarm ack transitions from wnwrap ACK fields
Claude-Session: https://claude.ai/code/session_016J6isfcgqy4SB2RK3ZvFvT
2026-10-19 19:18:24 -04:00

63 lines
3.1 KiB
C#

using System;
namespace ZB.MOM.WW.MxGateway.Worker.MxAccess;
/// <summary>
/// Single alarm record as emitted by the wnwrapConsumer XML stream.
/// Field names match the captured XML schema (see
/// <c>docs/AlarmClientDiscovery.md</c> "Option A — captured" section).
/// Records are also produced by the subtag synthesis path when
/// <see cref="Degraded"/> is set.
/// </summary>
public sealed class MxAlarmSnapshotRecord
{
/// <summary>Gets or sets the unique alarm identifier.</summary>
public Guid AlarmGuid { get; set; }
/// <summary>Gets or sets the UTC timestamp of the transition.</summary>
public DateTime TransitionTimestampUtc { get; set; }
/// <summary>Gets or sets the provider node name.</summary>
public string ProviderNode { get; set; } = string.Empty;
/// <summary>Gets or sets the provider name.</summary>
public string ProviderName { get; set; } = string.Empty;
/// <summary>Gets or sets the alarm group.</summary>
public string Group { get; set; } = string.Empty;
/// <summary>Gets or sets the tag name.</summary>
public string TagName { get; set; } = string.Empty;
/// <summary>Gets or sets the alarm type.</summary>
public string Type { get; set; } = string.Empty;
/// <summary>Gets or sets the alarm value.</summary>
public string Value { get; set; } = string.Empty;
/// <summary>Gets or sets the alarm limit.</summary>
public string Limit { get; set; } = string.Empty;
/// <summary>Gets or sets the alarm priority.</summary>
public int Priority { get; set; }
/// <summary>Gets or sets the alarm state.</summary>
public MxAlarmStateKind State { get; set; }
/// <summary>Gets or sets the operator node name.</summary>
public string OperatorNode { get; set; } = string.Empty;
/// <summary>Gets or sets the operator name.</summary>
public string OperatorName { get; set; } = string.Empty;
/// <summary>Gets or sets the alarm comment.</summary>
public string AlarmComment { get; set; } = string.Empty;
/// <summary>Gets or sets the acknowledgement comment (wnwrap <c>ACK_COMMENT</c>).</summary>
public string AckComment { get; set; } = string.Empty;
/// <summary>Gets or sets the acknowledging operator's name (wnwrap <c>ACK_OPERATOR_NAME</c>).</summary>
public string AckOperatorName { get; set; } = string.Empty;
/// <summary>Gets or sets the acknowledging operator's domain (wnwrap <c>ACK_DOMAIN_NAME</c>).</summary>
public string AckOperatorDomain { get; set; } = string.Empty;
/// <summary>Gets or sets the acknowledging node, i.e. the MXAccess client name (wnwrap <c>ACK_OPERATOR_NODE</c>).</summary>
public string AckOperatorNode { get; set; } = string.Empty;
/// <summary>
/// Gets or sets a value indicating whether this record was synthesized
/// by the subtag-provider fallback rather than emitted by the native
/// alarmmgr (wnwrap) path. Default <see langword="false"/> preserves
/// parity for the alarmmgr path; the subtag fallback sets it to
/// <see langword="true"/>.
/// </summary>
public bool Degraded { get; set; }
}