[−][src]Trait libmedium::sensors::PowerSensor
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,
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,
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,
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.