# gotemzzz/renode_interactive_memory_window architecture

> Architecture diagram of the GitHub repository gotemzzz/renode_interactive_memory_window, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gotemzzz/renode_interactive_memory_window
- Repository: https://github.com/gotemzzz/renode_interactive_memory_window

## Overview

This Electron desktop app starts Renode and presents a small memory window for reading bytes at a searched address. The renderer requests startup, monitor connection, peripheral discovery, and memory reads through a preload IPC bridge; the main process dispatches those requests to the Renode backend. The backend launches Renode, connects to its Telnet monitor, and exchanges commands. Monitor output is logged and extracted before results return to the UI. The tree and sampled source support this workflow, but do not establish broader capabilities beyond the visible memory and peripheral views.

Main entry points: [`src/backend/renode-cli.ts`](https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/backend/renode-cli.ts) (Renode CLI), [`src/main.ts`](https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/main.ts) (IPC handlers), [`src/preload.ts`](https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/preload.ts) (API bridge), [`src/utils/getMonitorOutput.ts`](https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/utils/getMonitorOutput.ts) (Output capture)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Memory UI"]
  node_renderer["Memory window<br/>[renderer.ts]"]
end

subgraph group_electron["Electron IPC"]
  node_preload["API bridge<br/>[preload.ts]"]
  node_main["IPC handlers<br/>[main.ts]"]
end

subgraph group_renode["Renode runtime"]
  node_backend["Renode CLI<br/>[renode-cli.ts]"]
  node_renode_process["Renode process"]
  node_monitor_endpoint["Telnet monitor"]
  node_wait_telnet["Startup detector"]
  node_peripherals["Peripheral parser"]
end

subgraph group_monitor["Monitor output"]
  node_monitor_output["Output capture"]
  node_log["Monitor log<br/>[monitor_output.txt]"]
  node_extract["Block extractor"]
end

node_user(("User"))

node_user -->|"uses"| node_renderer
node_renderer -->|"invokes API"| node_preload
node_preload -->|"IPC invokes"| node_main
node_main -->|"dispatches commands"| node_backend
node_main -->|"parses results"| node_peripherals
node_backend -->|"spawns"| node_renode_process
node_backend -->|"waits for startup"| node_wait_telnet
node_renode_process -->|"stdout signals ready"| node_wait_telnet
node_backend -->|"connects and commands"| node_monitor_endpoint
node_backend -->|"requests output"| node_monitor_output
node_backend -->|"streams socket data"| node_monitor_output
node_monitor_output -->|"writes and reads"| node_log
node_monitor_output -->|"extracts blocks"| node_extract
node_main -->|"requests bytes or peripherals"| node_backend
node_backend -->|"returns command output"| node_peripherals
node_peripherals -->|"returns peripheral list"| node_main
node_main -->|"returns IPC results"| node_preload
node_preload -->|"returns results"| node_renderer

click node_renderer "https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/renderer/renderer.ts"
click node_preload "https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/preload.ts"
click node_main "https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/main.ts"
click node_backend "https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/backend/renode-cli.ts"
click node_wait_telnet "https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/utils/waitForRenodeToStartTelnet.ts"
click node_peripherals "https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/utils/parsePeripherals.ts"
click node_monitor_output "https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/utils/getMonitorOutput.ts"
click node_log "https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/monitor_output.txt"
click node_extract "https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/utils/extractMonitorBlock.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_renderer,node_user toneBlue
class node_preload,node_main toneAmber
class node_backend,node_renode_process,node_monitor_endpoint,node_wait_telnet,node_peripherals toneMint
class node_monitor_output,node_log,node_extract toneRose
```

## Components

### Memory UI

- [Memory window](https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/renderer/renderer.ts): `src/renderer/renderer.ts`

### Electron IPC

- [API bridge](https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/preload.ts): `src/preload.ts`
- [IPC handlers](https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/main.ts): `src/main.ts`

### Renode runtime

- [Renode CLI](https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/backend/renode-cli.ts): `src/backend/renode-cli.ts`
- **Renode process**
- **Telnet monitor**
- [Startup detector](https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/utils/waitForRenodeToStartTelnet.ts): `src/utils/waitForRenodeToStartTelnet.ts`
- [Peripheral parser](https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/utils/parsePeripherals.ts): `src/utils/parsePeripherals.ts`

### Monitor output

- [Output capture](https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/utils/getMonitorOutput.ts): `src/utils/getMonitorOutput.ts`
- [Monitor log](https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/monitor_output.txt): `monitor_output.txt`
- [Block extractor](https://github.com/gotemzzz/renode_interactive_memory_window/blob/main/src/utils/extractMonitorBlock.ts): `src/utils/extractMonitorBlock.ts`

### Other components

- **User**

## Connections

- User → Memory window: uses
- Memory window → API bridge: invokes API
- API bridge → IPC handlers: IPC invokes
- IPC handlers → Renode CLI: dispatches commands
- IPC handlers → Peripheral parser: parses results
- Renode CLI → Renode process: spawns
- Renode CLI → Startup detector: waits for startup
- Renode process → Startup detector: stdout signals ready
- Renode CLI → Telnet monitor: connects and commands
- Renode CLI → Output capture: requests output
- Renode CLI → Output capture: streams socket data
- Output capture → Monitor log: writes and reads
- Output capture → Block extractor: extracts blocks
- IPC handlers → Renode CLI: requests bytes or peripherals
- Renode CLI → Peripheral parser: returns command output
- Peripheral parser → IPC handlers: returns peripheral list
- IPC handlers → API bridge: returns IPC results
- API bridge → Memory window: returns results
