# chentaotongxue/fast-dds architecture

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

- Interactive diagram: https://gitdiagram.com/chentaotongxue/fast-dds
- Repository: https://github.com/chentaotongxue/fast-dds

## Overview

Fast DDS is a C++ DDS implementation with an RTPS wire-protocol layer. Its principal workflow is a client creating a participant, publishing typed topic data through a writer, and receiving it through a reader on another participant; RTPS handles discovery and communication over configured transports. The graph also preserves documented API layers and substantial subsystems visible in the tree, including dynamic types, security, shared memory, flow control, statistics, and XML profiles. Most implementation files were not sampled, so internal links are limited to documented relationships or explicit source-index references.

Main entry points: [`src/cpp/rtps/participant/RTPSParticipantImpl.hpp`](https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/rtps/participant/RTPSParticipantImpl.hpp) (RTPS Participant), [`src/cpp/fastdds/domain/DomainParticipantImpl.cpp`](https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/fastdds/domain/DomainParticipantImpl.cpp) (Domain Participant), [`src/cpp/rtps/messages/SendBuffersManager.cpp`](https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/rtps/messages/SendBuffersManager.cpp) (Send Buffers), [`include/fastdds/rtps/transport/TransportInterface.hpp`](https://github.com/chentaotongxue/fast-dds/blob/master/include/fastdds/rtps/transport/TransportInterface.hpp) (Transport Layer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dds["DDS API"]
  node_participant["Domain Participant"]
  node_topic["Topics and Types<br/>[TopicImpl.cpp]"]
  node_publisher["Publisher and Writer<br/>[DataWriterImpl.cpp]"]
  node_subscriber["Subscriber and Reader<br/>[DataReaderImpl.cpp]"]
end

subgraph group_rtps["RTPS Communication"]
  node_rtps_participant["RTPS Participant"]
  node_discovery["Endpoint Discovery"]
  node_writer_history[("Writer History")]
  node_reader_history[("Reader History")]
  node_flow_control["Flow Control"]
  node_send_buffers["Send Buffers"]
  node_transport["Transport Layer"]
  node_shared_memory[("Shared Memory")]
  node_security["RTPS Security"]
end

subgraph group_types["Types and Configuration"]
  node_dynamic_types["Dynamic Types"]
  node_type_registry[("Type Registry")]
  node_xml_profiles["XML Profiles"]
end

subgraph group_services["Built-in Services"]
  node_type_lookup["Type Lookup"]
  node_statistics["Statistics"]
end

subgraph group_utilities["Tools"]
  node_discovery_server["Discovery Server CLI<br/>[server.cpp]"]
end

node_application(("DDS Application"))
node_network(("Network Peers"))

node_application -->|"creates"| node_participant
node_application -->|"publishes through"| node_publisher
node_application -->|"subscribes through"| node_subscriber
node_publisher -->|"publishes topic data"| node_topic
node_subscriber -->|"receives topic data"| node_topic
node_participant -.->|"uses RTPS"| node_rtps_participant
node_rtps_participant -->|"enables discovery"| node_discovery
node_rtps_participant -->|"communicates over"| node_transport
node_transport -->|"sends RTPS"| node_network
node_rtps_participant -.->|"configures"| node_flow_control
node_flow_control -.->|"queues samples"| node_send_buffers
node_send_buffers -->|"initializes from"| node_rtps_participant
node_send_buffers -.->|"sends messages"| node_transport
node_transport -.->|"may use"| node_shared_memory
node_rtps_participant -.->|"may secure"| node_security
node_topic -.->|"may use"| node_dynamic_types
node_dynamic_types -.->|"registers types"| node_type_registry
node_participant -.->|"loads profiles"| node_xml_profiles
node_discovery_server -->|"loads profiles"| node_xml_profiles
node_participant -.->|"uses service"| node_type_lookup
node_rtps_participant -.->|"may report metrics"| node_statistics
node_flow_control -->|"uses controller interface"| node_send_buffers

click node_participant "https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/fastdds/domain/DomainParticipantImpl.cpp"
click node_topic "https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/fastdds/topic/TopicImpl.cpp"
click node_publisher "https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/fastdds/publisher/DataWriterImpl.cpp"
click node_subscriber "https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/fastdds/subscriber/DataReaderImpl.cpp"
click node_rtps_participant "https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/rtps/participant/RTPSParticipantImpl.hpp"
click node_discovery "https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/rtps/builtin/BuiltinProtocols.cpp"
click node_writer_history "https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/fastdds/publisher/DataWriterHistory.cpp"
click node_reader_history "https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/fastdds/subscriber/history/DataReaderHistory.cpp"
click node_flow_control "https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp"
click node_send_buffers "https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/rtps/messages/SendBuffersManager.cpp"
click node_transport "https://github.com/chentaotongxue/fast-dds/blob/master/include/fastdds/rtps/transport/TransportInterface.hpp"
click node_shared_memory "https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/rtps/transport/shared_mem/SharedMemManager.hpp"
click node_security "https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/rtps/security/SecurityManager.cpp"
click node_dynamic_types "https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/fastdds/xtypes/dynamic_types/DynamicDataImpl.cpp"
click node_type_registry "https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/fastdds/xtypes/type_representation/TypeObjectRegistry.cpp"
click node_xml_profiles "https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/xmlparser/XMLProfileManager.cpp"
click node_type_lookup "https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/fastdds/builtin/type_lookup_service/TypeLookupManager.cpp"
click node_statistics "https://github.com/chentaotongxue/fast-dds/blob/master/include/fastdds/statistics/rtps/StatisticsCommon.hpp"
click node_discovery_server "https://github.com/chentaotongxue/fast-dds/blob/master/tools/fds/server.cpp"

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_participant,node_topic,node_publisher,node_subscriber toneBlue
class node_rtps_participant,node_discovery,node_writer_history,node_reader_history,node_flow_control,node_send_buffers,node_transport,node_shared_memory,node_security toneAmber
class node_dynamic_types,node_type_registry,node_xml_profiles toneMint
class node_type_lookup,node_statistics toneRose
class node_discovery_server,node_application,node_network toneIndigo
```

## Components

### DDS API

- [Domain Participant](https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/fastdds/domain/DomainParticipantImpl.cpp): `src/cpp/fastdds/domain/DomainParticipantImpl.cpp`
- [Topics and Types](https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/fastdds/topic/TopicImpl.cpp): `src/cpp/fastdds/topic/TopicImpl.cpp`
- [Publisher and Writer](https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/fastdds/publisher/DataWriterImpl.cpp): `src/cpp/fastdds/publisher/DataWriterImpl.cpp`
- [Subscriber and Reader](https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/fastdds/subscriber/DataReaderImpl.cpp): `src/cpp/fastdds/subscriber/DataReaderImpl.cpp`

### RTPS Communication

- [RTPS Participant](https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/rtps/participant/RTPSParticipantImpl.hpp): `src/cpp/rtps/participant/RTPSParticipantImpl.hpp`
- [Endpoint Discovery](https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/rtps/builtin/BuiltinProtocols.cpp): `src/cpp/rtps/builtin/BuiltinProtocols.cpp`
- [Writer History](https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/fastdds/publisher/DataWriterHistory.cpp): `src/cpp/fastdds/publisher/DataWriterHistory.cpp`
- [Reader History](https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/fastdds/subscriber/history/DataReaderHistory.cpp): `src/cpp/fastdds/subscriber/history/DataReaderHistory.cpp`
- [Flow Control](https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp): `src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp`
- [Send Buffers](https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/rtps/messages/SendBuffersManager.cpp): `src/cpp/rtps/messages/SendBuffersManager.cpp`
- [Transport Layer](https://github.com/chentaotongxue/fast-dds/blob/master/include/fastdds/rtps/transport/TransportInterface.hpp): `include/fastdds/rtps/transport/TransportInterface.hpp`
- [Shared Memory](https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/rtps/transport/shared_mem/SharedMemManager.hpp): `src/cpp/rtps/transport/shared_mem/SharedMemManager.hpp`
- [RTPS Security](https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/rtps/security/SecurityManager.cpp): `src/cpp/rtps/security/SecurityManager.cpp`

### Types and Configuration

- [Dynamic Types](https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/fastdds/xtypes/dynamic_types/DynamicDataImpl.cpp): `src/cpp/fastdds/xtypes/dynamic_types/DynamicDataImpl.cpp`
- [Type Registry](https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/fastdds/xtypes/type_representation/TypeObjectRegistry.cpp): `src/cpp/fastdds/xtypes/type_representation/TypeObjectRegistry.cpp`
- [XML Profiles](https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/xmlparser/XMLProfileManager.cpp): `src/cpp/xmlparser/XMLProfileManager.cpp`

### Built-in Services

- [Type Lookup](https://github.com/chentaotongxue/fast-dds/blob/master/src/cpp/fastdds/builtin/type_lookup_service/TypeLookupManager.cpp): `src/cpp/fastdds/builtin/type_lookup_service/TypeLookupManager.cpp`
- [Statistics](https://github.com/chentaotongxue/fast-dds/blob/master/include/fastdds/statistics/rtps/StatisticsCommon.hpp): `include/fastdds/statistics/rtps/StatisticsCommon.hpp`

### Tools

- [Discovery Server CLI](https://github.com/chentaotongxue/fast-dds/blob/master/tools/fds/server.cpp): `tools/fds/server.cpp`

### Other components

- **DDS Application**
- **Network Peers**

## Connections

- DDS Application → Domain Participant: creates (evidence: `README.md`)
- DDS Application → Publisher and Writer: publishes through (evidence: `README.md`)
- DDS Application → Subscriber and Reader: subscribes through (evidence: `README.md`)
- Publisher and Writer → Topics and Types: publishes topic data (evidence: `README.md`)
- Subscriber and Reader → Topics and Types: receives topic data (evidence: `README.md`)
- Domain Participant → RTPS Participant: uses RTPS
- RTPS Participant → Endpoint Discovery: enables discovery (evidence: `README.md`)
- RTPS Participant → Transport Layer: communicates over (evidence: `README.md`)
- Transport Layer → Network Peers: sends RTPS (evidence: `README.md`)
- RTPS Participant → Flow Control: configures
- Flow Control → Send Buffers: queues samples
- Send Buffers → RTPS Participant: initializes from (evidence: `src/cpp/rtps/messages/SendBuffersManager.cpp`)
- Send Buffers → Transport Layer: sends messages
- Transport Layer → Shared Memory: may use
- RTPS Participant → RTPS Security: may secure
- Topics and Types → Dynamic Types: may use
- Dynamic Types → Type Registry: registers types
- Domain Participant → XML Profiles: loads profiles
- Discovery Server CLI → XML Profiles: loads profiles (evidence: `tools/fds/server.cpp`)
- Domain Participant → Type Lookup: uses service
- RTPS Participant → Statistics: may report metrics
- Flow Control → Send Buffers: uses controller interface (evidence: `src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp`)
