Header menu logo issie

UpdateHelpers Module

Types and nested modules

Type/Module Description

Constants

RightClickElement

Functions and values

Function or value Description

currentSheetIsOutOfDate model

Full Usage: currentSheetIsOutOfDate model

Parameters:
Returns: bool
model : Model
Returns: bool

executePendingMessagesF n model

Full Usage: executePendingMessagesF n model

Parameters:
Returns: Model * Cmd<Msg>
n : int
model : Model
Returns: Model * Cmd<Msg>

exitApp model

Full Usage: exitApp model

Parameters:
model : Model

filterByOKSheets model sheet

Full Usage: filterByOKSheets model sheet

Parameters:
    model : Model
    sheet : string

Returns: bool
model : Model
sheet : string
Returns: bool

getContextMenu e model

Full Usage: getContextMenu e model

Parameters:
Returns: string

Function that works out from the right-click event and model what the current context menu should be. output should be a menu name as defined in ContextMenus.contextMenus, or "" for no menu.

e : MouseEvent
model : Model
Returns: string

getCurrentTimeStamp model

Full Usage: getCurrentTimeStamp model

Parameters:
Returns: DateTime

get timestamp of current loaded component. is this ever used? No.

model : Model
Returns: DateTime

getLastMouseMsg msgQueue

Full Usage: getLastMouseMsg msgQueue

Parameters:
    msgQueue : Msg list

Returns: Msg option

Returns None if no mouse drag message found, returns Some (lastMouseMsg, msgQueueWithoutMouseMsgs) if a drag message was found

msgQueue : Msg list
Returns: Msg option

getMenuView act model dispatch

Full Usage: getMenuView act model dispatch

Parameters:
Returns: Model

handle Menu actions that may need Model data

act : MenuCommand
model : Model
dispatch : Msg -> Unit
Returns: Model

getMessageTraceString msg

Full Usage: getMessageTraceString msg

Parameters:
Returns: string

Human-readable info on a message, or "" for one not worth showing. Never `%A` on the message itself: a Msg can carry a whole FastSimulation, a Model or a canvas, and printing one of those crashes the renderer. shortDisplayMsg names every case by hand for exactly that reason. Mouse drags and moves are suppressed unless Log.Mouse is on, since they are the majority of all messages and would bury everything else.

msg : Msg
Returns: string

getSimulationDataOrFail model msg

Full Usage: getSimulationDataOrFail model msg

Parameters:
    model : Model
    msg : string

Returns: SimulationData

subfunction used in model update function

model : Model
msg : string
Returns: SimulationData

hideLibrarySheet name model dispatch

Full Usage: hideLibrarySheet name model dispatch

Parameters:
    name : string
    model : Model
    dispatch : Msg -> unit

Returns: Model

Put a viewed library component's sheet away again. If it is the sheet on screen the user has to be taken off it first, since it is about to become unreachable: back the way they came, or failing that to any sheet of their own. With nowhere at all to go the sheet stays open, rather than stranding the user on a sheet the rest of Issie has stopped believing in. The order matters. Leaving a sheet writes it back - to the loaded components, and to a backup file - and what stops that for a library sheet is its being in OpenedLibrarySheets. So the sheet is left while it is still marked, and put away only in the model this returns.

name : string
model : Model
dispatch : Msg -> unit
Returns: Model

isSameMsg

Full Usage: isSameMsg

Returns: 'a -> 'a -> bool

Tests physical equality on two objects. Used because Msg type does not support structural equality. **DANGER** will only work for messages which are physically the the same. In this use case that is fine.

Returns: 'a -> 'a -> bool

lastMemoryUpdateCheck

Full Usage: lastMemoryUpdateCheck

Returns: float
Returns: float

matchMouseMsg msgSelect msg

Full Usage: matchMouseMsg msgSelect msg

Parameters:
Returns: bool

Used to filter specific mouse messages based on mouse data.

msgSelect : MouseOp -> bool
msg : Msg
Returns: bool

processContextMenuClick menuType item dispatch model

Full Usage: processContextMenuClick menuType item dispatch model

Parameters:
    menuType : string
    item : string
    dispatch : Msg -> unit
    model : Model

Returns: Model * Cmd<Msg>

Function that implement action based on context menu item click. menuType is the menu from chooseContextMenu. item will be one of the possible items in this menu.

menuType : string
item : string
dispatch : Msg -> unit
model : Model
Returns: Model * Cmd<Msg>

processSheetBackAction dispatch model

Full Usage: processSheetBackAction dispatch model

Parameters:
Returns: Model

Implement action of top bar 'Back' button using the UISheetTrail

dispatch : Msg -> unit
model : Model
Returns: Model

readUserData userAppDir model

Full Usage: readUserData userAppDir model

