添加项目文件。
This commit is contained in:
23
Services/IPlcService.cs
Normal file
23
Services/IPlcService.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user