Struct sep2_common::packages::power_status::PowerStatus
source · pub struct PowerStatus {
pub battery_status: BatteryStatus,
pub changed_time: TimeType,
pub current_power_source: PowerSourceType,
pub estimated_charge_remaining: Option<Percent>,
pub estimated_time_remaining: Option<Uint32>,
pub pev_info: Option<Pevinfo>,
pub session_time_on_battery: Option<Uint32>,
pub total_time_on_battery: Option<Uint32>,
pub poll_rate: Option<Uint32>,
pub href: Option<String>,
}
power_status
only.Fields§
§battery_status: BatteryStatus
Battery system status 0 = unknown 1 = normal (more than LowChargeThreshold remaining) 2 = low (less than LowChargeThreshold remaining) 3 = depleted (0% charge remaining) 4 = not applicable (mains powered only)
changed_time: TimeType
The time at which the reported values were recorded.
current_power_source: PowerSourceType
This value will be fixed for devices powered by a single source. This value may change for devices able to transition between multiple power sources (mains to battery backup, etc.).
estimated_charge_remaining: Option<Percent>
Estimate of remaining battery charge as a percent of full charge.
estimated_time_remaining: Option<Uint32>
Estimated time (in seconds) to total battery charge depletion (under current load)
pev_info: Option<Pevinfo>
§session_time_on_battery: Option<Uint32>
If the device has a battery, this is the time since the device last switched to battery power, or the time since the device was restarted, whichever is less, in seconds.
total_time_on_battery: Option<Uint32>
If the device has a battery, this is the total time the device has been on battery power, in seconds. It may be reset when the battery is replaced.
poll_rate: Option<Uint32>
The default polling rate for this function set (this resource and all resources below), in seconds. If not specified, a default of 900 seconds (15 minutes) is used. It is RECOMMENDED a client poll the resources of this function set every pollRate seconds.
href: Option<String>
A reference to the resource address (URI). Required in a response to a GET, ignored otherwise.
Trait Implementations§
source§impl Clone for PowerStatus
impl Clone for PowerStatus
source§fn clone(&self) -> PowerStatus
fn clone(&self) -> PowerStatus
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PowerStatus
impl Debug for PowerStatus
source§impl Default for PowerStatus
impl Default for PowerStatus
source§fn default() -> PowerStatus
fn default() -> PowerStatus
source§impl PartialEq<PowerStatus> for PowerStatus
impl PartialEq<PowerStatus> for PowerStatus
source§fn eq(&self, other: &PowerStatus) -> bool
fn eq(&self, other: &PowerStatus) -> bool
self
and other
values to be equal, and is used
by ==
.