pySimBlocks.blocks.interfaces.bus_from¶
- class pySimBlocks.blocks.interfaces.bus_from.BusFrom(name: str, tag: str, sample_time: float | None = None)[source]¶
Bases:
BlockRead a signal from the global signal bus by tag.
BusFrom and Goto blocks implement a virtual wiring mechanism: a Goto writes its input to
signal_bus._signal_bus[tag]each tick, and this block reads that value without requiring an explicit connection in the model graph.The model’s topological sort injects a virtual edge from each Goto to every BusFrom sharing the same tag, ensuring the Goto executes before this block within the same tick.
- direct_feedthrough = True¶
True if outputs depend directly on inputs.
- initialize(t0: float) None[source]¶
Read the initial value from the signal bus if available.
If the tag is not yet in the bus (Goto not yet initialized), the output is set to None.
- Parameters:
t0 – Initial simulation time in seconds.