WaveSimTop Module
Top-level functions for Waveform Simulator
Functions and values
| Function or value | Description |
|
|
Suppress the run banner while the waveform viewer is being scrolled horizontally, and arm the delayed message that lets it show again once the scrolling has stopped. Here, once, rather than at each of the things that scroll - the scrollbar, its arrow buttons, a zoom, a cursor move that pulls the window along - because what they have in common is what they did to StartCycle, and none of them should have to know that there is a banner. Every one of them reaches this on the way out of the update. |
|
Full Usage:
refreshButtonAction canvasState model dispatch arg4
Parameters:
'a
model : 'b
dispatch : Msg -> unit
arg3 : 'c
|
What the waveform viewer's Start and Refresh buttons do. The click itself is only a paint fence: the button's spinner must be ON SCREEN before StartWaveSimulation's update branch - which does the work, on the model as it then is - blocks the renderer for the build. The start is NOT sent as the RunAfterRender slot's continuation. That slot is one deep and a competing ask - a sheet open finishing, a progress bar re-arming - REPLACES what is pending, and the loser is dropped without a trace, which is how a Start click could do nothing. The slot is used only for what it draws (the spinner); the message goes through its own two animation frames - the same paint guarantee runWhenPainted documents - and then the ordinary queue, where nothing can swallow it.
|
|
Major function called after changes to extend simulation and/or redo waveforms. Note that after design change simulation must be recreated externally, and the function called with newSimulation = true. That is because this function has no way to know that the simulation has changed. This function performs (as required) three actions. 1. Extend the simulation to the current cycle (if not already done). 2. Remake the Wave headers, one for each selected waveform. 3. Remake (or make for first time) the saved waveform SVGs for all selected waveforms.
|
|
|
|
The end-of-update checks that keep the .NET simulation serving the view. Decisions are STATE COMPARISONS, never cache interrogations and never event tracking: is a session there (the start paths' business, not this one's - nothing here ever builds), has it run far enough for the viewport (no: one chunk), and is the current viewport the one the last completed fetch was for (no: one bundle). One operation in flight; every reply is a message; this runs after every message, so a completion or a viewport change is acted on immediately and anything else finds nothing to do in a handful of comparisons. See docs/dev/sidecarInvariants.md. |
|
Start - or restart - the waveform simulation, on the model as it IS: the update branch of the StartWaveSim message, which is the ONE way a waveform simulation begins. Start means first do stop: the step and waveform simulations are mutually exclusive, so whatever is running is ended here, synchronously, before the new build - sequencing that used to be spread across dispatched snapshots and a post-render closure, where it raced the renders it spanned.
|
Full Usage:
topHalf (arg1, arg2) model dispatch
Parameters:
Component list
arg1 : Connection list
model : Model
dispatch : Msg -> unit
Returns: ReactElement * bool
|
|
Full Usage:
viewWaveSim (arg1, arg2) model dispatch
Parameters:
Component list
arg1 : Connection list
model : Model
dispatch : Msg -> unit
Returns: ReactElement
|
|