Expand XML docs across bridge and test code
This commit is contained in:
@@ -9,15 +9,28 @@ namespace OpcUaCli.Commands;
|
||||
[Command("write", Description = "Write a value to a node")]
|
||||
public class WriteCommand : ICommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the OPC UA endpoint URL to connect to before issuing the write.
|
||||
/// </summary>
|
||||
[CommandOption("url", 'u', Description = "OPC UA server endpoint URL", IsRequired = true)]
|
||||
public string Url { get; init; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the node identifier that should receive the write.
|
||||
/// </summary>
|
||||
[CommandOption("node", 'n', Description = "Node ID (e.g. ns=2;s=MyNode)", IsRequired = true)]
|
||||
public string NodeId { get; init; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the textual value supplied on the command line before type conversion.
|
||||
/// </summary>
|
||||
[CommandOption("value", 'v', Description = "Value to write", IsRequired = true)]
|
||||
public string Value { get; init; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Connects to the OPC UA endpoint, converts the supplied value, and writes it to the target node.
|
||||
/// </summary>
|
||||
/// <param name="console">The console used to report the write result.</param>
|
||||
public async ValueTask ExecuteAsync(IConsole console)
|
||||
{
|
||||
using var session = await OpcUaHelper.ConnectAsync(Url);
|
||||
|
||||
Reference in New Issue
Block a user