Files
CSI-Z420-Tablet-Multi-Funct…/Services/IPlcService.cs
2026-05-14 18:15:50 +08:00

15 lines
543 B
C#

using System.Threading.Tasks;
namespace TabletTester2025.Services
{
public interface IPlcService
{
Task ConnectAsync();
Task<float> ReadFloatAsync(ushort startAddress);
Task WriteCoilAsync(ushort coilAddress, bool value);// true false
Task<bool> ReadCoilAsync(ushort coilAddress);
Task WriteRegisterAsync(ushort registerAddress, ushort value);//写寄存器地址
Task<ushort[]> ReadHoldingRegistersAsync(ushort startAddress, ushort count);
bool IsConnected { get; }
}
}