Initial commit

This commit is contained in:
2026-07-13 09:25:40 +07:00
parent c08ff54676
commit bccfb156d7
1938 changed files with 641646 additions and 0 deletions

View File

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