Header menu logo issie

Simulator Module

Functions and values

Function or value Description

cap sheet

Full Usage: cap sheet

Parameters:
    sheet : string

Returns: string

Builds the graph and simulates it with all inputs zeroed. upper case a string

sheet : string
Returns: string

childrenOf ldcs sheet

Full Usage: childrenOf ldcs sheet

Parameters:
Returns: (string * string) list
ldcs : LoadedComponent list
sheet : string
Returns: (string * string) list

extractSimulationIOs

Full Usage: extractSimulationIOs

Returns: SimulationIO list -> SimulationGraph -> (SimulationIO * WireData) list

Expose the extractSimulationIOs function from SimulationRunner.

Returns: SimulationIO list -> SimulationGraph -> (SimulationIO * WireData) list

extractStatefulComponents graph

Full Usage: extractStatefulComponents graph

Parameters:
Returns: SimulationComponent list

Get some info and the state of all stateful components in a graph.

graph : SimulationGraph
Returns: SimulationComponent list

getCurrentSimulationState (arg1, arg2) project fs

Full Usage: getCurrentSimulationState (arg1, arg2) project fs

Parameters:
Returns: SimulationRunStatus

gets the status of the simulation given current canvasState and project

arg0 : Component list
arg1 : Connection list
project : Project option
fs : FastSimulation
Returns: SimulationRunStatus

getDirectDependencies (arg1, arg2)

Full Usage: getDirectDependencies (arg1, arg2)

Parameters:
Returns: (string * string) list
arg0 : Component list
arg1 : Connection list
Returns: (string * string) list

getLdcList ldcs openSheet

Full Usage: getLdcList ldcs openSheet

Parameters:
Returns: LoadedComponent

look up a sheet in a set of loaded components, return [] or a list of the matching LoadedComponent

ldcs : LoadedComponent list
openSheet : string
Returns: LoadedComponent

getSheet ldcs openSheet

Full Usage: getSheet ldcs openSheet

Parameters:
Returns: LoadedComponent

look up a sheet in a set of loaded components

ldcs : LoadedComponent list
openSheet : string
Returns: LoadedComponent

getUpdatedLoadedComponentState diagramName (arg2, arg3) projLdcs

Full Usage: getUpdatedLoadedComponentState diagramName (arg2, arg3) projLdcs

Parameters:
Returns: LoadedComponent list

canvasState: extracted canvasState from draw block. projLdcs: ldcs from project (current sheet ldc may be outofdate) diagramName: name of current open sheet. return updated list of all LDCs

diagramName : string
arg1 : Component list
arg2 : Connection list
projLdcs : LoadedComponent list
Returns: LoadedComponent list

portSheetPort compsWithIds name port

Full Usage: portSheetPort compsWithIds name port

Parameters:
Returns: SheetPort option

Helper used convert port into SheetPort for use by wave simulator determining connectivity within a design sheet. name is the name of the containing sheet.

compsWithIds : Map<ComponentId, Component>
name : string
port : Port
Returns: SheetPort option

saveStateInSimulation (arg1, arg2) openFileName loadedComponents fs

Full Usage: saveStateInSimulation (arg1, arg2) openFileName loadedComponents fs

Parameters:
Returns: FastSimulation

canvasState: extracted canvasState from draw block. loadedComponents: from project diagramName: name of current open sheet. save all needed by simulation ldcs in the FastSimulation record. The top sheet name must be saved separately - since if a simulation is being refreshed it must not change

arg0 : Component list
arg1 : Connection list
openFileName : string
loadedComponents : LoadedComponent list
fs : FastSimulation
Returns: FastSimulation

sheetsNeeded ldcs sheet

Full Usage: sheetsNeeded ldcs sheet

Parameters:
Returns: string list

Sheets needed to simulate sheet with name sheet. Sheets form a dependency tree. ldcs is a list of loaded components which must include sheet

ldcs : LoadedComponent list
sheet : string
Returns: string list

startCircuitSimulation simulationArraySize diagramName (arg3, arg4) loadedDependencies

Full Usage: startCircuitSimulation simulationArraySize diagramName (arg3, arg4) loadedDependencies

Parameters:
Returns: Result<SimulationData, SimulationError>

Extract circuit data from inputs and return a checked SimulationData object or an error SimulationData has some technical debt, it wraps FastSimulation adding some redundant data

simulationArraySize : int
diagramName : string
arg2 : Component list
arg3 : Connection list
loadedDependencies : LoadedComponent list
Returns: Result<SimulationData, SimulationError>

startCircuitSimulationFData simulationArraySize diagramName (arg3, arg4) loadedDependencies

Full Usage: startCircuitSimulationFData simulationArraySize diagramName (arg3, arg4) loadedDependencies

Parameters:
Returns: Result<SimulationData, SimulationError>
simulationArraySize : int
diagramName : string
arg2 : Component list
arg3 : Connection list
loadedDependencies : LoadedComponent list
Returns: Result<SimulationData, SimulationError>

Type something to start searching.