vemu.

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.Element

Props

NameTypeDescription
peripheralsstring[]Names of inspectable peripherals reported by the running machine.
eventsPeripheralEvent[]All peripheral events seen so far (passed through to the selected view).
erroroptionalstring | nullBuild/exposure error to surface (instead of a silent empty panel).
refreshKeynumberMonotonic counter that bumps when new events arrive.
getSnapshot(name: string) => PeripheralSnapshot | nullPull the current snapshot for a peripheral by name (null if unavailable).
sendCommand(name: string, cmd: { name: string; params: Record<string, string> }) => voidSend 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}
/>