Skip to content

DiagnosticsResult

Defined in: console-sdk/src/react/hooks/useDiagnostics.ts:68

What useDiagnostics returns (SDK_PLAN.md §3.6.8).

clear(): void

Defined in: console-sdk/src/react/hooks/useDiagnostics.ts:85

Empties the SDK’s raw-packet ring. A no-op when config.diagnostics.rawPackets is off (there is no ring to clear).

void

packets: readonly RawPacketInfo[]

Defined in: console-sdk/src/react/hooks/useDiagnostics.ts:74

The most-recent raw packets (oldest → newest), bounded by the SDK’s ring and any options.capacity. Empty (and referentially stable) when config.diagnostics.rawPackets is off or no packet has been observed yet.


parseSuccessRate: number

Defined in: console-sdk/src/react/hooks/useDiagnostics.ts:80

Fraction of the visible packets that decoded to a known command, in [0, 1]. 0 when there are no packets (empty ring or diagnostics off) — so a fresh screen reads a well-defined 0, not NaN.