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(Channel)

An amplitude calibration table.

Range(Channel)

A range calibration table.

Methods

impl CalibrationTableKind
[src]

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());

Trait Implementations

impl Debug for CalibrationTableKind
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Copy for CalibrationTableKind
[src]

impl Clone for CalibrationTableKind
[src]

fn clone(&self) -> CalibrationTableKind

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more