pub struct Status {
pub present: Option<bool>,
pub voltage_uv: Option<u32>,
pub current_ua: Option<i32>,
pub level_percent: Option<f32>,
pub temp_celsius: Option<f32>,
pub charge_status: Option<ChargeStatus>,
pub remaining_capacity_uah: Option<u32>,
pub full_charge_capacity_uah: Option<u32>,
pub health: Option<HealthStatus>,
pub cycle_count: Option<u32>,
pub time_remaining: Option<i64>,
/* private fields */
}Expand description
Primary telemetry snapshot from the battery fuel gauge.
All fields are optional. Each returned Status represents a complete snapshot, not a sparse
delta; fields omitted by the driver indicate that the metric is unsupported by the hardware fuel
gauge or currently unavailable/indeterminate.
NOTE: Some fields (e.g. instantaneous voltage_uv and current_ua) may be passive measurements
that do not generate hardware interrupts on change. Refer to [Spec.supported_options] for the
options that can actively trigger change notifications.
Fields§
§present: Option<bool>Whether the battery pack is physically present and connected. If false, the battery is detached/missing. Omitted if presence is indeterminate.
voltage_uv: Option<u32>Present terminal voltage in microvolts. Omitted if unsupported by hardware or unavailable.
current_ua: Option<i32>Present current in microamps: positive (+) for charging, negative (-) for discharging. Omitted if unsupported by hardware or unavailable.
level_percent: Option<f32>State of charge percentage in the range [0.0, 100.0]. Omitted if indeterminate or unsupported by hardware.
temp_celsius: Option<f32>Internal battery temperature in Celsius. Omitted if temperature sensing is unsupported or unavailable.
charge_status: Option<ChargeStatus>High-level charging status. Omitted if indeterminate or unsupported by hardware.
remaining_capacity_uah: Option<u32>Estimated remaining usable capacity in microamp-hours. Omitted if indeterminate or unsupported by hardware.
full_charge_capacity_uah: Option<u32>Estimated full charge capacity in microamp-hours, reflecting pack aging. Omitted if indeterminate or unsupported by hardware.
health: Option<HealthStatus>Health condition or safety trip status. Omitted if health diagnostics are unsupported by hardware.
cycle_count: Option<u32>Total charge-discharge cycle count. Omitted if cycle tracking is unsupported by hardware.
time_remaining: Option<i64>Estimated duration remaining until fully empty (discharging) or fully charged (charging). Omitted if indeterminate, unsupported, or if the battery is idle.
Trait Implementations§
Source§impl<D: ResourceDialect> Decode<Status, D> for Status
impl<D: ResourceDialect> Decode<Status, D> for Status
impl Persistable for Status
impl StructuralPartialEq for Status
Source§impl TypeMarker for Status
impl TypeMarker for Status
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned to a single memcpy.