Enum SampleMetadata
pub enum SampleMetadata {
UnknownAccuracy,
NoMeasurementError,
SymmetricalError {
deviation: u8,
bias: i8,
scaling: i8,
},
ChannelTemporarilyUnavailable,
ChannelDisabled,
}sensors only.Expand description
Metadata associated with a Sample.
Includes the measurement accuracy if available.
Variants§
UnknownAccuracy
Unknown accuracy.
NoMeasurementError
No observational/measurement error (e.g., boolean values from a push button).
SymmetricalError
Measurement error symmetrical around the bias.
The unit of measurement is provided by the ReadingChannel
associated with the Sample.
The scaling value is used for both deviation and bias.
The accuracy error is thus given by the following formulas:
§Examples
The DS18B20 temperature sensor accuracy error is SampleMetadata would thus be the following:
SampleMetadata::SymmetricalError {
deviation: 25,
bias: -20,
scaling: -2,
}Fields
Indicates that the channel is temporarily unavailable. This may happen when parts of a sensor are not ready yet, but data is already available for other channels.
ChannelDisabled
The channel is disabled by configuration.
Trait Implementations§
§impl Clone for SampleMetadata
impl Clone for SampleMetadata
§fn clone(&self) -> SampleMetadata
fn clone(&self) -> SampleMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more