Struct omnisensor::adc::ADCSensorConfig
source · [−]pub struct ADCSensorConfig {
name: String,
index: u64,
poll_interval: Duration,
scale: f64,
power_state: PowerState,
thresholds: Vec<ThresholdConfig>,
bridge_gpio: Option<Arc<BridgeGPIOConfig>>,
}
Expand description
Internal representation of the dbus config data for an ADC sensor (one channel).
Fields
name: String
Sensor name.
index: u64
Index of this sensor (channel) within the ADC hardware device.
poll_interval: Duration
Polling interval for the sensor.
scale: f64
Scaling multiplier for the sensor.
We store this as the reciprocal of what was provided via the dbus config so that we can multiply instead of dividing
power_state: PowerState
Host power state in which this sensor is active.
thresholds: Vec<ThresholdConfig>
Threshold settings for the sensor.
bridge_gpio: Option<Arc<BridgeGPIOConfig>>
An optional GPIO that must be asserted before reading the sensor.
Common for battery voltage sensors to reduce parasitic battery drain.
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ADCSensorConfig
impl Send for ADCSensorConfig
impl Sync for ADCSensorConfig
impl Unpin for ADCSensorConfig
impl UnwindSafe for ADCSensorConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more