pub enum SignalConfig {
Impulse {
amplitude: f64,
label: Option<String>,
},
Sine {
frequency: f64,
amplitude: f64,
duration: f64,
label: Option<String>,
},
TwoTone {
f1: f64,
f2: f64,
amplitude: f64,
duration: f64,
label: Option<String>,
},
ExpSweep {
f_start: f64,
f_end: f64,
amplitude: f64,
duration: f64,
label: Option<String>,
},
Silence {
duration: f64,
label: Option<String>,
},
ToneBurst {
frequency: f64,
amplitude_dbvu: Option<f64>,
amplitude: f64,
on_ms: f64,
off_ms: f64,
repetitions: usize,
label: Option<String>,
},
LevelSweep {
frequency: f64,
levels_dbvu: Vec<f64>,
duration_per_level: f64,
label: Option<String>,
},
}Expand description
Signal configuration.
Variants§
Implementations§
Source§impl SignalConfig
impl SignalConfig
Sourcepub fn to_spec(&self) -> SignalSpec
pub fn to_spec(&self) -> SignalSpec
Convert to a SignalSpec for generation.
Sourcepub fn fundamental_hz(&self) -> Option<f64>
pub fn fundamental_hz(&self) -> Option<f64>
Get the fundamental frequency if applicable (for THD measurement).
Trait Implementations§
Source§impl Clone for SignalConfig
impl Clone for SignalConfig
Source§fn clone(&self) -> SignalConfig
fn clone(&self) -> SignalConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SignalConfig
impl Debug for SignalConfig
Source§impl<'de> Deserialize<'de> for SignalConfig
impl<'de> Deserialize<'de> for SignalConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SignalConfig
impl RefUnwindSafe for SignalConfig
impl Send for SignalConfig
impl Sync for SignalConfig
impl Unpin for SignalConfig
impl UnsafeUnpin for SignalConfig
impl UnwindSafe for SignalConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more