Expand XML docs across bridge and test code
This commit is contained in:
@@ -9,18 +9,34 @@ namespace OpcUaCli.Commands;
|
||||
[Command("browse", Description = "Browse the OPC UA address space")]
|
||||
public class BrowseCommand : ICommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the OPC UA endpoint URL to connect to before browsing.
|
||||
/// </summary>
|
||||
[CommandOption("url", 'u', Description = "OPC UA server endpoint URL", IsRequired = true)]
|
||||
public string Url { get; init; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optional node identifier to browse from; defaults to the OPC UA Objects folder.
|
||||
/// </summary>
|
||||
[CommandOption("node", 'n', Description = "Node ID to browse (default: Objects folder)")]
|
||||
public string? NodeId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the maximum browse depth when recursive traversal is enabled.
|
||||
/// </summary>
|
||||
[CommandOption("depth", 'd', Description = "Maximum browse depth")]
|
||||
public int Depth { get; init; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether browse recursion should continue into child objects.
|
||||
/// </summary>
|
||||
[CommandOption("recursive", 'r', Description = "Browse recursively (uses --depth as max depth)")]
|
||||
public bool Recursive { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Connects to the OPC UA endpoint and writes the browse tree to the console.
|
||||
/// </summary>
|
||||
/// <param name="console">The console used to emit browse output.</param>
|
||||
public async ValueTask ExecuteAsync(IConsole console)
|
||||
{
|
||||
using var session = await OpcUaHelper.ConnectAsync(Url);
|
||||
|
||||
Reference in New Issue
Block a user