Header menu logo issie

WaveSimSelectHelpers Module

Types and nested modules

Type/Module Description

Constants

SelectionVerdict

What leaving the wave selection dialog with a given number of waveforms selected does.

TableRow

Functions and values

Function or value Description

componentSearchBox wsModel dispatch

Full Usage: componentSearchBox wsModel dispatch

Parameters:
Returns: ReactElement

Search box for component names.

wsModel : WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement

consistentSelectedWaves ws

Full Usage: consistentSelectedWaves ws

Parameters:
Returns: WaveIndexT list

The selected waves the simulation still has, which is what Show Only Selected shows and what the ticks in the dialog are drawn from. A selection outliving what it names is the ordinary consequence of the simulation being rebuilt, and refreshWaveSim re-resolves it - but the dialog is drawn from whatever the model holds at that moment, so it has to be able to read a selection that has not been re-resolved yet. Says so when it happens, since a selection quietly shrinking is worth knowing about. It used to check the CANDIDATES against the simulation as well. They are read out of WaveIndex or out of AllWaves, both of which the simulation is what defines, so there was nothing there to find.

ws : WaveSimModel
Returns: WaveIndexT list

filterWaves shown wsModel

Full Usage: filterWaves shown wsModel

Parameters:
Returns: (type)

Filtering function that applies an AND operation across four search criteria. OfSheet is used to return the waves that match the sheet box All returns all filtered waves without any sheet filtering. `shown` is the sheet instances the two panes are going to draw - the handful the collapsed hierarchy resolved to, one per node. A wave of any other instance cannot appear in either pane, so it is dropped before anything else looks at it. That is the difference between work proportional to the design somebody wrote and work proportional to what it expands to: main6 of largeTest is seven sheets and tens of thousands of instances, carrying 208,896 waves between them, and the dialog draws seven rows. None means Show Only Selected, which is not restricted to the instances the hierarchy resolved to: a wave already chosen inside an instance no combo box is currently showing must stay reachable, or it could never be deselected. It is restricted to the waves that were CHOSEN, which is a shorter list than any of them. Every membership test here is against a Set. They were lists as long as the expansion, tested once per wave, which is a product of two numbers that both grow with the design - the reason opening this dialog on a large design took minutes. The worst case was the DEFAULT one: an empty sheet box matches every instance, since every string contains the empty string.

shown : Set<string> option
wsModel : WaveSimModel
Returns: (type)

isSubSheetOf subSheetId sheets

Full Usage: isSubSheetOf subSheetId sheets

Parameters:
    subSheetId : string
    sheets : Set<string>

Returns: bool

Whether a sheet instance is one of `sheets`, or lies inside one. Walks up the chain of parent instances, which is as deep as the design nests rather than as wide as it expands - so the set it is asked about has to be a Set, or the walk is paid for once per member.

subSheetId : string
sheets : Set<string>
Returns: bool

makeFlatGroupRow showDetails ws nodeKey grp wavesInGroup dispatch

Full Usage: makeFlatGroupRow showDetails ws nodeKey grp wavesInGroup dispatch

Parameters:
Returns: TableRow
showDetails : bool
ws : WaveSimModel
nodeKey : string list
grp : ComponentGroup
wavesInGroup : Wave list
dispatch : Msg -> unit
Returns: TableRow

makeSelectionTable ws hierarchy waves dispatch

Full Usage: makeSelectionTable ws hierarchy waves dispatch

Parameters:
Returns: ReactElement
ws : WaveSimModel
hierarchy : SelectorHierarchy
waves : Wave list
dispatch : Msg -> unit
Returns: ReactElement

makeSummaryItem showDetails ws summaryItem aboveRows rows cBox waves dispatch

Full Usage: makeSummaryItem showDetails ws summaryItem aboveRows rows cBox waves dispatch

Parameters:
Returns: TableRow

One row of the selection table: a checkbox over all of `waves`, and a summary that opens to show `rows` - each of which is a group of components, or a whole sheet, and may open in turn. `aboveRows` goes in the body, between the summary and the table. For a sheet that is the combo box choosing which of its instances the rows belong to, which belongs there rather than in the summary, since a click on the summary opens and closes the row. `null` where there is nothing. In general waves.Length > rows.Length, since one row typically holds several ports.

showDetails : bool
ws : WaveSimModel
summaryItem : ReactElement
aboveRows : ReactElement
rows : TableRow list
cBox : CheckBoxStyle
waves : Wave list
dispatch : Msg -> unit
Returns: TableRow

portSearchBox wsModel dispatch

Full Usage: portSearchBox wsModel dispatch

Parameters:
Returns: ReactElement

Search box for port names.

wsModel : WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement

searchBoxContainerStyle

Full Usage: searchBoxContainerStyle

Returns: HTMLAttr

A style to add some margin between search boxes.

Returns: HTMLAttr

selectAllSubsheetsBox ws dispatch

Full Usage: selectAllSubsheetsBox ws dispatch

Parameters:
Returns: ReactElement

A sheet filter ending in '*' means that sheet and everything inside it.

ws : WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement

selectWavesModal wsModel dispatch model

