Skip to main content

Signal

Enum Signal 

Source
pub enum Signal {
    Block(String),
    BlockPrev(String),
}
Expand description

Where a block’s input value comes from: another block’s output this same step, or that (or any) block’s own output from the previous step. There is deliberately no variant that reads a circuit quantity (V(node)/I(branch)) directly — that crossing from the physical domain into the signal domain must go through an explicit, named BlockKind::Phys2Sig block instead (referenced afterward like any other block, via Signal::Block). See BlockKind::Phys2Sig’s own doc comment for why this boundary is enforced rather than implicit, the same way a real block-diagram tool requires an explicit physical/signal converter block between a physical port and a signal port instead of wiring them together directly.

Variants§

§

Block(String)

Another block’s output this step — may name any block in the same slice, declared before or after this one: topological_order derives each step’s actual evaluation order from the full Signal::Block dependency graph, not declaration position, so “before/after” in the source text no longer has to match causal order (see that function). A genuine same-step cycle among these edges (A depends on B depends on A, however indirectly, including a block naming itself) is a model error reported as DaeError::AlgebraicLoop before any step is solved — see BlockInstance’s own doc comment.

§

BlockPrev(String)

A named block’s own output from the previous step (0.0 before the first step, matching every dynamic block’s own “starts at rest” convention). Unlike Signal::Block, this is not a same-step dependency at all — it reads state fixed before this step even starts — so it never contributes an edge to the dependency graph topological_order (in dae-runtime) builds, and is consequently the sanctioned way to close what would otherwise be a same-step cycle (e.g. a current controller regulating a BlockKind::Pmsm’s own id/iq outputs, or a PLL’s angle estimate feeding the very BlockKind::CoordinateTransform Park block that produced its own error signal): the one-sample delay every real digital controller reading its own last output already has.

Trait Implementations§

Source§

impl Clone for Signal

Source§

fn clone(&self) -> Signal

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Signal

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Signal

Source§

fn eq(&self, other: &Signal) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Signal

Auto Trait Implementations§

§

impl Forget for Signal

§

impl Freeze for Signal

§

impl Move for Signal

§

impl RefUnwindSafe for Signal

§

impl Send for Signal

§

impl Sync for Signal

§

impl Unpin for Signal

§

impl UnsafeUnpin for Signal

§

impl UnwindSafe for Signal

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.