16 lines
562 B
C#
16 lines
562 B
C#
using System.Threading.Tasks;
|
|
|
|
namespace TabletTester2025.Services
|
|
{
|
|
public interface IPlcService
|
|
{
|
|
Task ConnectAsync();
|
|
Task<float> ReadFloatAsync(ushort startAddress);
|
|
Task<int> ReadIntAsync(ushort startAddress);
|
|
Task WriteCoilAsync(ushort coilAddress, bool value);
|
|
Task<bool> ReadCoilAsync(ushort coilAddress);
|
|
Task WriteRegisterAsync(ushort registerAddress, ushort value);
|
|
Task<ushort[]> ReadHoldingRegistersAsync(ushort startAddress, ushort count);
|
|
bool IsConnected { get; }
|
|
}
|
|
} |