Parameters:
    userAppDir : string
    model : Model

Returns: Model * Cmd<Msg>

Read persistent user data from file in userAppDir. Store in Model UserData.

userAppDir : string
model : Model
Returns: Model * Cmd<Msg>

resetDialogIfSelectionHasChanged newModel oldModel

Full Usage: resetDialogIfSelectionHasChanged newModel oldModel

Parameters:
Returns: Model

Clear the properties pane's half-typed state when a different component is selected, so that each component's boxes start from what that component is, not from what was being typed into the last one. DialogState goes with Text and Int: it holds the text and the error of every property box, and a box left mid-edit would otherwise carry its message onto the next component's pane. Its keys name the component, so a stale entry cannot be read by the wrong box - but it can be read again by the SAME component later, showing an edit the user has since abandoned.

newModel : Model
oldModel : Model
Returns: Model

rightClickElement

Full Usage: rightClickElement

Returns: RightClickElement
Returns: RightClickElement

sheetMsg sMsg model

Full Usage: sheetMsg sMsg model

Parameters:
Returns: Model * Cmd<Msg>
sMsg : Msg
model : Model
Returns: Model * Cmd<Msg>

shortDSheetMsg sMsg

Full Usage: shortDSheetMsg sMsg

Parameters:
Returns: string option

short summary used where Sheet messages are too complex to print

sMsg : Msg
Returns: string option

shortDWSM ws

Full Usage: shortDWSM ws

Parameters:
Returns: string option

short summary of wavesim message which has a lot of data

ws : WaveSimModel
Returns: string option

shortDisplayMsg msg

Full Usage: shortDisplayMsg msg

Parameters:
Returns: string option

Function returning a short but usually informative display of message used when message tracing (see Sheet menu to which on or off). Parameters that might be very large (like fastsimulation, or Model, or Symbols) should not be displayed using printf "%A".

msg : Msg
Returns: string option

traceMessage startOfUpdateTime msg (arg3, arg4)

Full Usage: traceMessage startOfUpdateTime msg (arg3, arg4)

Parameters:
    startOfUpdateTime : float
    msg : Msg
    arg2 : Model
    arg3 : Cmd<Msg>

Returns: Model * Cmd<Msg>

Count the message just handled, and trace it if Log.Update is on. The counting is unconditional and costs an add and a compare: the message name is only built when this message was the slowest so far, which is what makes the periodic summary affordable.

startOfUpdateTime : float
msg : Msg
arg2 : Model
arg3 : Cmd<Msg>
Returns: Model * Cmd<Msg>

updateAllMemoryCompsIfNeeded model

Full Usage: updateAllMemoryCompsIfNeeded model

Parameters:
Returns: Model
model : Model
Returns: Model

updateComponentMemory addr data compOpt

Full Usage: updateComponentMemory addr data compOpt

Parameters:
    addr : bigint
    data : bigint
    compOpt : Component option

Returns: Component option
addr : bigint
data : bigint
compOpt : Component option
Returns: Component option

updateTimeStamp model

Full Usage: updateTimeStamp model

Parameters:
Returns: Model

Replace timestamp of current loaded component in model project by current time Used in update function

model : Model
Returns: Model

verilogOutputPage sheet fPath

Full Usage: verilogOutputPage sheet fPath

Parameters:
    sheet : 'a
    fPath : string

Returns: ReactElement
sheet : 'a
fPath : string
Returns: ReactElement

verilogOutputPopup sheetName model dispatch

Full Usage: verilogOutputPopup sheetName model dispatch

Parameters:

Ask which Verilog flavour to write for a sheet, then write it. Reached from the sheet's pill in the sheet menu, so it names the sheet rather than assuming whichever one happens to be open.

sheetName : string
model : Model
dispatch : Msg -> Unit

viewLibrarySheet name model dispatch

Full Usage: viewLibrarySheet name model dispatch

Parameters:
    name : string
    model : Model
    dispatch : Msg -> unit

Returns: Model

Open a library component's sheet to be looked at, and go to it. The sheet becomes visible in the Sheets menu and stays reachable until the project is closed, but is read-only throughout: it is not the user's to change, and a library component that differed from the library it came from would not be one. Only this sheet is opened - a component built from other library components keeps them shut, each needing the same deliberate click of its own.

name : string
model : Model
dispatch : Msg -> unit
Returns: Model

withNoMsg model

Full Usage: withNoMsg model

Parameters:
Returns: Model * Cmd<Msg>

Adapter function to pipeline adding a default "Cmd.none" command to a model as returned in update function.

model : Model
Returns: Model * Cmd<Msg>

writeUserData model

Full Usage: writeUserData model

Parameters:
Returns: Model
model : Model
Returns: Model

Type something to start searching.