Expand XML docs across bridge and test code
This commit is contained in:
@@ -9,12 +9,22 @@ namespace OpcUaCli.Commands;
|
||||
[Command("read", Description = "Read a value from a node")]
|
||||
public class ReadCommand : ICommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the OPC UA endpoint URL to connect to before reading.
|
||||
/// </summary>
|
||||
[CommandOption("url", 'u', Description = "OPC UA server endpoint URL", IsRequired = true)]
|
||||
public string Url { get; init; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the node identifier whose value should be read.
|
||||
/// </summary>
|
||||
[CommandOption("node", 'n', Description = "Node ID (e.g. ns=2;s=MyNode)", IsRequired = true)]
|
||||
public string NodeId { get; init; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Connects to the endpoint, reads the target node, and prints the returned value details.
|
||||
/// </summary>
|
||||
/// <param name="console">The console used to report the read result.</param>
|
||||
public async ValueTask ExecuteAsync(IConsole console)
|
||||
{
|
||||
using var session = await OpcUaHelper.ConnectAsync(Url);
|
||||
|
||||
Reference in New Issue
Block a user