# nemo-lab-repo/cellninjia_asn1_library architecture

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

- Interactive diagram: https://gitdiagram.com/nemo-lab-repo/cellninjia_asn1_library
- Repository: https://github.com/nemo-lab-repo/cellninjia_asn1_library

## Overview

CellNinja is a C library that decodes Qualcomm LTE and NR5G modem diagnostic log packets into ASN.1 representations. The documented workflow maps a log code and version to a decoder, which parses packet fields and decodes message structures; sampled decoders print decoded values. The graph groups the many supported message-specific decoders by radio domain and protocol layer. Evidence is limited to the README and sampled excerpts; unsampled decoder-to-dispatch links are shown only where documented.

Main entry points: [`asn1_group/host.c`](https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/host.c) (Log-code dispatch), [`asn1_group/change_byte_sequence.c`](https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/change_byte_sequence.c) (Byte-order helpers), [`asn1_group/B0C0_v16_1_0_cb_dcall.c`](https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B0C0_v16_1_0_cb_dcall.c) (LTE RRC messages), [`asn1_group/B17D_cb_dcall.c`](https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B17D_cb_dcall.c) (LTE measurements)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dispatch["Dispatch and utilities"]
  node_host["Log-code dispatch<br/>[host.c]"]
  node_metadata["Decoder metadata"]
  node_byteorder["Byte-order helpers"]
end

subgraph group_lte["LTE decoding"]
  node_lte_rlc_pdcp["LTE RLC / PDCP<br/>[B064_cb_dcall.c]"]
  node_lte_rrc["LTE RRC messages"]
  node_lte_measurements["LTE measurements<br/>[B17D_cb_dcall.c]"]
  node_lte_reselection["LTE reselection<br/>[B181_cb_dcall.c]"]
  node_lte_mac_phy["LTE MAC / PHY logs"]
end

subgraph group_nr5g["NR5G decoding"]
  node_nr_nas["NR5G NAS"]
  node_nr_rrc["NR5G RRC<br/>[B821_cb_dcall.c]"]
  node_nr_pdcp_rlc["NR5G PDCP / RLC"]
  node_nr_l2["NR5G L2 data<br/>[B857_cb_dcall.c]"]
  node_nr_mac["NR5G MAC"]
  node_nr_measurements["NR5G measurements<br/>[B97F_cb_dcall.c]"]
  node_nr_dci["NR5G DCI"]
end

node_desktop(("CellNinja desktop"))

node_desktop -->|"loads library"| node_host
node_host -.->|"dispatches"| node_lte_rlc_pdcp
node_host -.->|"dispatches"| node_lte_rrc
node_host -.->|"dispatches"| node_lte_measurements
node_host -.->|"dispatches"| node_lte_reselection
node_host -.->|"dispatches"| node_lte_mac_phy
node_host -.->|"dispatches"| node_nr_nas
node_host -.->|"dispatches"| node_nr_rrc
node_host -.->|"dispatches"| node_nr_pdcp_rlc
node_host -.->|"dispatches"| node_nr_l2
node_host -.->|"dispatches"| node_nr_mac
node_host -.->|"dispatches"| node_nr_measurements
node_host -.->|"dispatches"| node_nr_dci
node_lte_rrc -->|"uses"| node_byteorder
node_lte_measurements -->|"uses"| node_byteorder
node_lte_reselection -->|"uses"| node_byteorder
node_nr_rrc -->|"uses"| node_byteorder
node_nr_l2 -->|"uses"| node_byteorder
node_nr_measurements -->|"uses"| node_byteorder
node_nr_dci -->|"uses"| node_byteorder

