Refine XML docs for historian, OPC UA, and tests

This commit is contained in:
Joseph Doherty
2026-03-26 15:33:14 -04:00
parent 3c326e2d45
commit ce0b291664
14 changed files with 215 additions and 3 deletions

View File

@@ -9,18 +9,34 @@ namespace OpcUaCli.Commands;
[Command("alarms", Description = "Subscribe to alarm events on a node")]
public class AlarmsCommand : ICommand
{
/// <summary>
/// Gets the OPC UA endpoint URL for the server whose alarm stream should be monitored.
/// </summary>
[CommandOption("url", 'u', Description = "OPC UA server endpoint URL", IsRequired = true)]
public string Url { get; init; } = default!;
/// <summary>
/// Gets the node to subscribe to for event notifications, typically a source object or the server node.
/// </summary>
[CommandOption("node", 'n', Description = "Node ID to monitor for events (default: Server node)")]
public string? NodeId { get; init; }
/// <summary>
/// Gets the requested publishing and sampling interval for the alarm subscription.
/// </summary>
[CommandOption("interval", 'i', Description = "Publishing interval in milliseconds")]
public int Interval { get; init; } = 1000;
/// <summary>
/// Gets a value indicating whether the command should request a retained-condition refresh after subscribing.
/// </summary>
[CommandOption("refresh", Description = "Request a ConditionRefresh after subscribing")]
public bool Refresh { get; init; }
/// <summary>
/// Connects to the target server and streams alarm or condition events to the operator console.
/// </summary>
/// <param name="console">The CLI console used for cancellation and alarm-event output.</param>
public async ValueTask ExecuteAsync(IConsole console)
{
using var session = await OpcUaHelper.ConnectAsync(Url);