pub struct FemtoController {
pub state: FemtoState,
pub gain_index: i32,
pub current_gain: i32,
pub g1: bool,
pub g2: bool,
pub g3: bool,
pub no: bool,
pub gain: f64,
}Expand description
Femto amplifier gain controller.
Port of the femto.st SNL program as a pure Rust state machine.
Call step() to advance the state machine when events occur.
Fields§
§state: FemtoState§gain_index: i32§current_gain: i32§g1: bool§g2: bool§g3: bool§no: bool§gain: f64Implementations§
Source§impl FemtoController
impl FemtoController
Sourcepub fn step(&mut self, event: Option<FemtoEvent>) -> FemtoState
pub fn step(&mut self, event: Option<FemtoEvent>) -> FemtoState
Advance the state machine by one step given an event. Returns the new state.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FemtoController
impl RefUnwindSafe for FemtoController
impl Send for FemtoController
impl Sync for FemtoController
impl Unpin for FemtoController
impl UnsafeUnpin for FemtoController
impl UnwindSafe for FemtoController
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