feat: 完善部分jtag边界扫描websocket代码
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Cors;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Security.Claims;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using DotNext;
|
||||
@@ -23,6 +25,7 @@ public interface IJtagReceiver
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
[EnableCors("Users")]
|
||||
public class JtagHub : Hub<IJtagReceiver>, IJtagHub
|
||||
{
|
||||
private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
|
||||
|
@@ -439,7 +439,7 @@ public class Jtag
|
||||
if (retPackLen != 4)
|
||||
return new(new Exception($"RecvDataPackage BodyData Length not Equal to 4: Total {retPackLen} bytes"));
|
||||
|
||||
return Convert.ToUInt32(Common.Number.BytesToUInt64(retPackOpts.Data).Value);
|
||||
return Convert.ToUInt32(Common.Number.BytesToUInt32(retPackOpts.Data).Value);
|
||||
}
|
||||
|
||||
async ValueTask<Result<bool>> WriteFIFO
|
||||
|
@@ -336,7 +336,7 @@ public class UDPClientPool
|
||||
$"Device {address} receive data is {retData.Length} bytes instead of 4 bytes"));
|
||||
|
||||
// Check result
|
||||
var retCode = Convert.ToUInt32(Common.Number.BytesToUInt64(retData).Value);
|
||||
var retCode = Convert.ToUInt32(Common.Number.BytesToUInt32(retData).Value);
|
||||
if (Common.Number.BitsCheck(retCode, result, resultMask)) return true;
|
||||
}
|
||||
catch (Exception error)
|
||||
|
Reference in New Issue
Block a user