SubsystemRegistry
此内容尚不支持你的语言。
Defined in: subsystems.ts:76
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new SubsystemRegistry():
SubsystemRegistry
Returns
Section titled “Returns”SubsystemRegistry
Methods
Section titled “Methods”getStatuses()
Section titled “getStatuses()”getStatuses():
SubsystemStatus[]
Defined in: subsystems.ts:137
Current status of every subsystem, install order, liveness derived now.
Returns
Section titled “Returns”markError()
Section titled “markError()”markError(
id,reason?):void
Defined in: subsystems.ts:120
Terminal error transition; keeps the reason in lastError.
Parameters
Section titled “Parameters”string
reason?
Section titled “reason?”string
Returns
Section titled “Returns”void
markStepped()
Section titled “markStepped()”markStepped(
id):void
Defined in: subsystems.ts:131
Pet the watchdog: an owned system ran this frame. Cheap and silent (no notify) — liveness is sampled, not pushed. Call once per tick.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
phaseOf()
Section titled “phaseOf()”phaseOf(
id):SubsystemPhase|undefined
Defined in: subsystems.ts:125
The current phase of a subsystem, or undefined if unknown.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”SubsystemPhase | undefined
recentEvents()
Section titled “recentEvents()”recentEvents(
limit?):SubsystemEvent[]
Defined in: subsystems.ts:160
Recent lifecycle transitions, oldest→newest (for a diagnostics log).
Parameters
Section titled “Parameters”limit?
Section titled “limit?”number = EVENT_LOG_CAP
Returns
Section titled “Returns”register()
Section titled “register()”register(
id,opts?):void
Defined in: subsystems.ts:85
Register (or re-register) a subsystem in the registered phase.
Parameters
Section titled “Parameters”string
dependsOn?
Section titled “dependsOn?”string[]
displayName?
Section titled “displayName?”string
Returns
Section titled “Returns”void
subscribe()
Section titled “subscribe()”subscribe(
fn): () =>void
Defined in: subsystems.ts:165
Subscribe to phase transitions (not per-beat). Returns an unsubscribe.
Parameters
Section titled “Parameters”() => void
Returns
Section titled “Returns”() => void
transition()
Section titled “transition()”transition(
id,phase,detail?):void
Defined in: subsystems.ts:109
Move a subsystem to a new lifecycle phase (no-op for an unknown id).
Parameters
Section titled “Parameters”string
detail?
Section titled “detail?”string
Returns
Section titled “Returns”void