[−][src]Trait libmedium::sensors::Sensor
Trait implemented by all sensors except for pwm. It contains the functionality to use the input and enable subfunctions.
Provided methods
fn read_input(&self) -> Result<P, SensorError>
Reads the input subfunction of this sensor. Returns an error, if this sensor doesn't support the subtype.
fn read_enable(&self) -> Result<bool, SensorError>
Reads whether or not this sensor is enabled. Returns an error, if this sensor doesn't support the feature.
fn write_enable(&self, enable: bool) -> Result<(), SensorError> where
Self: WritableSensorBase,
Self: WritableSensorBase,
Enables or disables this sensor. Returns an error if this functionality is not supported by the sensor.
Implementors
impl<S: CurrSensor> Sensor<Current> for S
[src]
impl<S: EnergySensor> Sensor<Energy> for S
[src]
impl<S: FanSensor + Faulty> Sensor<Revs> for S
[src]
fn read_input(&self) -> Result<Revs, SensorError>
[src]
Reads the input subfunction of this fan sensor. Returns an error, if this sensor doesn't support the subfunction.
impl<S: HumiditySensor> Sensor<Humidity> for S
[src]
impl<S: PowerSensor> Sensor<Power> for S
[src]
impl<S: TempSensor + Faulty> Sensor<Temperature> for S
[src]
fn read_input(&self) -> Result<Temperature, SensorError>
[src]
Reads the input subfunction of this temp sensor. Returns an error, if this sensor doesn't support the subtype.