Files
BQP/srcs/RobotNet10/Commons/RobotNet10.Script/IO/ICcLinkIeConnection.cs
2026-07-13 09:25:40 +07:00

49 lines
1.3 KiB
C#

namespace RobotNet10.Script.IO;
/// <summary>
/// Interface for CC-Link IE connection operations.
/// </summary>
public interface ICcLinkIeConnection : IDisposable
{
/// <summary>
/// Gets the IP address of the CC-Link IE device.
/// </summary>
string IpAddress { get; }
/// <summary>
/// Gets the station number.
/// </summary>
int StationNumber { get; }
/// <summary>
/// Gets whether the connection is currently connected.
/// </summary>
bool IsConnected { get; }
/// <summary>
/// Connects to the CC-Link IE device.
/// </summary>
Task ConnectAsync();
/// <summary>
/// Disconnects from the CC-Link IE device.
/// </summary>
Task DisconnectAsync();
/// <summary>
/// Reads data from the CC-Link IE device.
/// </summary>
/// <param name="address">The memory address.</param>
/// <param name="length">The number of words to read.</param>
/// <returns>The read data as ushort array.</returns>
Task<ushort[]> ReadAsync(int address, int length);
/// <summary>
/// Writes data to the CC-Link IE device.
/// </summary>
/// <param name="address">The memory address.</param>
/// <param name="data">The data to write.</param>
Task WriteAsync(int address, ushort[] data);
}