click node_host "https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/host.c"
click node_metadata "https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/Metadata_Header_cb_dcall.c"
click node_byteorder "https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/change_byte_sequence.c"
click node_lte_rlc_pdcp "https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B064_cb_dcall.c"
click node_lte_rrc "https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B0C0_v16_1_0_cb_dcall.c"
click node_lte_measurements "https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B17D_cb_dcall.c"
click node_lte_reselection "https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B181_cb_dcall.c"
click node_lte_mac_phy "https://github.com/nemo-lab-repo/cellninjia_asn1_library/tree/main/asn1_group"
click node_nr_nas "https://github.com/nemo-lab-repo/cellninjia_asn1_library/tree/main/asn1_group"
click node_nr_rrc "https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B821_cb_dcall.c"
click node_nr_pdcp_rlc "https://github.com/nemo-lab-repo/cellninjia_asn1_library/tree/main/asn1_group"
click node_nr_l2 "https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B857_cb_dcall.c"
click node_nr_mac "https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B883_v196623_cb_dcall.c"
click node_nr_measurements "https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B97F_cb_dcall.c"
click node_nr_dci "https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B885_v196617_cb_dcall.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_host,node_metadata,node_byteorder toneBlue
class node_lte_rlc_pdcp,node_lte_rrc,node_lte_measurements,node_lte_reselection,node_lte_mac_phy toneAmber
class node_nr_nas,node_nr_rrc,node_nr_pdcp_rlc,node_nr_l2,node_nr_mac,node_nr_measurements,node_nr_dci toneMint
class node_desktop toneIndigo
```

## Components

### Dispatch and utilities

- [Log-code dispatch](https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/host.c): `asn1_group/host.c`
- [Decoder metadata](https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/Metadata_Header_cb_dcall.c): `asn1_group/Metadata_Header_cb_dcall.c`
- [Byte-order helpers](https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/change_byte_sequence.c): `asn1_group/change_byte_sequence.c`

### LTE decoding

- [LTE RLC / PDCP](https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B064_cb_dcall.c): `asn1_group/B064_cb_dcall.c`
- [LTE RRC messages](https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B0C0_v16_1_0_cb_dcall.c): `asn1_group/B0C0_v16_1_0_cb_dcall.c`
- [LTE measurements](https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B17D_cb_dcall.c): `asn1_group/B17D_cb_dcall.c`
- [LTE reselection](https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B181_cb_dcall.c): `asn1_group/B181_cb_dcall.c`
- [LTE MAC / PHY logs](https://github.com/nemo-lab-repo/cellninjia_asn1_library/tree/main/asn1_group): `asn1_group`

### NR5G decoding

- [NR5G NAS](https://github.com/nemo-lab-repo/cellninjia_asn1_library/tree/main/asn1_group): `asn1_group`
- [NR5G RRC](https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B821_cb_dcall.c): `asn1_group/B821_cb_dcall.c`
- [NR5G PDCP / RLC](https://github.com/nemo-lab-repo/cellninjia_asn1_library/tree/main/asn1_group): `asn1_group`
- [NR5G L2 data](https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B857_cb_dcall.c): `asn1_group/B857_cb_dcall.c`
- [NR5G MAC](https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B883_v196623_cb_dcall.c): `asn1_group/B883_v196623_cb_dcall.c`
- [NR5G measurements](https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B97F_cb_dcall.c): `asn1_group/B97F_cb_dcall.c`
- [NR5G DCI](https://github.com/nemo-lab-repo/cellninjia_asn1_library/blob/main/asn1_group/B885_v196617_cb_dcall.c): `asn1_group/B885_v196617_cb_dcall.c`

### Other components

- **CellNinja desktop**

## Connections

- CellNinja desktop → Log-code dispatch: loads library
- Log-code dispatch → LTE RLC / PDCP: dispatches
- Log-code dispatch → LTE RRC messages: dispatches
- Log-code dispatch → LTE measurements: dispatches
- Log-code dispatch → LTE reselection: dispatches
- Log-code dispatch → LTE MAC / PHY logs: dispatches (evidence: `asn1_group/host.c`)
- Log-code dispatch → NR5G NAS: dispatches (evidence: `asn1_group/host.c`)
- Log-code dispatch → NR5G RRC: dispatches
- Log-code dispatch → NR5G PDCP / RLC: dispatches (evidence: `asn1_group/host.c`)
- Log-code dispatch → NR5G L2 data: dispatches
- Log-code dispatch → NR5G MAC: dispatches
- Log-code dispatch → NR5G measurements: dispatches
- Log-code dispatch → NR5G DCI: dispatches
- LTE RRC messages → Byte-order helpers: uses (evidence: `asn1_group/B0C0_v16_1_0_cb_dcall.c`)
- LTE measurements → Byte-order helpers: uses (evidence: `asn1_group/B17D_cb_dcall.c`)
- LTE reselection → Byte-order helpers: uses (evidence: `asn1_group/B181_cb_dcall.c`)
- NR5G RRC → Byte-order helpers: uses (evidence: `asn1_group/B821_cb_dcall.c`)
- NR5G L2 data → Byte-order helpers: uses (evidence: `asn1_group/B857_cb_dcall.c`)
- NR5G measurements → Byte-order helpers: uses (evidence: `asn1_group/B97F_cb_dcall.c`)
- NR5G DCI → Byte-order helpers: uses (evidence: `asn1_group/B885_v196617_cb_dcall.c`)
