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 output_enable(&mut self, enabled: bool) -> Result<()>
pub fn output_enable(&mut self, enabled: bool) -> Result<()>
Enables or disables the output.
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