Issie logo Issie

WaveSimTop Module

Top-level functions for Waveform Simulator

Functions and values

Function or value Description

cancelSpinner model

Full Usage: cancelSpinner model

Parameters:
Returns: Model

remove the spinner popup

model : Model
Returns: Model

noteWaveScroll oldModel (model, cmd)

Full Usage: noteWaveScroll oldModel (model, cmd)

Parameters:
Returns: Model * Cmd<Msg>

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.

oldModel : Model
model : Model
cmd : Cmd<Msg>
Returns: Model * Cmd<Msg>

refreshButtonAction canvasState model dispatch arg4

Full Usage: refreshButtonAction canvasState model dispatch arg4

Parameters:
    canvasState : '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.

canvasState : 'a
model : 'b
dispatch : Msg -> unit
arg3 : 'c

refreshWaveSim newSimulation model

Full Usage: refreshWaveSim newSimulation model

Parameters:
    newSimulation : bool
    model : Model

Returns: Model * Cmd<Msg>

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.

newSimulation : bool
model : Model
Returns: Model * Cmd<Msg>

setButtonSpinner payload model

Full Usage: setButtonSpinner payload model

Parameters:
Returns: Model
payload : (Msg -> unit) -> Model -> Model
model : Model
Returns: Model

setProgressBar name payload numToDo model

Full Usage: setProgressBar name payload numToDo model

Parameters:
Returns: Model

Start or update a spinner popup

name : string
payload : (Msg -> unit) -> Model -> Model
numToDo : int
model : Model
Returns: Model

sidecarChecks (model, cmd)

Full Usage: sidecarChecks (model, cmd)

Parameters:
Returns: Model * Cmd<Msg>

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.

model : Model
cmd : Cmd<Msg>
Returns: Model * Cmd<Msg>

startWaveSimulation model

Full Usage: startWaveSimulation model

Parameters:
Returns: Model * Cmd<Msg>

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.

model : Model
Returns: Model * Cmd<Msg>

topHalf (arg1, arg2) model dispatch

Full Usage: topHalf (arg1, arg2) model dispatch

Parameters:
Returns: ReactElement * bool

ReactElement showing instructions and wave sim buttons

arg0 : Component list
arg1 : Connection list
model : Model
dispatch : Msg -> unit
Returns: ReactElement * bool

viewWaveSim (arg1, arg2) model dispatch

Full Usage: viewWaveSim (arg1, arg2) model dispatch

Parameters:
Returns: ReactElement

Entry point to the waveform simulator.

arg0 : Component list
arg1 : Connection list
model : Model
dispatch : Msg -> unit
Returns: ReactElement

Type something to start searching.