项目逻辑添加
This commit is contained in:
@@ -27,6 +27,13 @@ namespace TabletTester2025.Services
|
||||
return Task.FromResult(value);
|
||||
}
|
||||
|
||||
// 👇 新增 ReadIntAsync 的模拟实现
|
||||
public Task<int> ReadIntAsync(ushort startAddress)
|
||||
{
|
||||
// 模拟整数返回,比如返回0-1000之间的随机数
|
||||
return Task.FromResult(_rand.Next(0, 1000));
|
||||
}
|
||||
|
||||
public Task WriteCoilAsync(ushort coilAddress, bool value) => Task.CompletedTask;
|
||||
|
||||
public Task<bool> ReadCoilAsync(ushort coilAddress)
|
||||
|
||||
Reference in New Issue
Block a user