Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/docker/ddsenabler/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ RUN mkdir src && \
cd src/ddspipe && git checkout ${ddspipe_branch} && cd ../.. && \
cd src/ddsenabler && git checkout ${ddsenabler_branch} && cd ../.. && \
cp -r src/fastdds/examples/cpp/configuration src/. && \
colcon build --packages-skip ddsenabler --event-handlers console_direct+ --cmake-args -DLOG_INFO=ON -DSECURITY=ON && \
colcon build --packages-skip ddsenabler ddsenabler_docs --event-handlers console_direct+ --cmake-args -DLOG_INFO=ON -DSECURITY=ON && \
colcon build --packages-select ddsenabler --event-handlers console_direct+ --cmake-args -DLOG_INFO=ON -DCOMPILE_EXAMPLES=ON

COPY run.bash /root/run.bash
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ log/
.vscode

### Documentation ###
docs/rst/_static/css/online_eprosima_rtd_theme.css

ddsenabler_docs/docs/_static/css/eprosima-furo.css
ddsenabler_docs/docs/_static/eprosima-logo-white.png
ddsenabler_docs/docs/_templates/sidebar/commercial-support.html

### Python ###
# Precompile files
Expand Down
65 changes: 64 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,64 @@
# FIWARE-DDS-Enabler
[![DDS Enabler](resources/images/github_banner_ddsenabler.png)](https://eprosima.com/middleware/tools/fiware-dds-enabler)

<br>

<div class="menu" align="center">
<strong>
<a href="https://eprosima.com/index.php/downloads-all">Download</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="https://dds-enabler.readthedocs.io/en/latest/">Docs</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="https://eprosima.com/index.php/company-all/news">News</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="https://x.com/EProsima">X</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="mailto:info@eprosima.com">Contact Us</a>
</strong>
</div>

<br><br>

<div class="badges" align="center">
<a href="https://opensource.org/licenses/Apache-2.0"><img alt="License" src="https://img.shields.io/github/license/eProsima/FIWARE-DDS-Enabler.svg"/></a>
<a href="https://github.com/eProsima/FIWARE-DDS-Enabler/releases"><img alt="Releases" src="https://img.shields.io/github/v/release/eProsima/FIWARE-DDS-Enabler?sort=semver"/></a>
<a href="https://github.com/eProsima/FIWARE-DDS-Enabler/issues"><img alt="Issues" src="https://img.shields.io/github/issues/eProsima/FIWARE-DDS-Enabler.svg"/></a>
<a href="https://github.com/eProsima/FIWARE-DDS-Enabler/network/members"><img alt="Forks" src="https://img.shields.io/github/forks/eProsima/FIWARE-DDS-Enabler.svg"/></a>
<a href="https://github.com/eProsima/FIWARE-DDS-Enabler/stargazers"><img alt="Stars" src="https://img.shields.io/github/stars/eProsima/FIWARE-DDS-Enabler.svg"/></a>
<br>
<a href="https://dds-enabler.readthedocs.io"><img alt="Documentation badge" src="https://img.shields.io/readthedocs/dds-enabler.svg"/></a>
<a href="https://github.com/eProsima/FIWARE-DDS-Enabler/actions/workflows/nightly-windows-ci.yml"><img alt="Windows CI" src="https://img.shields.io/github/actions/workflow/status/eProsima/FIWARE-DDS-Enabler/nightly-windows-ci.yml?label=Windows%20CI"></a>
<a href="https://github.com/eProsima/FIWARE-DDS-Enabler/actions/workflows/nightly-ubuntu-ci.yml"><img alt="Ubuntu CI" src="https://img.shields.io/github/actions/workflow/status/eProsima/FIWARE-DDS-Enabler/nightly-ubuntu-ci.yml?label=Ubuntu%20CI"></a>
</div>

<br><br>

*eProsima DDS Enabler* is a modular middleware solution that bridges DDS networks and FIWARE NGSI-LD Context Brokers, providing real-time, bidirectional interoperability. It manages all required DDS participants, auto-discovers topics and types, and seamlessly routes DDS samples into NGSI-LD entities and context updates back into DDS topics.

**Key features**
- **Unified DDS Participant Management**
Auto-create and discover DomainParticipants, Publishers, Subscribers, Topics and Types without manual code.
- **Flexible YAML Configuration**
Fine-tune QoS, network filters, topic allow-listing/deny-listing and discovery via a human-readable YAML file.
- **Dynamic Types via XTypes**
Leverage [OMG DDS-XTypes 1.3](https://www.omg.org/spec/DDS-XTypes/1.3) and Fast DDS serialization utilities for runtime type registration and discovery.
- **Core Engine Powered by DDS-Pipe**
Built on [eProsima DDS Pipe](https://github.com/eProsima/DDS-Pipe), ensuring low-latency, high-throughput payload forwarding and reliable discovery across distributed systems.
- **Serialization Utilities**
Convert DDS data to JSON and vice versa for REST integration and to human-readable IDL.
- **Bidirectional FIWARE Integration**
Routes DDS samples to NGSI-LD Context Brokers and injects context updates back into DDS topics.

## Commercial support

Looking for commercial support? Write us to info@eprosima.com

Find more about us at [eProsima’s webpage](https://eprosima.com/).

## Documentation

Explore the full user and developer guide hosted on ReadTheDocs:

- [Introduction](https://dds-enabler.readthedocs.io/en/latest/rst/02-formalia/titlepage.html)
- [Project Overview](https://dds-enabler.readthedocs.io/en/latest/rst/getting_started/project_overview.html)
- [User Manual](https://dds-enabler.readthedocs.io/en/latest/rst/user_manual/context_broker_interface.html)
- [API Reference](https://dds-enabler.readthedocs.io/en/latest/rst/ddsenabler/api_reference/api_reference.html)
1 change: 0 additions & 1 deletion ddsenabler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,3 @@ endif()
# Install package
eprosima_packaging()


3 changes: 3 additions & 0 deletions ddsenabler/project_settings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
set(MODULE_NAME
ddsenabler)

set(MODULE_NAME_LARGE
"eProsima DDS Enabler Library")

set(MODULE_SUMMARY
"C++ application to run a DDS Enabler from a YAML configuration file.")

Expand Down
160 changes: 160 additions & 0 deletions ddsenabler_docs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
# Copyright 2025 Proyectos y Sistemas de Mantenimiento SL (eProsima).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 3.20)

# Done this to set machine architecture and be able to call cmake_utils
enable_language(CXX)

###############################################################################
# Find package cmake_utils
###############################################################################
# Package cmake_utils is required to get every cmake macro needed
find_package(cmake_utils REQUIRED)

###############################################################################
# Project
###############################################################################
# Configure project by info set in project_settings.cmake
# - Load project_settings variables
# - Read version
# - Set installation paths
configure_project()

# Call explicitly project
project(
${MODULE_NAME}
VERSION
${MODULE_VERSION}
DESCRIPTION
${MODULE_DESCRIPTION}
)


####################################################################################################
# Build Doxygen documentation
####################################################################################################
if (BUILD_DOCS)
find_package(ddsenabler REQUIRED)
get_target_property(ENABLER_INCLUDE_DIR ddsenabler INTERFACE_INCLUDE_DIRECTORIES)

find_package(ddsenabler_participants REQUIRED)
get_target_property(PARTICIPANTS_INCLUDE_DIR ddsenabler_participants INTERFACE_INCLUDE_DIRECTORIES)

message(STATUS "DDS Enabler include directories: ${ENABLER_INCLUDE_DIR} ; ${PARTICIPANTS_INCLUDE_DIR}")
set(SRC_FILE "${PARTICIPANTS_INCLUDE_DIR}/ddsenabler_participants/CBCallbacks.hpp")
set(DST_DIR "${ENABLER_INCLUDE_DIR}/ddsenabler")
file(COPY ${SRC_FILE} DESTINATION ${DST_DIR})
# Collect all public headers
file(GLOB_RECURSE HPP_FILES
"${ENABLER_INCLUDE_DIR}/ddsenabler/**/*.h*"
)

find_package(Doxygen REQUIRED)
# Create doxygen directories
add_custom_target(doc-dirs
COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/doxygen
COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/html
COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/html/doxygen
COMMENT "Creating documentation directories" VERBATIM)

# Doxygen related variables
set(DOXYGEN_INPUT_DIR
"${ENABLER_INCLUDE_DIR}/ddsenabler"
)
# convert CMake list (;) to space-separated for Doxygen
string(REPLACE ";" " " DOXYGEN_INPUT_DIR "${DOXYGEN_INPUT_DIR}")

set(DOXYGEN_OUTPUT_DIR "${PROJECT_BINARY_DIR}/doxygen")
set(DOXYGEN_INDEX_FILE "${PROJECT_BINARY_DIR}/doxygen/xml/index.xml")
set(DOXYFILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/code/Doxyfile.in")
set(DOXYFILE_OUT ${PROJECT_BINARY_DIR}/Doxyfile)

# Configure doxygen
configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY)

# Doxygen command
add_custom_command(OUTPUT ${DOXYGEN_INDEX_FILE}
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_OUT}
DEPENDS ${HPP_FILES}
MAIN_DEPENDENCY ${DOXYFILE_OUT} ${DOXYFILE_IN}
COMMENT "Generating doxygen documentation")

# Generate API reference
add_custom_target(doxygen ALL
DEPENDS ${DOXYGEN_INDEX_FILE}
COMMENT "Generated API documentation with doxygen" VERBATIM)
add_dependencies(doxygen doc-dirs)

# Install doxygen generated XML files
install(DIRECTORY ${PROJECT_BINARY_DIR}/doxygen/xml
DESTINATION doxygen)


####################################################################################################
# Find Sphinx
####################################################################################################
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/code/cmake" ${CMAKE_MODULE_PATH})
find_package(Sphinx REQUIRED)

####################################################################################################
# Build Sphinx documentation
####################################################################################################
# It is possible to build and run tests without generating the documentation output. This saves time
# while developing, since generating the documentation from the RSTs takes quite some time.
set(SPHINX_SOURCE "${CMAKE_SOURCE_DIR}/docs")

# CMake project always build the documentaion using HTML builder. Users can always build with
# other builders using sphinx directly
set(DDSENABLER_DOCS_BUILDER html)

# Generate the sphinx documentation
add_custom_target(Sphinx ALL
COMMAND
${SPHINX_EXECUTABLE}
$<$<BOOL:${CMAKE_COMPILE_WARNING_AS_ERROR}>:-W>
-b ${DDSENABLER_DOCS_BUILDER}
# Tell Breathe where to find the Doxygen output
-D breathe_projects.DDSEnabler=${DOXYGEN_OUTPUT_DIR}/xml
-d "${PROJECT_BINARY_DIR}/doctrees"
${SPHINX_SOURCE}
${PROJECT_BINARY_DIR}/${DDSENABLER_DOCS_BUILDER}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS doxygen
COMMENT "Generating documentation with Sphinx")

# Install the generated docs
install(DIRECTORY ${PROJECT_BINARY_DIR}/${DDSENABLER_DOCS_BUILDER}
DESTINATION .
COMPONENT ${DDSENABLER_DOCS_BUILDER}
PATTERN ".buildinfo" EXCLUDE)
set(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "DDS Enabler docs ${DDSENABLER_DOCS_BUILDER}")
set(CPACK_COMPONENT_EXAMPLES_DESCRIPTION
"eProsima DDS Enabler documetation in ${DDSENABLER_DOCS_BUILDER} format")
set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} ${DDSENABLER_DOCS_BUILDER})
endif()

###############################################################################
# Test
###############################################################################
# Compile tests if CMake options requires it
compile_test_documentation(
"${PROJECT_SOURCE_DIR}/test" # Test directory
)

###############################################################################
# Packaging
###############################################################################
# Install package
eprosima_packaging()
59 changes: 59 additions & 0 deletions ddsenabler_docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# eProsima DDS Enabler docs

This package generates the DDS Enabler documentation.
[Here](https://eprosima-dds-enabler.readthedocs.io/en/latest/) it can be seen the online documentation hosted in
[readthedocs](https://readthedocs.org/).
This packages is powered by [sphinx](https://www.sphinx-doc.org/en/master/).

---

## Documentation generation

### Dependencies

Before being able to build the documentation, some dependencies need to be installed:

```bash
sudo apt update
sudo apt install -y \
doxygen \
python3 \
python3-pip \
python3-venv \
python3-sphinxcontrib.spelling \
imagemagick
pip3 install -U -r src/ddsenabler/docs/requirements.txt
```

### Build documentation

In order to install this package independently, use the following command:

```bash
colcon build --packages-select ddsenabler_docs
```

To generate the documentation locally, build the docs package with the docs flag enabled: `BUILD_DOCS`

```bash
colcon build --packages-select ddsenabler_docs --cmake-args -DBUILD_DOCS=ON
```

Once the build completes, the generated HTML files can be found under `build/ddsenabler_docs/html`


In order to compile and execute the package **tests**, a specific CMake option is required: `BUILD_DOCS_TESTS`.

```bash
colcon build --packages-select ddsenabler_docs --cmake-args -DBUILD_DOCS_TESTS=ON
colcon test --packages-select ddsenabler_docs --event-handler console_direct+
```

---

## Library documentation

This documentation is focused on the user manual for installing and working with DDS Enabler.
To learn about the repository structure, design decisions, development guidelines, etc.,
each package is documented separately and the source code is commented using Doxygen format.
In directory `.dev` there is a generic `README.md` with the main information needed by a developer.
1 change: 1 addition & 0 deletions ddsenabler_docs/code/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmake_minimum_required(VERSION 3.20)
Loading
Loading