# ngxx-fus/zonalarchecu_w_someip architecture

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

- Interactive diagram: https://gitdiagram.com/ngxx-fus/zonalarchecu_w_someip
- Repository: https://github.com/ngxx-fus/zonalarchecu_w_someip

## Overview

This is the Front-ZECU firmware for a scale-model zonal vehicle: it starts concurrent runtime services, communicates over Ethernet using SOME/IP-oriented components, and provides local motor and sensor interfaces. Its domain workflow spans receiving/producing zonal messages, routing control and status by ECU role, sensing distance/location, and driving motors; heartbeat and test services are also configured. A separate Python monitor listens for UDP state packets, decodes sensor/motor data, tracks timing and sequence errors, and plots results. The sampled source confirms service dispatch, routing-table contents, authentication behavior, and monitor parsing; lower-level module wiring is not fully evidenced.

Main entry points: [`components/AppRT/StartUp/Service.c`](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppRT/StartUp/Service.c) (Service startup), [`components/AppComm/EthernetW5500/Module.c`](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppComm/EthernetW5500/Module.c) (Ethernet runtime), [`python_test/CCU_ListenFromZECU.py`](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/python_test/CCU_ListenFromZECU.py) (UDP state monitor), [`components/AppComm/HBridge/Module.c`](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppComm/HBridge/Module.c) (Motor runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Runtime startup"]
  node_firmware["ZECU application<br/>[MainApp.c]"]
  node_services["Service startup<br/>[Service.c]"]
  node_heartbeat["Heartbeat service<br/>[Module.c]"]
  node_testservice["Test service<br/>[TestModule.c]"]
end

subgraph group_network["Communication"]
  node_someip["SOME/IP module<br/>[Module.c]"]
  node_someipcore["SOME/IP packets<br/>[SOMEIP.c]"]
  node_ethruntime["Ethernet runtime<br/>[Module.c]"]
  node_w5500["W5500 driver<br/>[EthernetW5500.c]"]
  node_packetqueue["Packet queue<br/>[PacketQueue.c]"]
  node_routing["Routing policy<br/>[RoutingMatrix.c]"]
  node_syncframe["Sync frames<br/>[SyncFrame.c]"]
end

subgraph group_vehicle["Vehicle I/O"]
  node_motorservice["Motor runtime<br/>[Module.c]"]
  node_hbridge["H-bridge control<br/>[HBridge.c]"]
  node_ultrasonic["Distance sensing<br/>[Module.c]"]
  node_location["Location service<br/>[Module.c]"]
end

subgraph group_foundation["Base and config"]
  node_auth["Node authentication<br/>[NodeAuth.c]"]
  node_config["Communication config<br/>[Comm.c]"]
end

subgraph group_monitor["Monitoring"]
  node_monitor["UDP state monitor"]
  node_plots["Telemetry plots"]
end

node_vehicle_actor(("Vehicle sensors and motors"))
node_network_actor(("Vehicle network"))
node_operator(("Monitor operator"))

node_firmware -->|"initializes"| node_services
node_services -->|"starts task"| node_ethruntime
node_services -->|"starts task"| node_motorservice
node_services -->|"starts task"| node_ultrasonic
node_services -->|"starts task"| node_heartbeat
node_services -->|"starts task"| node_location
node_services -->|"starts task"| node_testservice
node_ethruntime -->|"communicates"| node_network_actor
node_w5500 -->|"Ethernet I/O"| node_network_actor
node_packetqueue -->|"queues packets"| node_ethruntime
node_someip -->|"uses packet logic"| node_someipcore
node_routing -->|"defines ECU directions"| node_network_actor
node_syncframe -->|"frames synchronization data"| node_network_actor
node_motorservice -->|"controls"| node_hbridge
node_hbridge -->|"drives motors"| node_vehicle_actor
node_ultrasonic -->|"reads distance"| node_vehicle_actor
node_location -->|"reads location"| node_vehicle_actor
node_auth -.->|"authenticates nodes"| node_network_actor
node_config -->|"configures communication"| node_ethruntime
node_network_actor -->|"sends UDP state"| node_monitor
node_operator -->|"starts listener"| node_monitor
node_monitor -->|"renders telemetry"| node_plots

click node_firmware "https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/main/MainApp.c"
click node_services "https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppRT/StartUp/Service.c"
click node_heartbeat "https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppRT/HeartBeat/Module.c"
click node_testservice "https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppRT/TestModule/TestModule.c"
click node_someip "https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppRT/SOMEIP/Module.c"
click node_someipcore "https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppRT/SOMEIP/SOMEIP.c"
click node_ethruntime "https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppComm/EthernetW5500/Module.c"
click node_w5500 "https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppComm/EthernetW5500/EthernetW5500.c"
click node_packetqueue "https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppComm/EthernetW5500/PacketQueue.c"
click node_routing "https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppRT/Routing/RoutingMatrix.c"
click node_syncframe "https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppRT/Routing/SyncFrame.c"
click node_motorservice "https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppComm/HBridge/Module.c"
click node_hbridge "https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppComm/HBridge/HBridge.c"
click node_ultrasonic "https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppComm/UltraSonic/Module.c"
click node_location "https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppComm/LocationATGM336H/Module.c"
click node_auth "https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppBase/NodeAuth.c"
click node_config "https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppConfig/Comm/Comm.c"
click node_monitor "https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/python_test/CCU_ListenFromZECU.py"
click node_plots "https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/python_test/CCU_ListenFromZECU.py"

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_firmware,node_services,node_heartbeat,node_testservice toneBlue
class node_someip,node_someipcore,node_ethruntime,node_w5500,node_packetqueue,node_routing,node_syncframe toneAmber
class node_motorservice,node_hbridge,node_ultrasonic,node_location toneMint
class node_auth,node_config toneRose
class node_monitor,node_plots,node_vehicle_actor,node_network_actor,node_operator toneIndigo
```

## Components

### Runtime startup

- [ZECU application](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/main/MainApp.c): `main/MainApp.c`
- [Service startup](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppRT/StartUp/Service.c): `components/AppRT/StartUp/Service.c`
- [Heartbeat service](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppRT/HeartBeat/Module.c): `components/AppRT/HeartBeat/Module.c`
- [Test service](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppRT/TestModule/TestModule.c): `components/AppRT/TestModule/TestModule.c`

### Communication

- [SOME/IP module](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppRT/SOMEIP/Module.c): `components/AppRT/SOMEIP/Module.c`
- [SOME/IP packets](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppRT/SOMEIP/SOMEIP.c): `components/AppRT/SOMEIP/SOMEIP.c`
- [Ethernet runtime](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppComm/EthernetW5500/Module.c): `components/AppComm/EthernetW5500/Module.c`
- [W5500 driver](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppComm/EthernetW5500/EthernetW5500.c): `components/AppComm/EthernetW5500/EthernetW5500.c`
- [Packet queue](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppComm/EthernetW5500/PacketQueue.c): `components/AppComm/EthernetW5500/PacketQueue.c`
- [Routing policy](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppRT/Routing/RoutingMatrix.c): `components/AppRT/Routing/RoutingMatrix.c`
- [Sync frames](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppRT/Routing/SyncFrame.c): `components/AppRT/Routing/SyncFrame.c`

### Vehicle I/O

- [Motor runtime](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppComm/HBridge/Module.c): `components/AppComm/HBridge/Module.c`
- [H-bridge control](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppComm/HBridge/HBridge.c): `components/AppComm/HBridge/HBridge.c`
- [Distance sensing](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppComm/UltraSonic/Module.c): `components/AppComm/UltraSonic/Module.c`
- [Location service](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppComm/LocationATGM336H/Module.c): `components/AppComm/LocationATGM336H/Module.c`

### Base and config

- [Node authentication](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppBase/NodeAuth.c): `components/AppBase/NodeAuth.c`
- [Communication config](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/components/AppConfig/Comm/Comm.c): `components/AppConfig/Comm/Comm.c`

### Monitoring

- [UDP state monitor](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/python_test/CCU_ListenFromZECU.py): `python_test/CCU_ListenFromZECU.py`
- [Telemetry plots](https://github.com/ngxx-fus/zonalarchecu_w_someip/blob/master/python_test/CCU_ListenFromZECU.py): `python_test/CCU_ListenFromZECU.py`

### Other components

- **Vehicle sensors and motors**
- **Vehicle network**
- **Monitor operator**

## Connections

- ZECU application → Service startup: initializes
- Service startup → Ethernet runtime: starts task
- Service startup → Motor runtime: starts task
- Service startup → Distance sensing: starts task
- Service startup → Heartbeat service: starts task
- Service startup → Location service: starts task
- Service startup → Test service: starts task
- Ethernet runtime → Vehicle network: communicates
- W5500 driver → Vehicle network: Ethernet I/O
- Packet queue → Ethernet runtime: queues packets
- SOME/IP module → SOME/IP packets: uses packet logic
- Routing policy → Vehicle network: defines ECU directions
- Sync frames → Vehicle network: frames synchronization data
- Motor runtime → H-bridge control: controls
- H-bridge control → Vehicle sensors and motors: drives motors
- Distance sensing → Vehicle sensors and motors: reads distance
- Location service → Vehicle sensors and motors: reads location
- Node authentication → Vehicle network: authenticates nodes
- Communication config → Ethernet runtime: configures communication
- Vehicle network → UDP state monitor: sends UDP state
- Monitor operator → UDP state monitor: starts listener
- UDP state monitor → Telemetry plots: renders telemetry
