feat: 新增重置控制端的功能;前端可以显示提交记录 fix: 修复资源数据库sha256计算问题;修复资源数据库无法上传的问题

This commit is contained in:
2025-08-20 10:20:30 +08:00
parent c8444d1d4e
commit ec84eeeaa4
9 changed files with 4143 additions and 56 deletions

View File

@@ -183,6 +183,21 @@ public sealed class UDPClientPool
return await Task.Run(() => { return SendDataPack(endPoint, pkg); });
}
/// <summary>
/// 发送重置信号
/// </summary>
/// <param name="endPoint">IP端点IP地址与端口</param>
/// <returns>是否成功</returns>
public async static ValueTask<bool> SendResetSignal(IPEndPoint endPoint)
{
return await Task.Run(() =>
{
return SendAddrPack(
endPoint,
new WebProtocol.SendAddrPackage(BurstType.FixedBurst, 0, true, 0, 0xF0F0F0F0));
});
}
/// <summary>
/// 读取设备地址数据
/// </summary>
@@ -219,8 +234,7 @@ public sealed class UDPClientPool
if (!MsgBus.IsRunning)
return new(new Exception("Message Bus not Working!"));
var retPack = await MsgBus.UDPServer.WaitForDataAsync(
endPoint.Address.ToString(), taskID, endPoint.Port, timeout);
var retPack = await MsgBus.UDPServer.WaitForDataAsync(endPoint, taskID, timeout);
if (!retPack.IsSuccessful) return new(retPack.Error);
else if (!retPack.Value.IsSuccessful)
return new(new Exception("Send address package failed"));
@@ -389,8 +403,7 @@ public sealed class UDPClientPool
if (!ret) return new(new Exception($"Send address package failed at segment {i}!"));
// Wait for data response
var retPack = await MsgBus.UDPServer.WaitForDataAsync(
endPoint.Address.ToString(), taskID, endPoint.Port, timeout);
var retPack = await MsgBus.UDPServer.WaitForDataAsync(endPoint, taskID, timeout);
if (!retPack.IsSuccessful) return new(retPack.Error);
if (!retPack.Value.IsSuccessful)
@@ -606,8 +619,7 @@ public sealed class UDPClientPool
return new(new Exception("Message bus not working!"));
// Wait for Write Ack
var udpWriteAck = await MsgBus.UDPServer.WaitForAckAsync(
endPoint.Address.ToString(), taskID, endPoint.Port, timeout);
var udpWriteAck = await MsgBus.UDPServer.WaitForAckAsync(endPoint, taskID, timeout);
if (!udpWriteAck.IsSuccessful) return new(udpWriteAck.Error);
_progressTracker.AdvanceProgress(progressId, 10);
@@ -671,7 +683,7 @@ public sealed class UDPClientPool
if (!ret) return new(new Exception("Send data package failed!"));
// Wait for Write Ack
var udpWriteAck = await MsgBus.UDPServer.WaitForAckAsync(endPoint.Address.ToString(), taskID, endPoint.Port, timeout);
var udpWriteAck = await MsgBus.UDPServer.WaitForAckAsync(endPoint, taskID, timeout);
if (!udpWriteAck.IsSuccessful) return new(udpWriteAck.Error);
if (!udpWriteAck.Value.IsSuccessful)