Full Usage: selectWavesModal wsModel dispatch model

Parameters:
Returns: ReactElement

Displays the modal for wave selection. The top row shows the serach boxes. Below a two‑column grid shows the wave selection (left) and breadcrumbs (right).

wsModel : WaveSimModel
dispatch : Msg -> unit
model : Model
Returns: ReactElement

selectionVerdict numWaves

Full Usage: selectionVerdict numWaves

Parameters:
    numWaves : int

Returns: SelectionVerdict
numWaves : int
Returns: SelectionVerdict

sheetSearchBox wsModel dispatch

Full Usage: sheetSearchBox wsModel dispatch

Parameters:
Returns: ReactElement

Search box for sheet names.

wsModel : WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement

showOnlySelectedBox ws dispatch

Full Usage: showOnlySelectedBox ws dispatch

Parameters:
Returns: ReactElement
ws : WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement

toggleSelectSubGroup wsModel dispatch selected waves

Full Usage: toggleSelectSubGroup wsModel dispatch selected waves

Parameters:

Select or deselect every wave a row covers. All of them. Both this and the checkbox above it used to keep only the waves at the shallowest access path they were given, from when a sheet's row could hold the waves of its whole subtree and ticking it had to mean that sheet's own signals rather than its children's. A row is now the waves of one component group within one sheet INSTANCE, or of one instance, so they are all at one depth and the shallowest of them is all of them.

wsModel : WaveSimModel
dispatch : Msg -> unit
selected : bool
waves : WaveIndexT list

toggleWaveSelection index wsModel dispatch

Full Usage: toggleWaveSelection index wsModel dispatch

Parameters:
index : WaveIndexT
wsModel : WaveSimModel
dispatch : Msg -> unit

updateSheetString newSheetName ws

Full Usage: updateSheetString newSheetName ws

Parameters:
Returns: string
newSheetName : string
ws : WaveSimModel
Returns: string

waveCheckBox (arg1, arg2) isChecked toggle name ws dispatch

Full Usage: waveCheckBox (arg1, arg2) isChecked toggle name ws dispatch

Parameters:
Returns: ReactElement

A checkbox over one piece of the wave sim model, shown ticked or not by `isChecked` and toggled by `toggle`. `toggle` is given the state as it is when the update runs, not as it was when the box was drawn. A box is drawn once and clicked later, and the model may have moved in between - the same reason every handler here dispatches UpdateWSModel rather than replacing the model wholesale.

arg0 : WaveSimModel -> 'STATE
arg1 : 'STATE -> WaveSimModel -> WaveSimModel
isChecked : 'STATE -> bool
toggle : 'STATE -> 'STATE
name : string
ws : WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement

waveCheckBoxItem wsModel waveIds dispatch

Full Usage: waveCheckBoxItem wsModel waveIds dispatch

Parameters:
Returns: ReactElement
wsModel : WaveSimModel
waveIds : WaveIndexT list
dispatch : Msg -> unit
Returns: ReactElement

waveIndicesByInstance

Full Usage: waveIndicesByInstance

Returns: FastSimulation -> Map<string, WaveIndexT list>

The waves of each sheet instance, worked out once per AllWaves map rather than once per render. The selector wants the waves of the handful of instances it is drawing and had no way to ask for them: it read every wave in the design and threw nearly all of them away, on every keystroke in a search box and every click on a pill. main6 of largeTest carries 208,896 waves. Keyed on the SIMULATION, not on AllWaves. Which waves exist and which instance each belongs to are settled when the simulation is built; AllWaves holds the same waves with their drawn SVGs, and is REPLACED every time any waveform is generated - Map.change returns a new map - so keying on it meant selecting one wave rebuilt this index over every wave in the design. It holds indices rather than the records, for the same reason: the records change as they are drawn, and the caller has AllWaves to look them up in.

Returns: FastSimulation -> Map<string, WaveIndexT list>

wavePropsTable rows

Full Usage: wavePropsTable rows

Parameters:
Returns: ReactElement
rows : TableRow list
Returns: ReactElement

waveRow props rowItems

Full Usage: waveRow props rowItems

Parameters:
    props : CSSProp list
    rowItems : 'a list

Returns: TableRow
props : CSSProp list
rowItems : 'a list
Returns: TableRow

waveRowIProps props rowItems

Full Usage: waveRowIProps props rowItems

Parameters:
Returns: TableRow
props : IHTMLProp seq
rowItems : 'a list
Returns: TableRow

waveSelectBreadcrumbs wsModel hierarchy filteredWaves dispatch model

Full Usage: waveSelectBreadcrumbs wsModel hierarchy filteredWaves dispatch model

Parameters:
Returns: ReactElement

Displays a breadcrumb of sheets based on the current search and wave matches. One pill per NODE of the collapsed hierarchy, not per instance: a sheet instantiated four times inside one parent is one pill, and which of the four it stands for is the combo box in the other pane. Both panes are drawn from the same hierarchy, so they cannot disagree about it.

wsModel : WaveSimModel
hierarchy : SelectorHierarchy
filteredWaves : (type)
dispatch : Msg -> unit
model : Model
Returns: ReactElement

Type something to start searching.