pySimBlocks.blocks.interfaces.goto

class pySimBlocks.blocks.interfaces.goto.Goto(name: str, tag: str, sample_time: float | None = None)[source]

Bases: Block

Publish a signal to the global signal bus under a named tag.

Goto and From blocks implement a virtual wiring mechanism: a Goto writes its input to signal_bus._signal_bus[tag] each tick, and any From block with the same tag 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 From sharing the same tag, ensuring the Goto executes before its consumers within the same tick.

direct_feedthrough = True

True if outputs depend directly on inputs.

initialize(t0: float) None[source]

Publish the current input to the signal bus.

If no input has been connected yet (None), the bus entry is set to None.

Parameters:

t0 – Initial simulation time in seconds.

output_update(t: float, dt: float) None[source]

Write the input value to the signal bus under this block’s tag.

Parameters:
  • t – Current simulation time in seconds.

  • dt – Current time step in seconds.

state_update(t: float, dt: float) None[source]

No-op: Goto carries no internal state.