pub struct DeviceTelemetry {
pub temperature_c: Option<f32>,
pub link_throughput_mbps: Option<u32>,
pub transmission_errors: u64,
pub dropped_frames: u64,
pub corrupted_frames: u64,
pub power_consumption_mw: Option<u32>,
}Expand description
设备健康状况与遥测数据
这些数据通常不随每一帧变化,而是作为 DeviceControls 的一部分定期查询, 或者作为 FrameMetadata 的扩展。
Fields§
§temperature_c: Option<f32>芯片核心温度 (摄氏度) 如果过高,意味着可能发生了热节流 (Thermal Throttling)
link_throughput_mbps: Option<u32>当前 USB/网络链路的实际吞吐量 (Mbps)
transmission_errors: u64传输层丢包/误码计数 比如 USB 的 Isochronous Packet Errors 或 GigE 的 Packet Resend
dropped_frames: u64丢帧计数器 (因缓冲区溢出或 CPU 处理慢)
corrupted_frames: u64损坏帧计数器 (因 Payload 校验失败)
power_consumption_mw: Option<u32>当前功耗估算 (毫瓦/mW)
Implementations§
Source§impl DeviceTelemetry
impl DeviceTelemetry
Sourcepub fn assess_health(&self) -> DeviceHealthStatus
pub fn assess_health(&self) -> DeviceHealthStatus
基于遥测数据简单的健康评估
Trait Implementations§
Source§impl Clone for DeviceTelemetry
impl Clone for DeviceTelemetry
Source§fn clone(&self) -> DeviceTelemetry
fn clone(&self) -> DeviceTelemetry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceTelemetry
impl Debug for DeviceTelemetry
Source§impl Default for DeviceTelemetry
impl Default for DeviceTelemetry
Source§fn default() -> DeviceTelemetry
fn default() -> DeviceTelemetry
Returns the “default value” for a type. Read more
Source§impl PartialEq for DeviceTelemetry
impl PartialEq for DeviceTelemetry
impl StructuralPartialEq for DeviceTelemetry
Auto Trait Implementations§
impl Freeze for DeviceTelemetry
impl RefUnwindSafe for DeviceTelemetry
impl Send for DeviceTelemetry
impl Sync for DeviceTelemetry
impl Unpin for DeviceTelemetry
impl UnsafeUnpin for DeviceTelemetry
impl UnwindSafe for DeviceTelemetry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more