23 lines
985 B
C#
23 lines
985 B
C#
|
|
using System.Threading.Tasks;
|
|||
|
|
|
|||
|
|
namespace HME_MoistureLossMeter.Services
|
|||
|
|
{
|
|||
|
|
public interface IPlcService
|
|||
|
|
{
|
|||
|
|
Task EnsureConnectedAsync(int retryCount = 3);
|
|||
|
|
Task<float> ReadFloatAsync(ushort startAddress);
|
|||
|
|
Task<float> ReadPressureAsync();
|
|||
|
|
Task<float> ReadWetFlowAsync(int stationId);
|
|||
|
|
Task<float> ReadPressureAsync(int stationId);
|
|||
|
|
Task<bool> ReadCoilAsync(ushort coilAddress);
|
|||
|
|
Task<ushort[]> ReadHoldingRegistersAsync(ushort startAddress, ushort count);
|
|||
|
|
Task WriteCoilAsync(ushort coilAddress, bool value);
|
|||
|
|
Task WriteRegisterAsync(ushort registerAddress, ushort value);
|
|||
|
|
Task WriteSingleRegisterAsync(ushort registerAddress, ushort value);
|
|||
|
|
Task WriteMultipleRegistersAsync(ushort registerAddress, float value);
|
|||
|
|
Task<int> ReadInt32Async(ushort startAddress);
|
|||
|
|
Task WriteInt32Async(ushort startAddress, int value);
|
|||
|
|
bool IsConnected { get; }
|
|||
|
|
void Dispose();
|
|||
|
|
}
|
|||
|
|
}
|