更新2026
This commit is contained in:
@@ -45,16 +45,6 @@ namespace TabletTester2025.Services
|
||||
return Task.FromResult(value);
|
||||
}
|
||||
|
||||
public Task<int> ReadInt32Async(ushort startAddress)
|
||||
{
|
||||
int value = startAddress switch
|
||||
{
|
||||
400 => 50, // 硬度破损判定
|
||||
_ => _rand.Next(0, 1000)
|
||||
};
|
||||
return Task.FromResult(value);
|
||||
}
|
||||
|
||||
public Task WriteCoilAsync(ushort coilAddress, bool value) => Task.CompletedTask;
|
||||
|
||||
public Task<bool> ReadCoilAsync(ushort coilAddress)
|
||||
@@ -65,8 +55,6 @@ namespace TabletTester2025.Services
|
||||
|
||||
public Task WriteRegisterAsync(ushort registerAddress, ushort value) => Task.CompletedTask;
|
||||
|
||||
public Task WriteInt32Async(ushort startAddress, int value) => Task.CompletedTask;
|
||||
|
||||
public Task WriteFloatAsync(ushort startAddress, float value) => Task.CompletedTask;
|
||||
|
||||
public Task<ushort[]> ReadHoldingRegistersAsync(ushort startAddress, ushort count)
|
||||
|
||||
Reference in New Issue
Block a user