component
PeripheralPanel
Generic peripheral inspector panel. A permanent section (like Display and Console): it always renders, lists whatever inspectable peripherals the live machine exposes, and shows a domain-specific view when registered, otherwise the generic fallback. Empty/error states keep it visible and diagnosable.
function PeripheralPanel(props: PeripheralPanelProps): JSX.ElementProps
| Name | Type | Description |
|---|---|---|
peripherals | string[] | Names of inspectable peripherals reported by the running machine. |
events | PeripheralEvent[] | All peripheral events seen so far (passed through to the selected view). |
erroroptional | string | null | Build/exposure error to surface (instead of a silent empty panel). |
refreshKey | number | Monotonic counter that bumps when new events arrive. |
getSnapshot | (name: string) => PeripheralSnapshot | null | Pull the current snapshot for a peripheral by name (null if unavailable). |
sendCommand | (name: string, cmd: { name: string; params: Record<string, string> }) => void | Send a command to a peripheral's inspector. |
Examples
const { peripheralList, peripheralEvents, peripheralError,
snapshotVersion, getPeripheralSnapshot, sendPeripheralCommand } = useVemu();
<PeripheralPanel
peripherals={peripheralList}
events={peripheralEvents}
error={peripheralError}
refreshKey={snapshotVersion}
getSnapshot={getPeripheralSnapshot}
sendCommand={sendPeripheralCommand}
/>