Expand XML docs across bridge and test code
This commit is contained in:
@@ -9,15 +9,28 @@ namespace OpcUaCli.Commands;
|
||||
[Command("subscribe", Description = "Monitor a node for value changes")]
|
||||
public class SubscribeCommand : ICommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the OPC UA endpoint URL to connect to before subscribing.
|
||||
/// </summary>
|
||||
[CommandOption("url", 'u', Description = "OPC UA server endpoint URL", IsRequired = true)]
|
||||
public string Url { get; init; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the node identifier to monitor for value changes.
|
||||
/// </summary>
|
||||
[CommandOption("node", 'n', Description = "Node ID to monitor", IsRequired = true)]
|
||||
public string NodeId { get; init; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sampling and publishing interval, in milliseconds, for the monitored item.
|
||||
/// </summary>
|
||||
[CommandOption("interval", 'i', Description = "Polling interval in milliseconds")]
|
||||
public int Interval { get; init; } = 1000;
|
||||
|
||||
/// <summary>
|
||||
/// Connects to the OPC UA endpoint and streams monitored-item notifications until cancellation.
|
||||
/// </summary>
|
||||
/// <param name="console">The console used to display subscription updates.</param>
|
||||
public async ValueTask ExecuteAsync(IConsole console)
|
||||
{
|
||||
using var session = await OpcUaHelper.ConnectAsync(Url);
|
||||
|
||||
Reference in New Issue
Block a user