Enum sdf::file::CalibrationTableKind
[−]
[src]
pub enum CalibrationTableKind { Amplitude(Channel), Range(Channel), }
A type of calibration table.
Really a pair between type and channel number.
Variants
Amplitude | An amplitude calibration table. |
Range | A range calibration table. |
Methods
impl CalibrationTableKind
fn as_u16(&self) -> Result<u16>
Returns this calibration table kind as a u16
.
Returns an error if the combination is not valid.
Examples
use sdf::file::{CalibrationTableKind, Channel}; assert_eq!(0, CalibrationTableKind::Amplitude(Channel::High).as_u16().unwrap()); assert_eq!(3, CalibrationTableKind::Range(Channel::Low).as_u16().unwrap()); assert!(CalibrationTableKind::Amplitude(Channel::Saturation).as_u16().is_err());