Trait libmedium::sensors::PowerSensor
source · [−]pub trait PowerSensor: Sensor<Value = Power> + Enable + Input + Max + Crit + Average + Highest + Lowest + Debug {
fn read_accuracy(&self) -> Result<Ratio, Error> { ... }
fn read_cap(&self) -> Result<Power, Error> { ... }
fn read_cap_max(&self) -> Result<Power, Error> { ... }
fn read_cap_min(&self) -> Result<Power, Error> { ... }
fn read_cap_hyst(&self) -> Result<Power, Error> { ... }
fn read_average_interval(&self) -> Result<Duration, Error> { ... }
fn read_average_interval_max(&self) -> Result<Duration, Error> { ... }
fn read_average_interval_min(&self) -> Result<Duration, Error> { ... }
fn read_average_highest(&self) -> Result<Power, Error> { ... }
fn read_average_lowest(&self) -> Result<Power, Error> { ... }
fn read_average_max(&self) -> Result<Power, Error> { ... }
fn read_average_min(&self) -> Result<Power, Error> { ... }
}
Expand description
Helper trait that sums up all functionality of a read-only power sensor.
Provided Methods
fn read_accuracy(&self) -> Result<Ratio, Error>
fn read_accuracy(&self) -> Result<Ratio, Error>
Reads the accuracy subfunction of this power sensor. Returns an error, if this sensor doesn’t support the subfunction.
Reads the cap subfunction of this power sensor. Returns an error, if this sensor doesn’t support the subfunction.
fn read_cap_max(&self) -> Result<Power, Error>
fn read_cap_max(&self) -> Result<Power, Error>
Reads the cap_max subfunction of this power sensor. Returns an error, if this sensor doesn’t support the subfunction.
fn read_cap_min(&self) -> Result<Power, Error>
fn read_cap_min(&self) -> Result<Power, Error>
Reads the cap_min subfunction of this power sensor. Returns an error, if this sensor doesn’t support the subfunction.
fn read_cap_hyst(&self) -> Result<Power, Error>
fn read_cap_hyst(&self) -> Result<Power, Error>
Reads the cap_hyst subfunction of this power sensor. Returns an error, if this sensor doesn’t support the subfunction.
fn read_average_interval(&self) -> Result<Duration, Error>
fn read_average_interval(&self) -> Result<Duration, Error>
Reads the average_interval subfunction of this power sensor. Returns an error, if this sensor doesn’t support the subfunction.
fn read_average_interval_max(&self) -> Result<Duration, Error>
fn read_average_interval_max(&self) -> Result<Duration, Error>
Reads the average_interval_max subfunction of this power sensor. Returns an error, if this sensor doesn’t support the subfunction.
fn read_average_interval_min(&self) -> Result<Duration, Error>
fn read_average_interval_min(&self) -> Result<Duration, Error>
Reads the average_interval_min subfunction of this power sensor. Returns an error, if this sensor doesn’t support the subfunction.
fn read_average_highest(&self) -> Result<Power, Error>
fn read_average_highest(&self) -> Result<Power, Error>
Reads the average_highest subfunction of this power sensor. Returns an error, if this sensor doesn’t support the subfunction.
fn read_average_lowest(&self) -> Result<Power, Error>
fn read_average_lowest(&self) -> Result<Power, Error>
Reads the average_lowest subfunction of this power sensor. Returns an error, if this sensor doesn’t support the subfunction.
fn read_average_max(&self) -> Result<Power, Error>
fn read_average_max(&self) -> Result<Power, Error>
Reads the average_max subfunction of this power sensor. Returns an error, if this sensor doesn’t support the subfunction.
fn read_average_min(&self) -> Result<Power, Error>
fn read_average_min(&self) -> Result<Power, Error>
Reads the average_min subfunction of this power sensor. Returns an error, if this sensor doesn’t support the subfunction.