namespace OrpaonVision.SiteApp.Runtime.Contracts; /// /// 一致性状态枚举。 /// public enum ConsistencyStatus { /// /// 正常。 /// Ok, /// /// 警告。 /// Warning, /// /// 错误。 /// Error } /// /// 健康状态枚举。 /// public enum HealthStatus { /// /// 健康。 /// Healthy, /// /// 降级。 /// Degraded, /// /// 不健康。 /// Unhealthy } /// /// 一致性检查结果。 /// public sealed class ConsistencyCheckResult { /// /// 检查时间戳。 /// public DateTime CheckTimestamp { get; set; } /// /// 检查状态。 /// public ConsistencyStatus Status { get; set; } /// /// 检查消息。 /// public string Message { get; set; } = string.Empty; /// /// 相机是否连接。 /// public bool CameraConnected { get; set; } /// /// YOLO是否初始化。 /// public bool YoloInitialized { get; set; } /// /// 像素格式是否一致。 /// public bool PixelFormatConsistent { get; set; } /// /// 像素格式检查详情。 /// public List PixelFormatDetails { get; set; } = new(); /// /// 图像尺寸是否一致。 /// public bool ImageSizeConsistent { get; set; } /// /// 图像尺寸检查详情。 /// public List ImageSizeDetails { get; set; } = new(); /// /// 数据流完整性。 /// public bool DataFlowIntegrity { get; set; } /// /// 数据流检查详情。 /// public List DataFlowDetails { get; set; } = new(); /// /// 建议列表。 /// public List Recommendations { get; set; } = new(); } /// /// 健康检查结果。 /// public sealed class HealthCheckResult { /// /// 检查时间戳。 /// public DateTime Timestamp { get; set; } /// /// 整体状态。 /// public HealthStatus OverallStatus { get; set; } /// /// 相机健康状态。 /// public ComponentHealth CameraHealth { get; set; } = new(); /// /// YOLO健康状态。 /// public ComponentHealth YoloHealth { get; set; } = new(); /// /// 系统健康状态。 /// public ComponentHealth SystemHealth { get; set; } = new(); /// /// 健康检查摘要。 /// public string Summary { get; set; } = string.Empty; } /// /// 组件健康状态。 /// public sealed class ComponentHealth { /// /// 组件名称。 /// public string ComponentName { get; set; } = string.Empty; /// /// 健康状态。 /// public HealthStatus Status { get; set; } /// /// 详细信息。 /// public List Details { get; set; } = new(); /// /// 指标数据。 /// public Dictionary Metrics { get; set; } = new(); } /// /// 像素格式检查结果。 /// internal sealed class PixelFormatCheckResult { /// /// 是否一致。 /// public bool IsConsistent { get; set; } /// /// 检查详情。 /// public List Details { get; set; } = new(); /// /// 建议列表。 /// public List Recommendations { get; set; } = new(); } /// /// 图像尺寸检查结果。 /// internal sealed class ImageSizeCheckResult { /// /// 是否一致。 /// public bool IsConsistent { get; set; } /// /// 检查详情。 /// public List Details { get; set; } = new(); /// /// 建议列表。 /// public List Recommendations { get; set; } = new(); } /// /// 数据流检查结果。 /// internal sealed class DataFlowCheckResult { /// /// 是否完整。 /// public bool IsIntegrity { get; set; } /// /// 检查详情。 /// public List Details { get; set; } = new(); /// /// 建议列表。 /// public List Recommendations { get; set; } = new(); }