Header menu logo issie

CustomCompPorts Module

Types

Type Description

Deps

IODirection

Match

PortChange

PortInfo

Signature

Names and widths of ports, ordered. Input ports, Output ports.

Functions and values

Function or value Description

changeInstance comp change

Full Usage: changeInstance comp change

Parameters:
Returns: Component

Return updated custom component with ports changed as per change If a port is deleted any corresponding connections must be deleted to keep the CanvasState consistent. That is done elsewhere, since deleting not fully connected connections is a straightforward operation on CanvasState, as done by deleteIncompleteConnections

comp : Component
change : PortChange
Returns: Component

checkCanvasStateIsOk model

Full Usage: checkCanvasStateIsOk model

Parameters:
Returns: bool
model : Model
Returns: bool

deleteIncompleteConnections (arg1, arg2)

Full Usage: deleteIncompleteConnections (arg1, arg2)

Parameters:
Returns: Component list * Connection list

Return canvasState updated with bad connections that have lost either of their connecting components deleted

arg0 : Component list
arg1 : Connection list
Returns: Component list * Connection list

dependencyDoesNotMatchSignature (arg1, arg2) (arg3, arg4)

Full Usage: dependencyDoesNotMatchSignature (arg1, arg2) (arg3, arg4)

Parameters:
    arg0 : 'a
    arg1 : 'b
    arg2 : 'a
    arg3 : 'b

Returns: bool
arg0 : 'a
arg1 : 'b
arg2 : 'a
arg3 : 'b
Returns: bool

findInstancesOfCurrentSheet project

Full Usage: findInstancesOfCurrentSheet project

Parameters:
Returns: (string * (ComponentId * CustomComponentType)) list
project : Project
Returns: (string * (ComponentId * CustomComponentType)) list

getCorrectFileName project

Full Usage: getCorrectFileName project

Parameters:
Returns: string
project : Project
Returns: string

getDependents model

Full Usage: getDependents model

Parameters:
Returns: (((string * int) list * (string * int) list) * (string * string * ((string * int) list * (string * int) list)) list) option

returns IO signature of current sheet, and all its instances in other sheets

model : Model
Returns: (((string * int) list * (string * int) list) * (string * string * ((string * int) list * (string * int) list)) list) option

getDependentsInfo p

Full Usage: getDependentsInfo p

Parameters:
Returns: Deps
p : Project
Returns: Deps

getIOMatchFromSig (inputs, outputs)

Full Usage: getIOMatchFromSig (inputs, outputs)

Parameters:
    inputs : (string * int) list
    outputs : (string * int) list

Returns: Match list
inputs : (string * int) list
outputs : (string * int) list
Returns: Match list

getOutOfDateDependents model

Full Usage: getOutOfDateDependents model

Parameters:
Returns: (((string * int) list * (string * int) list) * (string * string * ((string * int) list * (string * int) list)) list) option

check whether any instance dependent on current sheet has different signature from current

model : Model
Returns: (((string * int) list * (string * int) list) * (string * string * ((string * int) list * (string * int) list)) list) option

guessAtRenamedPorts matches

Full Usage: guessAtRenamedPorts matches

Parameters:
Returns: PortChange array
matches : PortChange seq
Returns: PortChange array

ioCompareSigs (arg1, arg2) (arg3, arg4)

Full Usage: ioCompareSigs (arg1, arg2) (arg3, arg4)

Parameters:
    arg0 : (string * int) list
    arg1 : (string * int) list
    arg2 : (string * int) list
    arg3 : (string * int) list

Returns: PortChange seq

compare two I/O signature lists

arg0 : (string * int) list
arg1 : (string * int) list
arg2 : (string * int) list
arg3 : (string * int) list
Returns: PortChange seq

listUpdate uPred uFunc lst

Full Usage: listUpdate uPred uFunc lst

Parameters:
    uPred : 'a -> bool
    uFunc : 'a -> 'a
    lst : 'a list

Returns: 'a list

Change the items x in lst where uPred x with x -> uFunc x. Useful to replace one item of a list

uPred : 'a -> bool
uFunc : 'a -> 'a
lst : 'a list
Returns: 'a list

makePortName nameWidth

Full Usage: makePortName nameWidth

Parameters:
    nameWidth : (string * int) option

Returns: ReactElement
nameWidth : (string * int) option
Returns: ReactElement

optCurrentSheetDependentsPopup model

Full Usage: optCurrentSheetDependentsPopup model

Parameters:
Returns: ((Msg -> Unit) -> Model -> ReactElement) option

returns a popup function to show the dependents update dialog if this is needed this dialog drives all subsequent work changing custom component instances

model : Model
Returns: ((Msg -> Unit) -> Model -> ReactElement) option

printSheetNames model

Full Usage: printSheetNames model

Parameters:
model : Model

syncLoadedComponentsToDisk newProj oldProj

Full Usage: syncLoadedComponentsToDisk newProj oldProj

Parameters:

Save any changed sheets to disk in the project directory

newProj : Project
oldProj : Project

updateDependents (arg1, arg2) instances model dispatch

Full Usage: updateDependents (arg1, arg2) instances model dispatch

Parameters:
    arg0 : (string * int) list
    arg1 : (string * int) list
    instances : (string * string * Signature) list
    model : Model
    dispatch : Msg -> unit

Returns: Project option

dispatch message to change project in model, returning project

arg0 : (string * int) list
arg1 : (string * int) list
instances : (string * string * Signature) list
model : Model
dispatch : Msg -> unit
Returns: Project option

updateInstance (arg1, arg2) (sheet, cid, oldSig) p

Full Usage: updateInstance (arg1, arg2) (sheet, cid, oldSig) p

Parameters:
    arg0 : (string * int) list
    arg1 : (string * int) list
    sheet : string
    cid : string
    oldSig : Signature
    p : Project

Returns: Project

Make changes to ccomponent cid on sheet converting old ports oldSig to new ports newSig

arg0 : (string * int) list
arg1 : (string * int) list
sheet : string
cid : string
oldSig : Signature
p : Project
Returns: Project

updateProjectFiles saveToDisk update model

Full Usage: updateProjectFiles saveToDisk update model

Parameters:
Returns: Model

Return new model with project updated as per update function. If p.LoadedComponents data is changed, for each sheet that is different the sheet will be saved to disk. This function should be used consistently to keep disk and project data correct.

saveToDisk : bool
update : Project -> Project
model : Model
Returns: Model

Type something to start searching.