# likhith-g/capstone-cv2x-ids architecture

> Architecture diagram of the GitHub repository likhith-g/capstone-cv2x-ids, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/likhith-g/capstone-cv2x-ids
- Repository: https://github.com/likhith-g/capstone-cv2x-ids

## Overview

CV2X-IDS generates a vehicular sidelink misbehavior dataset, analyzes when receiver cooperation can detect false positions, and presents the findings in an offline booth site. The main research workflow runs simulated traffic and attacks, records radio and message observations, builds analysis inputs, evaluates pooled detection and geometry, then exports figures and site data. The graph also includes federated evaluation and the live replay. Some analysis and web wiring is documented in the README but its implementation was not sampled; those limits are reflected in the edges.

Main entry points: [`simulation/cv2xids/model/its-station-app.cc`](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/simulation/cv2xids/model/its-station-app.cc) (ITS station app), [`analysis/build_features.py`](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/analysis/build_features.py) (Feature extraction), [`analysis/pooled_consensus.py`](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/analysis/pooled_consensus.py) (Receiver pooling), [`web/js/deck.js`](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/web/js/deck.js) (Walkthrough site)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_simulation["Traffic simulation"]
  node_traffic["Highway dynamics"]
  node_station["ITS station app<br/>[its-station-app.cc]"]
  node_message["ITS messages"]
  node_monitor["Channel monitor"]
  node_instrumentation["Radio trace capture<br/>[cv2x-ids-helper.cc]"]
  node_trace_store[("Trace storage")]
end

subgraph group_analysis["Detection research"]
  node_features["Feature extraction<br/>[build_features.py]"]
  node_pooling["Receiver pooling"]
  node_detection["Detection floor<br/>[offset_floor.py]"]
  node_geometry["Geometry analysis<br/>[geometry_bound.py]"]
  node_federated["Federated evaluation<br/>[federated.py]"]
  node_figure_export["Research figures<br/>[make_figures.py]"]
  node_site_export["Site data export<br/>[make_site_data.py]"]
  node_live_export["Replay export"]
end

subgraph group_presentation["Booth presentation"]
  node_booth["Walkthrough site<br/>[deck.js]"]
  node_live_monitor["Live traffic monitor<br/>[live.js]"]
  node_site_data["Booth data<br/>[facts.js]"]
  node_live_data["Replay data<br/>[drive1.js]"]
end

node_researcher(("Researcher"))

node_station -->|"reads dynamics"| node_traffic
node_station -->|"reads channel state"| node_monitor
node_station -.->|"sends messages"| node_message
node_instrumentation -->|"writes traces"| node_trace_store
node_traffic -.->|"updates vehicle state"| node_station
node_instrumentation -->|"installs monitors"| node_monitor
node_researcher -.->|"runs analysis"| node_features
node_trace_store -.->|"supplies run logs"| node_features
node_features -.->|"builds inputs"| node_pooling
node_pooling -.->|"tests pooled evidence"| node_detection
node_pooling -->|"informs geometry study"| node_geometry
node_features -.->|"provides features"| node_federated
node_researcher -.->|"generates figures"| node_figure_export
node_researcher -.->|"exports site data"| node_site_export
node_researcher -.->|"exports replay"| node_live_export
node_site_export -->|"generates numbers"| node_site_data
node_live_export -->|"generates replay"| node_live_data
node_site_data -.->|"feeds walkthrough"| node_booth
node_live_data -.->|"feeds replay"| node_live_monitor
node_researcher -->|"views findings"| node_booth
node_researcher -->|"views traffic"| node_live_monitor
node_figure_export -.->|"supports presentation"| node_booth

