namespace OrpaonVision.SiteApp.Runtime.Contracts; /// /// 海康相机配置选项。 /// public sealed class HikCameraOptions { /// /// 运行模式(Real=真实海康SDK,Mock=模拟模式)。 /// public string RunMode { get; set; } = "Mock"; // Real | Mock /// /// 设备序列号(用于指定特定相机)。 /// public string? SerialNumber { get; set; } /// /// IP地址(用于网络相机)。 /// public string? IpAddress { get; set; } /// /// 用户名。 /// public string? UserName { get; set; } /// /// 密码。 /// public string? Password { get; set; } /// /// 连接超时时间(毫秒)。 /// public int ConnectTimeoutMs { get; set; } = 5000; /// /// 采集超时时间(毫秒)。 /// public int GrabTimeoutMs { get; set; } = 3000; /// /// 图像宽度。 /// public int ImageWidth { get; set; } = 1920; /// /// 图像高度。 /// public int ImageHeight { get; set; } = 1080; /// /// 像素格式。 /// public string PixelFormat { get; set; } = "BGR8Packed"; /// /// 触发模式(0=连续,1=软触发)。 /// public int TriggerMode { get; set; } = 0; /// /// 自动重连次数。 /// public int AutoReconnectCount { get; set; } = 3; /// /// 自动重连间隔(毫秒)。 /// public int AutoReconnectIntervalMs { get; set; } = 1000; /// /// 海康SDK库文件路径(仅在Real模式下使用)。 /// public string? SdkLibraryPath { get; set; } = "C:\\Program Files (x86)\\MVS\\Development\\Libraries\\win64"; /// /// 海康SDK驱动路径(仅在Real模式下使用)。 /// public string? SdkDriverPath { get; set; } = "C:\\Program Files (x86)\\MVS\\Development\\Drivers\\win64"; }