# harshavardhanp1/onewifi architecture

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

- Interactive diagram: https://gitdiagram.com/harshavardhanp1/onewifi
- Repository: https://github.com/harshavardhanp1/onewifi

## Overview

OneWifi is RDK-B’s centralized WiFi management component. Its main workflow accepts configuration through TR-181 or JSON WebConfig, coordinates it through the WiFi manager and control engine, persists state, and applies WiFi operations through the HAL. The graph also preserves documented application capabilities, including mesh, steering, statistics, Blaster, CSI, and CAC. Relationships come from the README and the supplied source index; unsampled implementation details are not inferred.

Main entry points: [`source/apps/wifi_apps_mgr.c`](https://github.com/harshavardhanp1/onewifi/blob/develop/source/apps/wifi_apps_mgr.c) (Application framework), [`source/core/wifi_mgr.c`](https://github.com/harshavardhanp1/onewifi/blob/develop/source/core/wifi_mgr.c) (WiFi manager), [`source/db/wifi_db_apis.c`](https://github.com/harshavardhanp1/onewifi/blob/develop/source/db/wifi_db_apis.c) (WiFi database), [`source/dml/tr_181/ml/cosa_wifi_dml.c`](https://github.com/harshavardhanp1/onewifi/blob/develop/source/dml/tr_181/ml/cosa_wifi_dml.c) (TR-181 DML)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["Configuration interfaces"]
  node_tr181["TR-181 DML<br/>[cosa_wifi_dml.c]"]
  node_webconfig["JSON WebConfig<br/>[wifi_webconfig.c]"]
end

subgraph group_core["Management core"]
  node_manager["WiFi manager<br/>[wifi_mgr.c]"]
  node_control["Control engine"]
end

subgraph group_state["State and platform"]
  node_database[("WiFi database<br/>[wifi_db_apis.c]")]
  node_ovsdb[("OVSDB<br/>[ovsdb.c]")]
end

subgraph group_apps["WiFi applications"]
  node_apps["Application framework<br/>[wifi_apps_mgr.c]"]
  node_mesh["EasyMesh"]
  node_steering["Client steering<br/>[wifi_sta_mgr.c]"]
  node_stats["Statistics<br/>[wifi_stats.c]"]
  node_blaster["Blaster tests<br/>[wifi_blaster.c]"]
  node_csi["CSI analytics"]
  node_cac["Channel availability<br/>[wifi_cac.c]"]
end

node_remote(("Management agents"))
node_cloud(("Cloud services"))
node_psm[("CCSP PSM")]
node_hal["WiFi HAL"]
node_linux["Linux system"]

node_remote -->|"management access"| node_tr181
node_cloud -->|"sends JSON"| node_webconfig
node_tr181 -->|"configures"| node_manager
node_webconfig -->|"configures"| node_manager
node_manager -->|"coordinates"| node_control
node_manager -->|"updates state"| node_database
node_database -->|"persists in"| node_ovsdb
node_database -->|"persists across reboots"| node_psm
node_manager -->|"manages hardware through"| node_hal
node_manager -->|"handles system events"| node_linux
node_manager -->|"coordinates applications"| node_apps
node_apps -->|"hosts"| node_mesh
node_apps -->|"hosts"| node_steering
node_apps -->|"hosts"| node_stats
node_apps -->|"hosts"| node_blaster
node_apps -->|"hosts"| node_csi
node_apps -->|"hosts"| node_cac

click node_tr181 "https://github.com/harshavardhanp1/onewifi/blob/develop/source/dml/tr_181/ml/cosa_wifi_dml.c"
click node_webconfig "https://github.com/harshavardhanp1/onewifi/blob/develop/source/webconfig/wifi_webconfig.c"
click node_manager "https://github.com/harshavardhanp1/onewifi/blob/develop/source/core/wifi_mgr.c"
click node_control "https://github.com/harshavardhanp1/onewifi/blob/develop/source/core/wifi_ctrl_queue_handlers.c"
click node_database "https://github.com/harshavardhanp1/onewifi/blob/develop/source/db/wifi_db_apis.c"
click node_ovsdb "https://github.com/harshavardhanp1/onewifi/blob/develop/lib/ovsdb/ovsdb.c"
click node_apps "https://github.com/harshavardhanp1/onewifi/blob/develop/source/apps/wifi_apps_mgr.c"
click node_mesh "https://github.com/harshavardhanp1/onewifi/blob/develop/source/services/mesh/wifi_service_mesh.c"
click node_steering "https://github.com/harshavardhanp1/onewifi/blob/develop/source/apps/sta_mgr/wifi_sta_mgr.c"
click node_stats "https://github.com/harshavardhanp1/onewifi/blob/develop/source/stats/wifi_stats.c"
click node_blaster "https://github.com/harshavardhanp1/onewifi/blob/develop/source/apps/blaster/wifi_blaster.c"
click node_csi "https://github.com/harshavardhanp1/onewifi/blob/develop/source/apps/csi/wifi_csi_analytics.c"
click node_cac "https://github.com/harshavardhanp1/onewifi/blob/develop/source/apps/cac/wifi_cac.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_tr181,node_webconfig toneBlue
class node_manager,node_control,node_psm toneAmber
class node_database,node_ovsdb toneMint
class node_apps,node_mesh,node_steering,node_stats,node_blaster,node_csi,node_cac toneRose
class node_remote,node_cloud,node_hal,node_linux toneIndigo
```

## Components

### Configuration interfaces

- [TR-181 DML](https://github.com/harshavardhanp1/onewifi/blob/develop/source/dml/tr_181/ml/cosa_wifi_dml.c): `source/dml/tr_181/ml/cosa_wifi_dml.c`
- [JSON WebConfig](https://github.com/harshavardhanp1/onewifi/blob/develop/source/webconfig/wifi_webconfig.c): `source/webconfig/wifi_webconfig.c`

### Management core

- [WiFi manager](https://github.com/harshavardhanp1/onewifi/blob/develop/source/core/wifi_mgr.c): `source/core/wifi_mgr.c`
- [Control engine](https://github.com/harshavardhanp1/onewifi/blob/develop/source/core/wifi_ctrl_queue_handlers.c): `source/core/wifi_ctrl_queue_handlers.c`

### State and platform

- [WiFi database](https://github.com/harshavardhanp1/onewifi/blob/develop/source/db/wifi_db_apis.c): `source/db/wifi_db_apis.c`
- [OVSDB](https://github.com/harshavardhanp1/onewifi/blob/develop/lib/ovsdb/ovsdb.c): `lib/ovsdb/ovsdb.c`

### WiFi applications

- [Application framework](https://github.com/harshavardhanp1/onewifi/blob/develop/source/apps/wifi_apps_mgr.c): `source/apps/wifi_apps_mgr.c`
- [EasyMesh](https://github.com/harshavardhanp1/onewifi/blob/develop/source/services/mesh/wifi_service_mesh.c): `source/services/mesh/wifi_service_mesh.c`
- [Client steering](https://github.com/harshavardhanp1/onewifi/blob/develop/source/apps/sta_mgr/wifi_sta_mgr.c): `source/apps/sta_mgr/wifi_sta_mgr.c`
- [Statistics](https://github.com/harshavardhanp1/onewifi/blob/develop/source/stats/wifi_stats.c): `source/stats/wifi_stats.c`
- [Blaster tests](https://github.com/harshavardhanp1/onewifi/blob/develop/source/apps/blaster/wifi_blaster.c): `source/apps/blaster/wifi_blaster.c`
- [CSI analytics](https://github.com/harshavardhanp1/onewifi/blob/develop/source/apps/csi/wifi_csi_analytics.c): `source/apps/csi/wifi_csi_analytics.c`
- [Channel availability](https://github.com/harshavardhanp1/onewifi/blob/develop/source/apps/cac/wifi_cac.c): `source/apps/cac/wifi_cac.c`

### Other components

- **Management agents**
- **Cloud services**
- **CCSP PSM**
- **WiFi HAL**
- **Linux system**

## Connections

- Management agents → TR-181 DML: management access (evidence: `README`)
- Cloud services → JSON WebConfig: sends JSON (evidence: `README`)
- TR-181 DML → WiFi manager: configures (evidence: `README`)
- JSON WebConfig → WiFi manager: configures (evidence: `README`)
- WiFi manager → Control engine: coordinates (evidence: `README`)
- WiFi manager → WiFi database: updates state (evidence: `README`)
- WiFi database → OVSDB: persists in (evidence: `README`)
- WiFi database → CCSP PSM: persists across reboots (evidence: `README`)
- WiFi manager → WiFi HAL: manages hardware through (evidence: `README`)
- WiFi manager → Linux system: handles system events (evidence: `README`)
- WiFi manager → Application framework: coordinates applications (evidence: `README`)
- Application framework → EasyMesh: hosts (evidence: `README`)
- Application framework → Client steering: hosts (evidence: `README`)
- Application framework → Statistics: hosts (evidence: `README`)
- Application framework → Blaster tests: hosts (evidence: `README`)
- Application framework → CSI analytics: hosts (evidence: `README`)
- Application framework → Channel availability: hosts (evidence: `README`)