click node_traffic "https://github.com/likhith-g/capstone-cv2x-ids/blob/main/simulation/cv2xids/model/highway-traffic-model.cc"
click node_station "https://github.com/likhith-g/capstone-cv2x-ids/blob/main/simulation/cv2xids/model/its-station-app.cc"
click node_message "https://github.com/likhith-g/capstone-cv2x-ids/blob/main/simulation/cv2xids/model/its-message-header.h"
click node_monitor "https://github.com/likhith-g/capstone-cv2x-ids/blob/main/simulation/cv2xids/model/sl-channel-monitor.h"
click node_instrumentation "https://github.com/likhith-g/capstone-cv2x-ids/blob/main/simulation/cv2xids/helper/cv2x-ids-helper.cc"
click node_trace_store "https://github.com/likhith-g/capstone-cv2x-ids/blob/main/simulation/cv2xids/model/cv2x-trace-store.cc"
click node_features "https://github.com/likhith-g/capstone-cv2x-ids/blob/main/analysis/build_features.py"
click node_pooling "https://github.com/likhith-g/capstone-cv2x-ids/blob/main/analysis/pooled_consensus.py"
click node_detection "https://github.com/likhith-g/capstone-cv2x-ids/blob/main/analysis/offset_floor.py"
click node_geometry "https://github.com/likhith-g/capstone-cv2x-ids/blob/main/analysis/geometry_bound.py"
click node_federated "https://github.com/likhith-g/capstone-cv2x-ids/blob/main/analysis/federated.py"
click node_figure_export "https://github.com/likhith-g/capstone-cv2x-ids/blob/main/analysis/make_figures.py"
click node_site_export "https://github.com/likhith-g/capstone-cv2x-ids/blob/main/analysis/make_site_data.py"
click node_live_export "https://github.com/likhith-g/capstone-cv2x-ids/blob/main/analysis/make_live_export.py"
click node_booth "https://github.com/likhith-g/capstone-cv2x-ids/blob/main/web/js/deck.js"
click node_live_monitor "https://github.com/likhith-g/capstone-cv2x-ids/blob/main/web/js/live.js"
click node_site_data "https://github.com/likhith-g/capstone-cv2x-ids/blob/main/web/data/facts.js"
click node_live_data "https://github.com/likhith-g/capstone-cv2x-ids/blob/main/web/data/drive1.js"

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_traffic,node_station,node_message,node_monitor,node_instrumentation,node_trace_store toneBlue
class node_features,node_pooling,node_detection,node_geometry,node_federated,node_figure_export,node_site_export,node_live_export toneAmber
class node_booth,node_live_monitor,node_site_data,node_live_data toneMint
class node_researcher toneIndigo
```

## Components

### Traffic simulation

- [Highway dynamics](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/simulation/cv2xids/model/highway-traffic-model.cc): `simulation/cv2xids/model/highway-traffic-model.cc`
- [ITS station app](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/simulation/cv2xids/model/its-station-app.cc): `simulation/cv2xids/model/its-station-app.cc`
- [ITS messages](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/simulation/cv2xids/model/its-message-header.h): `simulation/cv2xids/model/its-message-header.h`
- [Channel monitor](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/simulation/cv2xids/model/sl-channel-monitor.h): `simulation/cv2xids/model/sl-channel-monitor.h`
- [Radio trace capture](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/simulation/cv2xids/helper/cv2x-ids-helper.cc): `simulation/cv2xids/helper/cv2x-ids-helper.cc`
- [Trace storage](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/simulation/cv2xids/model/cv2x-trace-store.cc): `simulation/cv2xids/model/cv2x-trace-store.cc`

### Detection research

- [Feature extraction](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/analysis/build_features.py): `analysis/build_features.py`
- [Receiver pooling](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/analysis/pooled_consensus.py): `analysis/pooled_consensus.py`
- [Detection floor](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/analysis/offset_floor.py): `analysis/offset_floor.py`
- [Geometry analysis](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/analysis/geometry_bound.py): `analysis/geometry_bound.py`
- [Federated evaluation](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/analysis/federated.py): `analysis/federated.py`
- [Research figures](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/analysis/make_figures.py): `analysis/make_figures.py`
- [Site data export](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/analysis/make_site_data.py): `analysis/make_site_data.py`
- [Replay export](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/analysis/make_live_export.py): `analysis/make_live_export.py`

### Booth presentation

- [Walkthrough site](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/web/js/deck.js): `web/js/deck.js`
- [Live traffic monitor](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/web/js/live.js): `web/js/live.js`
- [Booth data](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/web/data/facts.js): `web/data/facts.js`
- [Replay data](https://github.com/likhith-g/capstone-cv2x-ids/blob/main/web/data/drive1.js): `web/data/drive1.js`

### Other components

- **Researcher**

## Connections

- ITS station app → Highway dynamics: reads dynamics
- ITS station app → Channel monitor: reads channel state
- ITS station app → ITS messages: sends messages
- Radio trace capture → Trace storage: writes traces (evidence: `simulation/cv2xids/helper/cv2x-ids-helper.cc`)
- Highway dynamics → ITS station app: updates vehicle state
- Radio trace capture → Channel monitor: installs monitors
- Researcher → Feature extraction: runs analysis
- Trace storage → Feature extraction: supplies run logs
- Feature extraction → Receiver pooling: builds inputs
- Receiver pooling → Detection floor: tests pooled evidence
- Receiver pooling → Geometry analysis: informs geometry study (evidence: `analysis/geometry_bound.py`)
- Feature extraction → Federated evaluation: provides features
- Researcher → Research figures: generates figures
- Researcher → Site data export: exports site data
- Researcher → Replay export: exports replay
- Site data export → Booth data: generates numbers (evidence: `README.md`)
- Replay export → Replay data: generates replay (evidence: `README.md`)
- Booth data → Walkthrough site: feeds walkthrough
- Replay data → Live traffic monitor: feeds replay
- Researcher → Walkthrough site: views findings (evidence: `README.md`)
- Researcher → Live traffic monitor: views traffic (evidence: `README.md`)
- Research figures → Walkthrough site: supports presentation
