namespace RobotNet10.Script.IO;
///
/// Interface for ProfiNet connection operations.
///
public interface IProfiNetConnection : IDisposable
{
///
/// Gets the IP address of the ProfiNet device.
///
string IpAddress { get; }
///
/// Gets the slot number.
///
int Slot { get; }
///
/// Gets the subslot number.
///
int Subslot { get; }
///
/// Gets whether the connection is currently connected.
///
bool IsConnected { get; }
///
/// Connects to the ProfiNet device.
///
Task ConnectAsync();
///
/// Disconnects from the ProfiNet device.
///
Task DisconnectAsync();
///
/// Reads data from the ProfiNet device.
///
/// The index to read from.
/// The number of bytes to read.
/// The read data as byte array.
Task ReadAsync(int index, int length);
///
/// Writes data to the ProfiNet device.
///
/// The index to write to.
/// The data to write.
Task WriteAsync(int index, byte[] data);
}