# covesa/open1722 architecture

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

- Interactive diagram: https://gitdiagram.com/covesa/open1722
- Repository: https://github.com/covesa/open1722

## Overview

Open1722 is a C library for composing and parsing IEEE 1722 AVTP protocol data units (PDUs), including audio/video streams and automotive control-bus messages. A typical application initializes format headers, sets fields and payloads, then exchanges the resulting bytes through its own transport; parsing reverses that use of the format APIs. The README documents AAF PCM, CRF, CVF video, RVF, standard ACF formats, and custom VSS. The tree and sampled sources support the format/API map, but not a library-owned networking pipeline.

Main entry points: [`src/avtp/CommonHeader.c`](https://github.com/covesa/open1722/blob/main/src/avtp/CommonHeader.c) (Common Header), [`include/avtp/Udp.h`](https://github.com/covesa/open1722/blob/main/include/avtp/Udp.h) (UDP Header), [`include/avtp/Crf.h`](https://github.com/covesa/open1722/blob/main/include/avtp/Crf.h) (CRF Timing), [`include/avtp/aaf/Pcm.h`](https://github.com/covesa/open1722/blob/main/include/avtp/aaf/Pcm.h) (AAF PCM Audio)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Shared AVTP"]
  node_common["Common Header<br/>[CommonHeader.c]"]
  node_utils["Field Utilities<br/>[Utils.c]"]
  node_udp["UDP Header<br/>[Udp.h]"]
end

subgraph group_stream["Media Streams"]
  node_crf["CRF Timing<br/>[Crf.h]"]
  node_aaf["AAF PCM Audio<br/>[Pcm.h]"]
  node_cvf["CVF Video<br/>[Cvf.h]"]
  node_rvf["Raw Video<br/>[Rvf.h]"]
end

subgraph group_acf["Standard ACF"]
  node_tscf["TSCF Envelope<br/>[Tscf.h]"]
  node_ntscf["NTSCF Envelope<br/>[Ntscf.h]"]
  node_can["CAN Formats<br/>[Can.h]"]
  node_canv2["CAN V2 Formats<br/>[CanV2.h]"]
  node_canbrief["CAN Brief Formats<br/>[CanBrief.h]"]
  node_canxl["CAN-XL Formats<br/>[CanXl.h]"]
  node_canxlbrief["CAN-XL Brief<br/>[CanXlBrief.h]"]
  node_otheracf["Other ACF Formats"]
end

subgraph group_custom["Custom Formats"]
  node_vss["VSS Serialization<br/>[Vss.c]"]
  node_vssbrief["VSS Brief<br/>[VssBrief.c]"]
end

node_app(("Application"))
node_wire["PDU Bytes"]

node_app -->|"sets fields"| node_common
node_app -.->|"initializes"| node_udp
node_app -->|"builds or parses"| node_crf
node_app -->|"builds or parses"| node_aaf
node_app -->|"builds or parses"| node_cvf
node_app -->|"builds or parses"| node_rvf
node_app -->|"builds or parses"| node_tscf
node_app -->|"builds or parses"| node_ntscf
node_app -->|"builds or parses"| node_can
node_app -->|"builds or parses"| node_canv2
node_app -->|"builds or parses"| node_canbrief
node_app -->|"builds or parses"| node_canxl
node_app -->|"builds or parses"| node_canxlbrief
node_app -->|"builds or parses"| node_otheracf
node_app -.->|"builds or parses"| node_vss
node_app -.->|"builds or parses"| node_vssbrief
node_common -->|"gets and sets fields"| node_utils
node_app -->|"supplies or reads"| node_wire
node_udp -.->|"encapsulates"| node_wire
node_crf -->|"encodes or parses"| node_wire
node_aaf -->|"encodes or parses"| node_wire
node_cvf -->|"encodes or parses"| node_wire
node_rvf -->|"encodes or parses"| node_wire
node_tscf -->|"encodes or parses"| node_wire
node_ntscf -->|"encodes or parses"| node_wire
node_can -->|"encodes or parses"| node_wire
node_canv2 -->|"encodes or parses"| node_wire
node_canbrief -->|"encodes or parses"| node_wire
node_canxl -->|"encodes or parses"| node_wire
node_canxlbrief -->|"encodes or parses"| node_wire
node_otheracf -->|"encodes or parses"| node_wire
node_vss -.->|"serializes or reads"| node_wire
node_vssbrief -.->|"encodes or parses"| node_wire

click node_common "https://github.com/covesa/open1722/blob/main/src/avtp/CommonHeader.c"
click node_utils "https://github.com/covesa/open1722/blob/main/src/avtp/Utils.c"
click node_udp "https://github.com/covesa/open1722/blob/main/include/avtp/Udp.h"
click node_crf "https://github.com/covesa/open1722/blob/main/include/avtp/Crf.h"
click node_aaf "https://github.com/covesa/open1722/blob/main/include/avtp/aaf/Pcm.h"
click node_cvf "https://github.com/covesa/open1722/blob/main/include/avtp/cvf/Cvf.h"
click node_rvf "https://github.com/covesa/open1722/blob/main/include/avtp/Rvf.h"
click node_tscf "https://github.com/covesa/open1722/blob/main/include/avtp/acf/Tscf.h"
click node_ntscf "https://github.com/covesa/open1722/blob/main/include/avtp/acf/Ntscf.h"
click node_can "https://github.com/covesa/open1722/blob/main/include/avtp/acf/Can.h"
click node_canv2 "https://github.com/covesa/open1722/blob/main/include/avtp/acf/CanV2.h"
click node_canbrief "https://github.com/covesa/open1722/blob/main/include/avtp/acf/CanBrief.h"
click node_canxl "https://github.com/covesa/open1722/blob/main/include/avtp/acf/CanXl.h"
click node_canxlbrief "https://github.com/covesa/open1722/blob/main/include/avtp/acf/CanXlBrief.h"
click node_otheracf "https://github.com/covesa/open1722/tree/main/include/avtp/acf"
click node_vss "https://github.com/covesa/open1722/blob/main/src/avtp/acf/custom/Vss.c"
click node_vssbrief "https://github.com/covesa/open1722/blob/main/src/avtp/acf/custom/VssBrief.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_common,node_utils,node_udp toneBlue
class node_crf,node_aaf,node_cvf,node_rvf toneAmber
class node_tscf,node_ntscf,node_can,node_canv2,node_canbrief,node_canxl,node_canxlbrief,node_otheracf toneMint
class node_vss,node_vssbrief toneRose
class node_app,node_wire toneIndigo
```

## Components

### Shared AVTP

- [Common Header](https://github.com/covesa/open1722/blob/main/src/avtp/CommonHeader.c): `src/avtp/CommonHeader.c`
- [Field Utilities](https://github.com/covesa/open1722/blob/main/src/avtp/Utils.c): `src/avtp/Utils.c`
- [UDP Header](https://github.com/covesa/open1722/blob/main/include/avtp/Udp.h): `include/avtp/Udp.h`

### Media Streams

- [CRF Timing](https://github.com/covesa/open1722/blob/main/include/avtp/Crf.h): `include/avtp/Crf.h`
- [AAF PCM Audio](https://github.com/covesa/open1722/blob/main/include/avtp/aaf/Pcm.h): `include/avtp/aaf/Pcm.h`
- [CVF Video](https://github.com/covesa/open1722/blob/main/include/avtp/cvf/Cvf.h): `include/avtp/cvf/Cvf.h`
- [Raw Video](https://github.com/covesa/open1722/blob/main/include/avtp/Rvf.h): `include/avtp/Rvf.h`

### Standard ACF

- [TSCF Envelope](https://github.com/covesa/open1722/blob/main/include/avtp/acf/Tscf.h): `include/avtp/acf/Tscf.h`
- [NTSCF Envelope](https://github.com/covesa/open1722/blob/main/include/avtp/acf/Ntscf.h): `include/avtp/acf/Ntscf.h`
- [CAN Formats](https://github.com/covesa/open1722/blob/main/include/avtp/acf/Can.h): `include/avtp/acf/Can.h`
- [CAN V2 Formats](https://github.com/covesa/open1722/blob/main/include/avtp/acf/CanV2.h): `include/avtp/acf/CanV2.h`
- [CAN Brief Formats](https://github.com/covesa/open1722/blob/main/include/avtp/acf/CanBrief.h): `include/avtp/acf/CanBrief.h`
- [CAN-XL Formats](https://github.com/covesa/open1722/blob/main/include/avtp/acf/CanXl.h): `include/avtp/acf/CanXl.h`
- [CAN-XL Brief](https://github.com/covesa/open1722/blob/main/include/avtp/acf/CanXlBrief.h): `include/avtp/acf/CanXlBrief.h`
- [Other ACF Formats](https://github.com/covesa/open1722/tree/main/include/avtp/acf): `include/avtp/acf`

### Custom Formats

- [VSS Serialization](https://github.com/covesa/open1722/blob/main/src/avtp/acf/custom/Vss.c): `src/avtp/acf/custom/Vss.c`
- [VSS Brief](https://github.com/covesa/open1722/blob/main/src/avtp/acf/custom/VssBrief.c): `src/avtp/acf/custom/VssBrief.c`

### Other components

- **Application**
- **PDU Bytes**

## Connections

- Application → Common Header: sets fields
- Application → UDP Header: initializes
- Application → CRF Timing: builds or parses
- Application → AAF PCM Audio: builds or parses
- Application → CVF Video: builds or parses
- Application → Raw Video: builds or parses
- Application → TSCF Envelope: builds or parses
- Application → NTSCF Envelope: builds or parses
- Application → CAN Formats: builds or parses
- Application → CAN V2 Formats: builds or parses
- Application → CAN Brief Formats: builds or parses
- Application → CAN-XL Formats: builds or parses
- Application → CAN-XL Brief: builds or parses
- Application → Other ACF Formats: builds or parses
- Application → VSS Serialization: builds or parses
- Application → VSS Brief: builds or parses
- Common Header → Field Utilities: gets and sets fields
- Application → PDU Bytes: supplies or reads
- UDP Header → PDU Bytes: encapsulates
- CRF Timing → PDU Bytes: encodes or parses
- AAF PCM Audio → PDU Bytes: encodes or parses
- CVF Video → PDU Bytes: encodes or parses
- Raw Video → PDU Bytes: encodes or parses
- TSCF Envelope → PDU Bytes: encodes or parses
- NTSCF Envelope → PDU Bytes: encodes or parses
- CAN Formats → PDU Bytes: encodes or parses
- CAN V2 Formats → PDU Bytes: encodes or parses
- CAN Brief Formats → PDU Bytes: encodes or parses
- CAN-XL Formats → PDU Bytes: encodes or parses
- CAN-XL Brief → PDU Bytes: encodes or parses
- Other ACF Formats → PDU Bytes: encodes or parses
- VSS Serialization → PDU Bytes: serializes or reads
- VSS Brief → PDU Bytes: encodes or parses
