[][src]Trait libmedium::sensors::PowerSensor

pub trait PowerSensor: SensorBase {
    fn read_accuracy(&self) -> Result<Accuracy, 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> { ... }
fn write_cap(&self, cap: Power) -> Result<(), Error>
    where
        Self: WritableSensorBase
, { ... }
fn write_cap_hyst(&self, cap_hyst: Power) -> Result<(), Error>
    where
        Self: WritableSensorBase
, { ... }
fn write_average_interval(&self, interval: Duration) -> Result<(), Error>
    where
        Self: WritableSensorBase
, { ... } }

Trait implemented by all power sensors.

Provided methods

fn read_accuracy(&self) -> Result<Accuracy, Error>

Reads the accuracy subfunction of this power sensor. Returns an error, if this sensor doesn't support the subfunction.

fn read_cap(&self) -> Result<Power, Error>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

Reads the average_min subfunction of this power sensor. Returns an error, if this sensor doesn't support the subfunction.

fn write_cap(&self, cap: Power) -> Result<(), Error> where
    Self: WritableSensorBase

Converts cap and writes it to the cap subfunction of this power sensor. Returns an error, if this sensor doesn't support the subfunction.

fn write_cap_hyst(&self, cap_hyst: Power) -> Result<(), Error> where
    Self: WritableSensorBase

Converts cap_hyst and writes it to the cap_hyst subfunction of this power sensor. Returns an error, if this sensor doesn't support the subfunction.

fn write_average_interval(&self, interval: Duration) -> Result<(), Error> where
    Self: WritableSensorBase

Converts interval and writes it to the average_interval subfunction of this power sensor. Returns an error, if this sensor doesn't support the subfunction.

Loading content...

Implementors

impl PowerSensor for ReadOnlyPower[src]

impl PowerSensor for ReadWritePower[src]

Loading content...