Issie 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 WaveDetails, 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<InstancePath>
wsModel : WaveSimModel
Returns: (type)

isSubSheetOf arg1 sheets

Full Usage: isSubSheetOf arg1 sheets

Parameters:
Returns: bool

Whether a sheet instance is one of `sheets`, or lies inside one. An instance is the path of custom components between it and the root, innermost first, so an enclosing instance is a SUFFIX of it - the same path with the inner steps taken off - and containment is answered without consulting the simulation at all. This used to walk a stored instance-to-parent map one level at a time, and needed a note about instances the simulation no longer holds; a suffix test has nothing to look up and so nothing to miss.

arg0 : InstancePath
sheets : Set<InstancePath>
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

paneHintLine ()

Full Usage: paneHintLine ()

Parameters:
    () : unit

Returns: ReactElement

The line of small text in the gap between the search boxes and the two panes. Which line it is depends on whether either pane is having to scroll sideways - a fact about how wide the browser laid its content out, which nothing in the model knows, so it is read off the panes themselves as the code editor reads its own scroll container. The read is of the DOM the last render left, so the dialog's first frame has nothing to measure and a change of filter is followed a frame late. For a hint that is fine, and it is the price of not keeping a copy of a browser measurement in the model, where it would have to be kept true. Sideways only. Scrolling down is what a list of waveforms normally does, so counting it would leave the warning permanently up and the tip under it never read.

() : unit
Returns: ReactElement

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

waveIndicesOfInstance fs instance

Full Usage: waveIndicesOfInstance fs instance

Parameters:
Returns: WaveIndexT list
fs : FastSimulation
instance : InstancePath
Returns: WaveIndexT list

waveIndicesOfInstanceBy pick fs instance

Full Usage: waveIndicesOfInstanceBy pick fs instance

Parameters:
Returns: ('a * WaveIndexT) list

The waves offered inside ONE instance. Worked out from the DESIGN: the sheet that instance is a copy of names its own components, and each is looked up in the simulation to get its ports and their step arrays. So this costs the size of one sheet, however many times that sheet is instantiated. It replaces an index of every wave in the simulation grouped by instance, which cost the whole expansion to build - 208,896 entries on largeTest - to answer a question only ever asked about the handful of instances on screen. The rule deciding which ports carry a wave is FastCreate.portCarriesWave, the same one the wave index itself is built from, so the two cannot disagree. The waves of one instance, each paired with something read off the DESIGN component it belongs to - its label, its type, whatever the caller needs to rank or filter on. The ports come from `PortView.ofInstance`, which is the narrow question a remote simulator can answer; the components they belong to come from the design. Both are the size of one sheet, however many times that sheet is instantiated.

pick : Component -> 'a option
fs : FastSimulation
instance : InstancePath
Returns: ('a * 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.