namespace RobotNet10.Script.IO; /// /// Interface for OPC UA connection operations. /// public interface IOpcUaConnection : IDisposable { /// /// Gets the endpoint URL of the OPC UA server. /// string EndpointUrl { get; } /// /// Gets whether the connection is currently connected. /// bool IsConnected { get; } /// /// Connects to the OPC UA server. /// Task ConnectAsync(); /// /// Connects to the OPC UA server with username and password. /// /// The username. /// The password. Task ConnectAsync(string username, string password); /// /// Disconnects from the OPC UA server. /// Task DisconnectAsync(); /// /// Reads a node value by node ID. /// /// The node ID string (e.g., "ns=2;s=MyVariable"). /// The read value as object. Task ReadNodeAsync(string nodeId); /// /// Reads multiple node values by node IDs. /// /// Array of node ID strings. /// Dictionary of node ID to value. Task> ReadNodesAsync(string[] nodeIds); /// /// Writes a value to a node by node ID. /// /// The node ID string. /// The value to write. Task WriteNodeAsync(string nodeId, object value); /// /// Writes multiple values to nodes. /// /// Dictionary of node ID to value. Task WriteNodesAsync(Dictionary values); /// /// Browses the node tree starting from the specified node. /// /// The starting node ID (null for root). /// Array of child node IDs. Task BrowseNodesAsync(string? nodeId = null); }