pathsim.blocks.wrapper module
- class pathsim.blocks.wrapper.Wrapper(func=None, T=1, tau=0)[source]
Bases:
BlockWrapper block for discrete implementation and external code integration.
The Wrapper class is designed to trigger the wrapped method at fixed intervals using an internal scheduled event. This makes it particularly useful for wrapping external code or implementing discrete-time systems within the simulation framework.
The block uses the Schedule class to periodically call the _run_wrapper method, which must be implemented by subclasses. The inputs and outputs of the block are handled through the inputs and outputs registers, enabling seamless integration with other blocks in the simulation. …
- Parameters:
- Evt
internal event. Used for periodic sampling the wrapped method
- update(t)[source]
Update system equation for fixed point loop.
Note
no direct passthrough, so the ‘update’ method is optimized for this case
- Parameters:
t (float) – evaluation time
- property T
Get the sampling period of the block
- Returns:
T – sampling period for the Schedule event
- Return type: