Implements Client.Shared (IOpcUaClientService with connection lifecycle, failover, browse, read/write, subscriptions, alarms, history, redundancy), Client.CLI (8 CliFx commands mirroring tools/opcuacli-dotnet), and Client.UI (Avalonia desktop app with tree browser, read/write, subscriptions, alarms, and history tabs). All three target .NET 10 and are covered by 249 unit tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
52 lines
1.5 KiB
C#
52 lines
1.5 KiB
C#
namespace ZB.MOM.WW.LmxOpcUa.Client.Shared.Models;
|
|
|
|
/// <summary>
|
|
/// Event data for an alarm or condition notification from the OPC UA server.
|
|
/// </summary>
|
|
public sealed class AlarmEventArgs : EventArgs
|
|
{
|
|
/// <summary>The name of the source object that raised the alarm.</summary>
|
|
public string SourceName { get; }
|
|
|
|
/// <summary>The condition type name.</summary>
|
|
public string ConditionName { get; }
|
|
|
|
/// <summary>The alarm severity (0-1000).</summary>
|
|
public ushort Severity { get; }
|
|
|
|
/// <summary>Human-readable alarm message.</summary>
|
|
public string Message { get; }
|
|
|
|
/// <summary>Whether the alarm should be retained in the display.</summary>
|
|
public bool Retain { get; }
|
|
|
|
/// <summary>Whether the alarm condition is currently active.</summary>
|
|
public bool ActiveState { get; }
|
|
|
|
/// <summary>Whether the alarm has been acknowledged.</summary>
|
|
public bool AckedState { get; }
|
|
|
|
/// <summary>The time the event occurred.</summary>
|
|
public DateTime Time { get; }
|
|
|
|
public AlarmEventArgs(
|
|
string sourceName,
|
|
string conditionName,
|
|
ushort severity,
|
|
string message,
|
|
bool retain,
|
|
bool activeState,
|
|
bool ackedState,
|
|
DateTime time)
|
|
{
|
|
SourceName = sourceName;
|
|
ConditionName = conditionName;
|
|
Severity = severity;
|
|
Message = message;
|
|
Retain = retain;
|
|
ActiveState = activeState;
|
|
AckedState = ackedState;
|
|
Time = time;
|
|
}
|
|
}
|