Struct WdfJaMagnetizing
pub struct WdfJaMagnetizing {
pub comp_id: Option<String>,
pub root: JaMagnetizingRoot,
pub last_b: f64,
}Fields§
§comp_id: Option<String>§root: JaMagnetizingRoot§last_b: f64Implementations§
§impl WdfJaMagnetizing
impl WdfJaMagnetizing
pub fn new( comp_id: Option<String>, model: JaCoreModel, sample_rate: f64, port_resistance: f64, ) -> WdfJaMagnetizing
pub fn new_with_dc_bias( comp_id: Option<String>, model: JaCoreModel, sample_rate: f64, port_resistance: f64, dc_bias_current: f64, ) -> WdfJaMagnetizing
Trait Implementations§
§impl Clone for WdfJaMagnetizing
impl Clone for WdfJaMagnetizing
§fn clone(&self) -> WdfJaMagnetizing
fn clone(&self) -> WdfJaMagnetizing
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 more§impl Debug for WdfJaMagnetizing
impl Debug for WdfJaMagnetizing
§impl WdfLeaf for WdfJaMagnetizing
impl WdfLeaf for WdfJaMagnetizing
§fn set_incident(&mut self, a: f64)
fn set_incident(&mut self, a: f64)
Scatter-down: accept incident wave and update state.
§fn port_resistance(&self) -> f64
fn port_resistance(&self) -> f64
Port resistance (Ω).
fn debug_info(&self) -> String
fn clone_box(&self) -> Box<dyn WdfLeaf>
§fn set_complement(&mut self)
fn set_complement(&mut self)
Mark this pot half as the complement: uses 1-value on set_control.
§fn leaf_voltage(&self) -> f64
fn leaf_voltage(&self) -> f64
Voltage at this leaf after the WDF cycle.
§fn set_control(&mut self, _id: &str, _value: f64) -> bool
fn set_control(&mut self, _id: &str, _value: f64) -> bool
Generic control: pot position, LED drive, Vgs, switch position, etc.
Returns true if this leaf handled the control.
§fn set_resistance(&mut self, _ohms: f64) -> bool
fn set_resistance(&mut self, _ohms: f64) -> bool
Direct resistance override. Returns true if handled.
§fn set_voltage(&mut self, _v: f64) -> bool
fn set_voltage(&mut self, _v: f64) -> bool
Voltage source update. Returns true if handled.
§fn update_sample_rate(&mut self, _fs: f64)
fn update_sample_rate(&mut self, _fs: f64)
Reactive element sample rate update.
§fn is_dynamic(&self) -> bool
fn is_dynamic(&self) -> bool
Whether this leaf’s impedance can change at runtime (pots, modulated elements).
Used by DynNode to skip recomputation of static subtrees.
fn is_reactive(&self) -> bool
§fn one_port_state(&self) -> Option<OnePortState>
fn one_port_state(&self) -> Option<OnePortState>
Export this leaf’s runtime one-port state, when it has explicit reactive memory. Read more
§fn set_one_port_state(&mut self, _state: OnePortState) -> bool
fn set_one_port_state(&mut self, _state: OnePortState) -> bool
Import a shared one-port state into this leaf.
fn editable_info(&self) -> Option<(&'static str, f64)>
§fn unit_delay_state(&self) -> Option<f64>
fn unit_delay_state(&self) -> Option<f64>
For UnitDelay: return the outgoing state.
§fn set_unit_delay_partner(&mut self, _val: f64) -> bool
fn set_unit_delay_partner(&mut self, _val: f64) -> bool
For UnitDelay: set the incoming partner state.
§fn pot_position(&self) -> Option<f64>
fn pot_position(&self) -> Option<f64>
For Pot: return the current position (0.0..1.0).
§fn pot_max_resistance(&self) -> Option<f64>
fn pot_max_resistance(&self) -> Option<f64>
For Pot: return the max resistance.
§fn is_complement(&self) -> bool
fn is_complement(&self) -> bool
For Pot: return whether this half uses complement (1-position).
Auto Trait Implementations§
impl Freeze for WdfJaMagnetizing
impl RefUnwindSafe for WdfJaMagnetizing
impl Send for WdfJaMagnetizing
impl Sync for WdfJaMagnetizing
impl Unpin for WdfJaMagnetizing
impl UnsafeUnpin for WdfJaMagnetizing
impl UnwindSafe for WdfJaMagnetizing
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