# harsha-vardhan-katuri/packet-based_image_projector_firmware architecture

> Architecture diagram of the GitHub repository harsha-vardhan-katuri/packet-based_image_projector_firmware, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harsha-vardhan-katuri/packet-based_image_projector_firmware
- Repository: https://github.com/harsha-vardhan-katuri/packet-based_image_projector_firmware

## Overview

This is a host-side toy projector firmware simulation. Its workflow is: the simulator supplies prerecorded packet frames, the receiver delegates validation to the packet parser, and forwards valid payload bytes to the ASCII-art renderer; invalid packets are reported and dropped. The principal runtime layers are the frame-driving entry point, packet receiver, protocol parser, and image output. Header interfaces are represented with their implementation nodes. The README documents the simulation and rendering capabilities; no separate hardware display, transport, or persistent image store is implemented in the sampled runtime.

Main entry points: [`src/receiver.c`](https://github.com/harsha-vardhan-katuri/packet-based_image_projector_firmware/blob/main/src/receiver.c) (Packet receiver), [`src/main.c`](https://github.com/harsha-vardhan-katuri/packet-based_image_projector_firmware/blob/main/src/main.c) (Frame simulator), [`src/image.c`](https://github.com/harsha-vardhan-katuri/packet-based_image_projector_firmware/blob/main/src/image.c) (ASCII renderer), [`src/packet.c`](https://github.com/harsha-vardhan-katuri/packet-based_image_projector_firmware/blob/main/src/packet.c) (Packet parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_simulation["Simulation"]
  node_simulator["Frame simulator<br/>[main.c]"]
end

subgraph group_protocol["Packet handling"]
  node_receiver["Packet receiver<br/>[receiver.c]"]
  node_parser["Packet parser<br/>[packet.c]"]
end

subgraph group_rendering["Image rendering"]
  node_renderer["ASCII renderer<br/>[image.c]"]
end

node_host(("Host launch"))
node_terminal["Terminal"]

node_host -->|"runs simulation"| node_simulator
node_simulator -->|"submits frames"| node_receiver
node_receiver -->|"parses packet"| node_parser
node_receiver -->|"forwards payload"| node_renderer
node_renderer -->|"prints bytes"| node_terminal

click node_simulator "https://github.com/harsha-vardhan-katuri/packet-based_image_projector_firmware/blob/main/src/main.c"
click node_receiver "https://github.com/harsha-vardhan-katuri/packet-based_image_projector_firmware/blob/main/src/receiver.c"
click node_parser "https://github.com/harsha-vardhan-katuri/packet-based_image_projector_firmware/blob/main/src/packet.c"
click node_renderer "https://github.com/harsha-vardhan-katuri/packet-based_image_projector_firmware/blob/main/src/image.c"

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_simulator toneBlue
class node_receiver,node_parser toneAmber
class node_renderer toneMint
class node_host,node_terminal toneIndigo
```

## Components

### Simulation

- [Frame simulator](https://github.com/harsha-vardhan-katuri/packet-based_image_projector_firmware/blob/main/src/main.c): `src/main.c`

### Packet handling

- [Packet receiver](https://github.com/harsha-vardhan-katuri/packet-based_image_projector_firmware/blob/main/src/receiver.c): `src/receiver.c`
- [Packet parser](https://github.com/harsha-vardhan-katuri/packet-based_image_projector_firmware/blob/main/src/packet.c): `src/packet.c`

### Image rendering

- [ASCII renderer](https://github.com/harsha-vardhan-katuri/packet-based_image_projector_firmware/blob/main/src/image.c): `src/image.c`

### Other components

- **Host launch**
- **Terminal**

## Connections

- Host launch → Frame simulator: runs simulation (evidence: `README.md`)
- Frame simulator → Packet receiver: submits frames (evidence: `src/main.c`)
- Packet receiver → Packet parser: parses packet (evidence: `src/receiver.c`)
- Packet receiver → ASCII renderer: forwards payload (evidence: `src/receiver.c`)
- ASCII renderer → Terminal: prints bytes (evidence: `src/image.c`)
