pub struct FunctionGenerator { /* private fields */ }Expand description
Function / arbitrary waveform generator session view.
Implementations§
Source§impl FunctionGenerator
impl FunctionGenerator
pub fn new(session: InstrumentSession) -> Self
pub fn session(&self) -> &InstrumentSession
pub fn session_mut(&mut self) -> &mut InstrumentSession
Sourcepub fn set_waveform(&mut self, waveform: Waveform) -> Result<()>
pub fn set_waveform(&mut self, waveform: Waveform) -> Result<()>
Sets the output waveform.
Sourcepub fn set_frequency(&mut self, hz: f64) -> Result<()>
pub fn set_frequency(&mut self, hz: f64) -> Result<()>
Sets output frequency in hertz (SI).
Sourcepub fn set_amplitude(&mut self, vpp: f64) -> Result<()>
pub fn set_amplitude(&mut self, vpp: f64) -> Result<()>
Sets peak-to-peak amplitude in volts (SI).
Sourcepub fn set_offset(&mut self, volts: f64) -> Result<()>
pub fn set_offset(&mut self, volts: f64) -> Result<()>
Sets DC offset in volts (SI).
Sourcepub fn set_duty_cycle(&mut self, percent: f64) -> Result<()>
pub fn set_duty_cycle(&mut self, percent: f64) -> Result<()>
Sets square-wave duty cycle in percent.
Sourcepub fn set_load(&mut self, ohms: f64) -> Result<()>
pub fn set_load(&mut self, ohms: f64) -> Result<()>
Sets output load impedance in ohms (SI); use INFinity via vendor-specific call if needed.
Sourcepub fn output_enable(&mut self, enabled: bool) -> Result<()>
pub fn output_enable(&mut self, enabled: bool) -> Result<()>
Enables or disables the output.
Sourcepub fn set_burst_count(&mut self, count: u32) -> Result<()>
pub fn set_burst_count(&mut self, count: u32) -> Result<()>
Sets burst cycle count.
Sourcepub fn set_burst_state(&mut self, enabled: bool) -> Result<()>
pub fn set_burst_state(&mut self, enabled: bool) -> Result<()>
Enables or disables burst mode.
Sourcepub fn set_burst_trigger_source(&mut self, source: &str) -> Result<()>
pub fn set_burst_trigger_source(&mut self, source: &str) -> Result<()>
Sets burst trigger source (e.g. IMM, EXT, BUS).
Sourcepub fn read_frequency(&mut self) -> Result<f64>
pub fn read_frequency(&mut self) -> Result<f64>
Reads the configured frequency in hertz (SI).
Auto Trait Implementations§
impl !RefUnwindSafe for FunctionGenerator
impl !Sync for FunctionGenerator
impl !UnwindSafe for FunctionGenerator
impl Freeze for FunctionGenerator
impl Send for FunctionGenerator
impl Unpin for FunctionGenerator
impl UnsafeUnpin for FunctionGenerator
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