周立功换同星

This commit is contained in:
“hsc”
2026-07-29 14:20:32 +08:00
parent d8a22a15b1
commit 3bf33bb561
29 changed files with 1913 additions and 3255 deletions

View File

@@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZLGUSBCANFD;
using TSMasterCAN;
namespace UIShare.GlobalVariable
{
@@ -21,7 +21,7 @@ namespace UIShare.GlobalVariable
public ConcurrentDictionary<string, Lazy<IBaseInterface>> HardwarePool { get; set; }
/// <summary>CAN 硬件指纹 → ZLGCANFD 实例的并发池,确保同一 CAN 卡全局只创建一个驱动实例。</summary>
public ConcurrentDictionary<string, Lazy<ZLGCANFD>> CanPool { get; set; }
public ConcurrentDictionary<string, Lazy<CAN>> CanPool { get; set; }
/// <summary>硬件指纹 → 正在使用该设备的作用域名称列表,用于引用计数与安全销毁。</summary>
public ConcurrentDictionary<string, Lazy<List<string>>> DeviceAndScopeDic { get; set; }
@@ -49,7 +49,7 @@ namespace UIShare.GlobalVariable
ConfigDic = new();
ScopeDic = new();
HardwarePool = new ConcurrentDictionary<string, Lazy<IBaseInterface>>(StringComparer.OrdinalIgnoreCase);
CanPool = new ConcurrentDictionary<string, Lazy<ZLGCANFD>>(StringComparer.OrdinalIgnoreCase);
CanPool = new ConcurrentDictionary<string, Lazy<CAN>>(StringComparer.OrdinalIgnoreCase);
DeviceAndScopeDic = new ConcurrentDictionary<string, Lazy<List<string>>>(StringComparer.OrdinalIgnoreCase);
CurrentScope = "default";
}