MCPcopy Create free account
hub / github.com/RustCV/RustCV / assess_health

Method assess_health

rustcv-core/src/telemetry.rs:59–73  ·  view source on GitHub ↗

基于遥测数据简单的健康评估

(&self)

Source from the content-addressed store, hash-verified

57impl DeviceTelemetry {
58 /// 基于遥测数据简单的健康评估
59 pub fn assess_health(&self) -> DeviceHealthStatus {
60 if let Some(t) = self.temperature_c {
61 if t > 85.0 {
62 return DeviceHealthStatus::Critical(HealthIssue::Overheating);
63 } else if t > 75.0 {
64 return DeviceHealthStatus::Warning(HealthIssue::Overheating);
65 }
66 }
67
68 if self.transmission_errors > 100 {
69 return DeviceHealthStatus::Warning(HealthIssue::HighPacketLoss);
70 }
71
72 DeviceHealthStatus::Healthy
73 }
74}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected