openmixer — generated API reference
    Preparing search index...

    Class LatchResource<A, Scope, S>

    Type Parameters

    Hierarchy (View Summary)

    Index
    confirm: ConfirmGate | undefined

    The confirm gate a write here must pass, when the row declared one — see ConsoleResource.confirm. Declared on the row and executed by the registry; every mold carries it the same way, so a gated operation and a gated record are one clause.

    lifecycle: ResourceLifecycle | undefined

    The row's CREATE/DELETE doors, when it declared any.

    path: string

    The path template, e.g. /channel/{kind}/{index}/headAmp. Braced segments become ResourceId keys. One template per entity type; instances differ only by id.

    policy: ResourcePolicy | undefined

    The row's declared bookkeeping policy — see ResourcePolicy.

    • Whether these variables NAME an instance of this entity — the address codec's own answer, independent of whether this console holds that instance. See ConsoleResource.addresses.

      Parameters

      Returns boolean

    • The §6c compare loop, one warden pass for one instance: read the console's state (pure), ask the device, compare the STORED fields — the ones this latch asserts; derived fields are another entity's live truth and not this latch's to correct. On mismatch only, re-assert through the same claim → re-read → drive path as any projection. The caller holds the registry and fires the member frames from the declared ripples; this method owns the write-on-mismatch decision and nothing else.

      Parameters

      Returns LatchAudit<S>

    • The canonical spelling of an instance id — the ONE name every broadcast frame carries, whichever door (raw wire segments, model values) the write came through. A resource that omits this broadcasts the caller's id verbatim.

      Parameters

      Returns Readonly<Record<string, string | number>> | undefined

    • The row's fresh state, with no instance named — see ConsoleResource.freshState.

      Called per request rather than cached: the factory answers a new object each time, and handing out one shared instance would let any reader mutate every future caller's default.

      Returns object | undefined

    • The station's own instance list, canonically spelled — the snapshot's half of read.

      Returns Iterable<Readonly<Record<string, string | number>>, any, any> | undefined

    • Project the state onto the audio — the southbound half. Called by the registry after every accepted patch that changed something. The implementation re-reads its own state and drives the backend from that read; there is no state argument to trust. A resource whose state has no audio consequence returns PROJECTED; an unwired backend returns notProjected so the refusal is visible on the first attempt.

      Synchronous by contract. Hardware that lands later uses a queued sink: dispatch now, and the landing (confirmation or refusal) reaches every client as the next frame of the same instance via ResourceRegistry.reproject.

      Parameters

      Returns ProjectionResult

    • Read the ONE state. undefined when the instance does not exist — the layer turns that into a not-found rather than an empty object, so "absent" and "default" stay distinct. Pure: a read may not bind, seed, or persist anything.

      Parameters

      Returns S | undefined

    • The row's travels with NO instance named, for a client that must bind every control it will draw before it has drawn one. Optional: a row with no numeric travel to declare simply has none, and absence here reads as "ask the instance", never as "there is no limit".

      Returns ResourceTravels