Issie logo Issie

PortData Module

The port slices of one sidecar build, held for the renderer to derive instance views from. The same shape as `WaveData` and `StepPanelData` and for the same reason: view code reads synchronously, on every render, and a separate process cannot be asked synchronously - so the update function fills this and the views read it (the diagram at the top of SimInterface.fs). What is held is small and immutable by construction. For one simulation the circuit is frozen: the design the sidecar simulates is exactly the design the renderer holds, and draw-block edits touch neither until a refresh builds anew. So a slice is fetched once per (build, instance), never invalidated, never re-fetched - the whole store simply dies with its build. And the instances held are the ones the UI references - the selection's, the top sheet, the ones the selector shows - bounded by what is on screen, never by the expansion. Held rather than modelled for the reason docs/mutableState.md allows: a read-through memo of another process's answers, written from inside the promise that fetched them.

Functions and values

Function or value Description

describeHeld fs

Full Usage: describeHeld fs

Parameters:
Returns: string

Test-only: what is held and whether it is keyed to `fs`, for the dev harness.

fs : FastSimulation
Returns: string

fetch epoch instances

Full Usage: fetch epoch instances

Parameters:
Returns: Promise<Result<int, SidecarFailure>>

Fetch and hold the slices of some instances, sequentially in one promise - a slice is a few hundred bytes and a round trip a fifth of a millisecond, so even a whole design is tens of milliseconds, and the selector's ask is a handful. Answers landing for a superseded build are dropped by the epoch check at store time.

epoch : int
instances : InstancePath list
Returns: Promise<Result<int, SidecarFailure>>

forget ()

Full Usage: forget ()

Parameters:
    () : unit

Release what is held. Memory hygiene only - correctness never needs it, because the keying above already refuses stale answers.

() : unit

missingOf wanted

Full Usage: missingOf wanted

Parameters:
Returns: InstancePath list

The instances of `wanted` this build has not yet been asked about.

wanted : InstancePath list
Returns: InstancePath list

startEpoch fs epoch

Full Usage: startEpoch fs epoch

Parameters:

Start holding for a build: the carrier `fs` under session `epoch`.

fs : FastSimulation
epoch : int

storeForTest epoch instance slice

Full Usage: storeForTest epoch instance slice

Parameters:

Test-only: hold one instance's slice as if it had arrived on the wire.

epoch : int
instance : InstancePath
slice : ComponentSlots list

Type something to start searching.