# christophemura/tab_hse architecture

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

- Interactive diagram: https://gitdiagram.com/christophemura/tab_hse
- Repository: https://github.com/christophemura/tab_hse

## Overview

TAB_HSE is an embedded camera-and-inference application: it initializes the display/UI and network, starts the model, then streams camera frames to inference; the UI can publish a critical request. The tree also contains substantial ESP-Hosted and video/ISP subsystems, so these appear as supporting capabilities rather than assumed app call chains. The application’s app_video, inference, UI, and network implementations are not present in the supplied tree; connections beyond calls visible in main.c are omitted. The ISP configuration path is supported by the sampled pipeline source.

Main entry points: [`src/main.c`](https://github.com/christophemura/tab_hse/blob/main/src/main.c) (Application startup), [`src`](https://github.com/christophemura/tab_hse/tree/main/src) (Status UI), [`components/esp_hosted/coprocessor/eh_cp_core/src/eh_cp_core.c`](https://github.com/christophemura/tab_hse/blob/main/components/esp_hosted/coprocessor/eh_cp_core/src/eh_cp_core.c) (Coprocessor core), [`components/esp_video/src/esp_video_isp_pipeline.c`](https://github.com/christophemura/tab_hse/blob/main/components/esp_video/src/esp_video_isp_pipeline.c) (ISP pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["TAB HSE app"]
  node_entry["Application startup<br/>[main.c]"]
  node_ui["Status UI"]
  node_network["Network client"]
  node_inference["Inference model"]
end

subgraph group_video["Camera and ISP"]
  node_video_stream["Video capture stream"]
  node_isp_pipeline["ISP pipeline"]
  node_ipa["Image algorithms<br/>[esp_ipa.h]"]
end

subgraph group_hosted["ESP-Hosted connectivity"]
  node_host_core["Host core<br/>[eh_host_core.c]"]
  node_host_linux["Linux host driver<br/>[main.c]"]
  node_rpc_protocol["RPC protocol v2<br/>[gen_v2.c]"]
  node_host_features["Host features"]
end

subgraph group_features["Coprocessor features"]
  node_cp_core["Coprocessor core<br/>[eh_cp_core.c]"]
  node_cp_transport["CP transports"]
  node_wifi_feature["Wi-Fi feature<br/>[eh_cp_feat_wifi.c]"]
  node_rpc_feature["RPC extensions"]
end

node_user(("Operator"))
node_kernel_actor(("Linux network stack"))
node_camera["Camera device"]

node_user -->|"interacts"| node_ui
node_entry -->|"initializes"| node_ui
node_entry -->|"starts"| node_network
node_network -->|"reports status"| node_ui
node_ui -->|"publishes request"| node_network
node_entry -->|"initializes"| node_inference
node_entry -->|"starts stream"| node_video_stream
node_camera -->|"supplies frames"| node_video_stream
node_video_stream -->|"submits frames"| node_inference
node_isp_pipeline -->|"uses metadata"| node_ipa
node_isp_pipeline -->|"configures camera"| node_camera
node_kernel_actor -.->|"uses driver"| node_host_linux
node_host_core -.->|"supports"| node_host_features
node_cp_core -.->|"uses transport"| node_cp_transport
node_cp_core -.->|"hosts feature"| node_wifi_feature
node_cp_core -.->|"hosts extension"| node_rpc_feature
node_rpc_feature -.->|"serializes RPC"| node_rpc_protocol
node_host_features -.->|"exchanges RPC"| node_rpc_protocol

click node_entry "https://github.com/christophemura/tab_hse/blob/main/src/main.c"
click node_ui "https://github.com/christophemura/tab_hse/tree/main/src"
click node_network "https://github.com/christophemura/tab_hse/tree/main/src"
click node_inference "https://github.com/christophemura/tab_hse/tree/main/src"
click node_video_stream "https://github.com/christophemura/tab_hse/tree/main/src"
click node_isp_pipeline "https://github.com/christophemura/tab_hse/blob/main/components/esp_video/src/esp_video_isp_pipeline.c"
click node_ipa "https://github.com/christophemura/tab_hse/blob/main/components/esp_ipa/include/esp_ipa.h"
click node_host_core "https://github.com/christophemura/tab_hse/blob/main/components/esp_hosted/host/eh_host_core/src/eh_host_core.c"
click node_host_linux "https://github.com/christophemura/tab_hse/blob/main/components/esp_hosted/host/linux/eh_host_linux_kmod/driver/src/main.c"
click node_cp_core "https://github.com/christophemura/tab_hse/blob/main/components/esp_hosted/coprocessor/eh_cp_core/src/eh_cp_core.c"
click node_cp_transport "https://github.com/christophemura/tab_hse/tree/main/components/esp_hosted/coprocessor/eh_cp_transport/src"
click node_wifi_feature "https://github.com/christophemura/tab_hse/blob/main/components/esp_hosted/coprocessor/features/eh_cp_feat_wifi/src/eh_cp_feat_wifi.c"
click node_rpc_feature "https://github.com/christophemura/tab_hse/blob/main/components/esp_hosted/coprocessor/features/eh_cp_feat_rpc_ext_v2/src/eh_cp_feat_rpc_ext_v2.c"
click node_rpc_protocol "https://github.com/christophemura/tab_hse/blob/main/components/esp_hosted/common/serializers/eh_proto_v2/src/gen_v2.c"
click node_host_features "https://github.com/christophemura/tab_hse/tree/main/components/esp_hosted/host/features"

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_entry,node_ui,node_network,node_inference toneBlue
class node_video_stream,node_isp_pipeline,node_ipa toneAmber
class node_host_core,node_host_linux,node_rpc_protocol,node_host_features toneMint
class node_cp_core,node_cp_transport,node_wifi_feature,node_rpc_feature toneRose
class node_user,node_kernel_actor,node_camera toneIndigo
```

## Components

### TAB HSE app

- [Application startup](https://github.com/christophemura/tab_hse/blob/main/src/main.c): `src/main.c`
- [Status UI](https://github.com/christophemura/tab_hse/tree/main/src): `src`
- [Network client](https://github.com/christophemura/tab_hse/tree/main/src): `src`
- [Inference model](https://github.com/christophemura/tab_hse/tree/main/src): `src`

### Camera and ISP

- [Video capture stream](https://github.com/christophemura/tab_hse/tree/main/src): `src`
- [ISP pipeline](https://github.com/christophemura/tab_hse/blob/main/components/esp_video/src/esp_video_isp_pipeline.c): `components/esp_video/src/esp_video_isp_pipeline.c`
- [Image algorithms](https://github.com/christophemura/tab_hse/blob/main/components/esp_ipa/include/esp_ipa.h): `components/esp_ipa/include/esp_ipa.h`

### ESP-Hosted connectivity

- [Host core](https://github.com/christophemura/tab_hse/blob/main/components/esp_hosted/host/eh_host_core/src/eh_host_core.c): `components/esp_hosted/host/eh_host_core/src/eh_host_core.c`
- [Linux host driver](https://github.com/christophemura/tab_hse/blob/main/components/esp_hosted/host/linux/eh_host_linux_kmod/driver/src/main.c): `components/esp_hosted/host/linux/eh_host_linux_kmod/driver/src/main.c`
- [RPC protocol v2](https://github.com/christophemura/tab_hse/blob/main/components/esp_hosted/common/serializers/eh_proto_v2/src/gen_v2.c): `components/esp_hosted/common/serializers/eh_proto_v2/src/gen_v2.c`
- [Host features](https://github.com/christophemura/tab_hse/tree/main/components/esp_hosted/host/features): `components/esp_hosted/host/features`

### Coprocessor features

- [Coprocessor core](https://github.com/christophemura/tab_hse/blob/main/components/esp_hosted/coprocessor/eh_cp_core/src/eh_cp_core.c): `components/esp_hosted/coprocessor/eh_cp_core/src/eh_cp_core.c`
- [CP transports](https://github.com/christophemura/tab_hse/tree/main/components/esp_hosted/coprocessor/eh_cp_transport/src): `components/esp_hosted/coprocessor/eh_cp_transport/src`
- [Wi-Fi feature](https://github.com/christophemura/tab_hse/blob/main/components/esp_hosted/coprocessor/features/eh_cp_feat_wifi/src/eh_cp_feat_wifi.c): `components/esp_hosted/coprocessor/features/eh_cp_feat_wifi/src/eh_cp_feat_wifi.c`
- [RPC extensions](https://github.com/christophemura/tab_hse/blob/main/components/esp_hosted/coprocessor/features/eh_cp_feat_rpc_ext_v2/src/eh_cp_feat_rpc_ext_v2.c): `components/esp_hosted/coprocessor/features/eh_cp_feat_rpc_ext_v2/src/eh_cp_feat_rpc_ext_v2.c`

### Other components

- **Operator**
- **Linux network stack**
- **Camera device**

## Connections

- Operator → Status UI: interacts (evidence: `src/main.c`)
- Application startup → Status UI: initializes (evidence: `src/main.c`)
- Application startup → Network client: starts (evidence: `src/main.c`)
- Network client → Status UI: reports status (evidence: `src/main.c`)
- Status UI → Network client: publishes request (evidence: `src/main.c`)
- Application startup → Inference model: initializes (evidence: `src/main.c`)
- Application startup → Video capture stream: starts stream (evidence: `src/main.c`)
- Camera device → Video capture stream: supplies frames (evidence: `src/main.c`)
- Video capture stream → Inference model: submits frames (evidence: `src/main.c`)
- ISP pipeline → Image algorithms: uses metadata (evidence: `components/esp_video/src/esp_video_isp_pipeline.c`)
- ISP pipeline → Camera device: configures camera (evidence: `components/esp_video/src/esp_video_isp_pipeline.c`)
- Linux network stack → Linux host driver: uses driver
- Host core → Host features: supports
- Coprocessor core → CP transports: uses transport
- Coprocessor core → Wi-Fi feature: hosts feature
- Coprocessor core → RPC extensions: hosts extension
- RPC extensions → RPC protocol v2: serializes RPC
- Host features → RPC protocol v2: exchanges RPC
