15 lines
543 B
C#
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; }
|
|
}
|
|
} |