pySimBlocks.blocks.interfaces.external_input¶
- class pySimBlocks.blocks.interfaces.external_input.ExternalInput(name: str, sample_time: float | None = None)[source]¶
Bases:
BlockExternal input interface block.
Pass-through block for injecting real-time measurements into the model. Accepts scalar, (n,) or (n,1) inputs and forwards them as a strict (n,1) column vector. The output shape is frozen after the first non-None input and cannot change during the simulation.
- direct_feedthrough = True¶
True if outputs depend directly on inputs.
- initialize(t0: float) None[source]¶
Set the output to zero if no input is available, or forward the input.
- Parameters:
t0 – Initial simulation time in seconds.