pub struct UnitStatus {Show 13 fields
pub flags: UnitFlag,
pub uptime: u32,
pub boot_count: u32,
pub reboot_count: u32,
pub encoder_health: u32,
pub decoder_health: u32,
pub network: UnitNetConfig,
pub fan_rpm: u16,
pub fan_duty: u8,
pub status: u8,
pub net_revert_s: u8,
pub temperatures: Vec<i8>,
pub status_message: String,
}Expand description
A unit’s health and IP configuration, as it last reported them.
A unit reports this about itself with its periodic broadcast, and within a few seconds of a change to its flags, its status or its addresses.
Fields§
§flags: UnitFlagThe report’s flags.
uptime: u32Seconds since the unit booted.
boot_count: u32How often the unit has booted, when flags has
BOOT_COUNT.
reboot_count: u32How often the unit has rebooted.
encoder_health: u32The encoder’s health, a mask of the unit’s encoder status bits.
decoder_health: u32The decoder’s health, a mask of the unit’s decoder status and state bits.
network: UnitNetConfigThe IP configuration in use.
fan_rpm: u16The fan speed in RPM, when flags has
FAN_SPEED.
fan_duty: u8The fan duty cycle, in percent.
status: u8The unit’s system status.
net_revert_s: u8Seconds before a pending IP configuration is reverted.
temperatures: Vec<i8>Temperatures, in degrees Celsius, at most
UNIT_MAX_TEMPERATURES of them.
status_message: StringThe message of the current system status.
Implementations§
Source§impl UnitStatus
impl UnitStatus
Sourcepub const fn boot_count(&self) -> Option<u32>
pub const fn boot_count(&self) -> Option<u32>
How often the unit has booted, None while it does not report it.
Sourcepub const fn fan_rpm(&self) -> Option<u16>
pub const fn fan_rpm(&self) -> Option<u16>
The fan speed in RPM, None while the unit does not report it.
Sourcepub const fn network_pending(&self) -> bool
pub const fn network_pending(&self) -> bool
Whether an IP configuration changed through the mesh waits for the mesh controller to confirm it.