pub struct SysfsSensorIO {
    fd: File,
    scale: f64,
}
Expand description

Information for reading sensor data from sysfs.

Fields

fd: File

A file descriptor to (asynchronously) read from.

scale: f64

A multiplicative scale factor to convert raw sysfs file data to the desired units.

For example, the hwmon subsystem provides temperature readings in millidegrees C, so 0.001 here would convert that to degrees C as desired elsewhere.

Implementations

Construct a SysfsSensorIO for a provided hwmon file.

For use with SensorIO::Sysfs.

Read a sensor sample (in natural units, e.g. degrees C instead of hwmon’s millidegrees C).

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.