移除DeviceManager中导致编译错误的只读字段,保留_lockObject和deviceInstances的readonly关键字
This commit is contained in:
@@ -169,9 +169,9 @@ namespace JoyD.Windows.CS.Toprie
|
||||
// 当前设备ID
|
||||
private int _currentDeviceId = -1;
|
||||
// 默认设备IP
|
||||
private readonly string _deviceIp = "192.168.100.2";
|
||||
private string _deviceIp = "192.168.100.2";
|
||||
// 设备端口
|
||||
private readonly int _devicePort = 8080;
|
||||
private int _devicePort = 8080;
|
||||
// 设备连接状态
|
||||
private ConnectionStatus _connectionStatus = ConnectionStatus.Disconnected;
|
||||
// 是否已初始化
|
||||
@@ -179,7 +179,7 @@ namespace JoyD.Windows.CS.Toprie
|
||||
// 是否已释放
|
||||
private bool _isDisposed = false;
|
||||
// 图像模式
|
||||
private readonly ImageMode _currentImageMode = ImageMode.Infrared;
|
||||
private ImageMode _currentImageMode = ImageMode.Infrared;
|
||||
// 当前色彩模式
|
||||
private PaletteType _currentPaletteType = PaletteType.WhiteHot;
|
||||
// 当前视频模式
|
||||
@@ -195,15 +195,15 @@ namespace JoyD.Windows.CS.Toprie
|
||||
// 最大重连尝试次数
|
||||
public static int MaxReconnectAttempts = 5;
|
||||
// 连接检查定时器
|
||||
private readonly System.Threading.Timer _connectionCheckTimer;
|
||||
private System.Threading.Timer _connectionCheckTimer;
|
||||
// 心跳定时器
|
||||
private readonly System.Threading.Timer _heartbeatTimer;
|
||||
private System.Threading.Timer _heartbeatTimer;
|
||||
// 连接超时时间(毫秒)
|
||||
private const int ConnectionTimeout = 5000;
|
||||
// 连接检查间隔(毫秒)
|
||||
private const int ConnectionCheckInterval = 5000;
|
||||
// 心跳间隔(毫秒)
|
||||
private readonly int _heartbeatInterval = 5000;
|
||||
private int _heartbeatInterval = 5000;
|
||||
// 最后接收数据时间戳
|
||||
private DateTime _lastDataReceivedTime = DateTime.MinValue;
|
||||
// 数据接收超时时间(毫秒)
|
||||
@@ -212,7 +212,7 @@ namespace JoyD.Windows.CS.Toprie
|
||||
// 该变量已在文件上方定义,删除重复实现
|
||||
|
||||
// 停止请求事件
|
||||
private readonly ManualResetEvent _stopRequested = new ManualResetEvent(false);
|
||||
private ManualResetEvent _stopRequested = new ManualResetEvent(false);
|
||||
// 缓冲区
|
||||
private byte[] _imageBuffer = new byte[4096];
|
||||
// 图像数据累积缓冲区
|
||||
|
||||
Reference in New Issue
Block a user