Skip to content

Commit

Permalink
Fast DDS Monitor refactor: Fast DDS v3 compatibility (#227)
Browse files Browse the repository at this point in the history
* Add minor changes for Monitor compilation using refactored fastdds_statistics_backend

Signed-off-by: Carlosespicur <carlosespicur@proton.me>

* Refs #21446: Add review changes

Signed-off-by: Carlosespicur <carlosespicur@proton.me>

* Refs #21446: Update docs dependencies

Signed-off-by: Carlosespicur <carlosespicur@proton.me>

* Refs #21446: Fix test.yml to add python dependencies

Signed-off-by: Carlosespicur <carlosespicur@proton.me>

* Refs #21446: Fix documentation tests

Signed-off-by: Carlosespicur <carlosespicur@proton.me>

---------

Signed-off-by: Carlosespicur <carlosespicur@proton.me>
  • Loading branch information
Carlosespicur authored Sep 11, 2024
1 parent 93cda02 commit 48d90a1
Show file tree
Hide file tree
Showing 28 changed files with 58 additions and 99 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clang_colcon.meta
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"names":
{
"fastrtps":
"fastdds":
{
"cmake-args":
[
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/configurations/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sphinx==7.3.6
doc8==0.10.1
sphinx_rtd_theme==2.0.0
sphinxcontrib.spelling==8.0.0
sphinxcontrib-imagehelper==1.1.1
GitPython==3.1.41
2 changes: 1 addition & 1 deletion .github/workflows/test_colcon.meta
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"names":
{
"fastrtps":
"fastdds":
{
"cmake-args":
[
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ list(APPEND CMAKE_PREFIX_PATH ${QT_PATH})

find_package(Qt5 5.15 COMPONENTS Core Widgets Gui Qml Quick Charts QuickControls2 REQUIRED)
find_package(fastcdr REQUIRED)
find_package(fastrtps REQUIRED)
find_package(fastdds REQUIRED)
find_package(fastdds_statistics_backend REQUIRED)

foreach(c Core Widgets Gui Quick Qml Charts QuickControls2 Utils)
Expand All @@ -98,7 +98,7 @@ endforeach()
if(${fastcdr_FOUND})
message(STATUS "Fast CDR found!")
endif()
if(${fastrtps_FOUND})
if(${fastdds_FOUND})
message(STATUS "Fast DDS found!")
endif()
if(${fastdds_statistics_backend_FOUND})
Expand Down Expand Up @@ -331,7 +331,7 @@ else()
target_link_libraries(${PROJECT_NAME} PUBLIC
${QT5_LIBRARY_LINKS}
fastcdr
fastrtps
fastdds
fastdds_statistics_backend)

endif()
Expand Down
4 changes: 2 additions & 2 deletions cmake/packaging/Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ if(NOT fastcdr_FOUND)
find_package(fastcdr)
endif()

if(NOT fastrtps_FOUND)
find_package(fastrtps)
if(NOT fastdds_FOUND)
find_package(fastdds)
endif()

include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake)
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def select_css(html_css_dir):
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ sphinx-tabs==3.2.0
sphinx==4.3.1
sphinxcontrib-imagehelper==1.1.1
sphinxcontrib.spelling==7.2.1
Jinja2==3.1
vcstool==0.3.0
2 changes: 1 addition & 1 deletion docs/rst/developer_manual/installation/sources/linux.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The following packages will be installed:

- ``foonathan_memory_vendor``, an STL compatible C++ memory allocator library.
- ``fastcdr``, a C++ library that serializes according to the standard CDR serialization mechanism.
- ``fastrtps``, the core library of eProsima Fast DDS library.
- ``fastdds``, the core library of eProsima Fast DDS library.
- ``fastdds_statistics_backend``, a C++ library that provides a simple and easy-to-use API for interacting with data
from *Fast DDS* statistics module

Expand Down
8 changes: 5 additions & 3 deletions docs/rst/getting_started/entities.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ Refer to `DomainParticipant Fast DDS Documentation
<https://fast-dds.docs.eprosima.com/en/latest/fastdds/dds_layer/domain/domainParticipant/domainParticipant.html>`_
for a more detailed explanation of the *DomainParticipant* entity in DDS.

Each *DomainParticipant* can only communicate under one *Domain* (see :ref:`logical_entities`)
and so it exists a direct connection between each *DomainParticipant* and the *Domain* in which it works.
From image :numref:`fig_entities_diagram` it can be seen that *DomainParticipant* entities are contained in a
Each *DomainParticipant* can only communicate under one *Domain*
(see :ref:`logical entities <logical_entities>` section) and so it exists a direct connection between each
*DomainParticipant* and the *Domain* in which it works.
From the:numref:`entities diagram <fig_entities_diagram>` it can be seen that *DomainParticipant* entities
are contained in a
*Process*, this is because a system process (so-called *Process* entity) executes an application using *Fast DDS*
that instantiates *DomainParticipants*.
The same applies to *DataReaders/DataWriters* instantiated by a *DomainParticipant* belonging to a specific *Process*.
Expand Down
4 changes: 2 additions & 2 deletions docs/rst/getting_started/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ This does not change the Monitor behavior, but would change the data and informa
PDP_PACKETS_TOPIC;EDP_PACKETS_TOPIC;DISCOVERY_TOPIC;PHYSICAL_DATA_TOPIC;\
MONITOR_SERVICE_TOPIC"
./build/fastrtps/examples/C++/DDS/HelloWorldExample/DDSHelloWorldExample subscriber
./build/fastdds/examples/C++/DDS/HelloWorldExample/DDSHelloWorldExample subscriber
where :code:`subscriber` argument creates a *DomainParticipant* with a *DataReader* in the topic
:code:`HelloWorldTopic` in *Domain* :code:`0`.
Expand All @@ -76,7 +76,7 @@ This does not change the Monitor behavior, but would change the data and informa
PDP_PACKETS_TOPIC;EDP_PACKETS_TOPIC;DISCOVERY_TOPIC;PHYSICAL_DATA_TOPIC;\
MONITOR_SERVICE_TOPIC"
./build/fastrtps/examples/C++/DDS/HelloWorldExample/DDSHelloWorldExample publisher 0 500
./build/fastdds/examples/C++/DDS/HelloWorldExample/DDSHelloWorldExample publisher 0 500
where :code:`publisher` argument creates a *DomainParticipant* with a *DataWriter* in the topic
:code:`HelloWorldTopic` in *Domain* :code:`0`.
Expand Down
15 changes: 8 additions & 7 deletions docs/rst/notes/notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@ This release includes the following **dependencies update**:
- New Version
* - Fast CDR
- `eProsima/Fast-CDR <https://github.com/eProsima/Fast-CDR>`_
- `v2.1.2 <https://github.com/eProsima/Fast-CDR/releases/tag/v2.1.2>`_
- `v2.2.0 <https://github.com/eProsima/Fast-CDR/releases/tag/v2.2.0>`_
- `v2.1.2 <https://github.com/eProsima/Fast-CDR/releases/tag/v2.1.2>`__
- `v2.2.0 <https://github.com/eProsima/Fast-CDR/releases/tag/v2.2.0>`__
* - Fast DDS
- `eProsima/Fast-DDS <https://github.com/eProsima/Fast-DDS>`_
- `v2.13.0 <https://github.com/eProsima/Fast-DDS/releases/tag/v2.13.0>`_
- `v2.14.0 <https://github.com/eProsima/Fast-DDS/releases/tag/v2.14.0>`_
- `v2.13.0 <https://github.com/eProsima/Fast-DDS/releases/tag/v2.13.0>`__
- `v2.14.0 <https://github.com/eProsima/Fast-DDS/releases/tag/v2.14.0>`__
* - Fast DDS Statistics Backend
- `eProsima/Fast-DDS-statistics-backend <https://github.com/eProsima/Fast-DDS-statistics-backend>`_
- `v1.0.0 <https://github.com/eProsima/Fast-DDS-statistics-backend/releases/tag/v1.0.0>`_
- `v1.1.0 <https://github.com/eProsima/Fast-DDS-statistics-backend/releases/tag/v1.1.0>`_
- `eProsima/Fast-DDS-statistics-backend <https://github.com/eProsima/Fast-DDS-statistics-backend>`__
- `v1.1.0 <https://github.com/eProsima/Fast-DDS-statistics-backend/releases/tag/v1.1.0>`__
- `v1.0.0 <https://github.com/eProsima/Fast-DDS-statistics-backend/releases/tag/v1.0.0>`__


#################
Previous versions
Expand Down
13 changes: 7 additions & 6 deletions docs/rst/notes/previous_versions/v2.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This release includes the following **features**:

This release includes the following **dependencies update**:

.. _version_v2.0.0:
.. list-table::
:header-rows: 1

Expand All @@ -23,13 +24,13 @@ This release includes the following **dependencies update**:
- New Version
* - Fast CDR
- `eProsima/Fast-CDR <https://github.com/eProsima/Fast-CDR>`_
- `v1.1.0 <https://github.com/eProsima/Fast-CDR/releases/tag/v1.1.0>`_
- `v2.1.2 <https://github.com/eProsima/Fast-CDR/releases/tag/v2.1.2>`_
- `v1.1.0 <https://github.com/eProsima/Fast-CDR/releases/tag/v1.1.0>`__
- `v2.1.2 <https://github.com/eProsima/Fast-CDR/releases/tag/v2.1.2>`__
* - Fast DDS
- `eProsima/Fast-DDS <https://github.com/eProsima/Fast-DDS>`_
- `v2.11.0 <https://github.com/eProsima/Fast-DDS/releases/tag/v2.11.0>`_
- `v2.13.0 <https://github.com/eProsima/Fast-DDS/releases/tag/v2.13.0>`_
- `v2.11.0 <https://github.com/eProsima/Fast-DDS/releases/tag/v2.11.0>`__
- `v2.13.0 <https://github.com/eProsima/Fast-DDS/releases/tag/v2.13.0>`__
* - Fast DDS Statistics Backend
- `eProsima/Fast-DDS-statistics-backend <https://github.com/eProsima/Fast-DDS-statistics-backend>`_
- `v0.11.0 <https://github.com/eProsima/Fast-DDS-statistics-backend/releases/tag/v0.11.0>`_
- `v1.0.0 <https://github.com/eProsima/Fast-DDS-statistics-backend/releases/tag/v1.0.0>`_
- `v0.11.0 <https://github.com/eProsima/Fast-DDS-statistics-backend/releases/tag/v0.11.0>`__
- `v1.0.0 <https://github.com/eProsima/Fast-DDS-statistics-backend/releases/tag/v1.0.0>`__
1 change: 1 addition & 0 deletions docs/rst/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ Todo
unix
walkthrough
wget
numref
10 changes: 5 additions & 5 deletions fastdds_monitor.pro
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ INCLUDEPATH += $$PWD/../../install/fastdds_statistics_backend/include
DEPENDPATH += $$PWD/../../install/fastdds_statistics_backend/include

# Link to the Fast DDS library
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../install/fastrtps/lib/release/ -lfastrtps
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../install/fastrtps/lib/debug/ -lfastrtps
else:unix: LIBS += -L$$PWD/../../install/fastrtps/lib/ -lfastrtps
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../install/fastdds/lib/release/ -lfastdds
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../install/fastdds/lib/debug/ -lfastdds
else:unix: LIBS += -L$$PWD/../../install/fastdds/lib/ -lfastdds

INCLUDEPATH += $$PWD/../../install/fastrtps/include
DEPENDPATH += $$PWD/../../install/fastrtps/include
INCLUDEPATH += $$PWD/../../install/fastdds/include
DEPENDPATH += $$PWD/../../install/fastdds/include

# Link to the Fast CDR library
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../install/fastcdr/lib/release/ -lfastcdr
Expand Down
1 change: 0 additions & 1 deletion include/fastdds_monitor/Controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ public slots:

//! Slot called when initializing a monitor for a Discovery Server network
void init_monitor(
QString discovery_server_guid_prefix,
QString discovery_server_locators);

//! Slot called when a Host entity is pressed
Expand Down
1 change: 0 additions & 1 deletion include/fastdds_monitor/Engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ class Engine : public QQmlApplicationEngine
* @param domain number of the domain
*/
void init_monitor(
QString discovery_server_guid_prefix,
QString discovery_server_locators);

/////
Expand Down
1 change: 0 additions & 1 deletion include/fastdds_monitor/backend/SyncBackendConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ class SyncBackendConnection
* @return EntityId of the new Domain Entity created
*/
EntityId init_monitor(
std::string discovery_server_guid_prefix,
std::string discovery_server_locators);

/////
Expand Down
2 changes: 1 addition & 1 deletion mock/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cmake_minimum_required(VERSION 3.5)
option(BUILD_SHARED_LIBS "Create shared libraries by default" ON)

find_package(fastcdr REQUIRED)
find_package(fastrtps REQUIRED)
find_package(fastdds REQUIRED)
find_package(fastdds_statistics_backend REQUIRED)

###############################################################################
Expand Down
2 changes: 1 addition & 1 deletion mock/complex_mock/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ project(complex-backend-mock)

# Find FastDDS Statistics Backend library
find_package(fastcdr REQUIRED)
find_package(fastrtps REQUIRED)
find_package(fastdds REQUIRED)
find_package(fastdds_statistics_backend REQUIRED)

# Allow to use threads
Expand Down
2 changes: 1 addition & 1 deletion mock/static_mock/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ project(static-backend-mock)

# Find FastDDS Statistics Backend library
find_package(fastcdr REQUIRED)
find_package(fastrtps REQUIRED)
find_package(fastdds REQUIRED)
find_package(fastdds_statistics_backend REQUIRED)

# Allow to use threads
Expand Down
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<url type="repository">https://github.com/eProsima/Fast-DDS-monitor</url>

<depend>fastcdr</depend>
<depend>fastrtps</depend>
<depend>fastdds</depend>
<depend>fastdds_statistics_backend</depend>

<buildtool_depend>cmake</buildtool_depend>
Expand Down
48 changes: 2 additions & 46 deletions qml/InitDSMonitorDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Dialog {
}

onReset: {
discoveryServerGuid.text = "44.53.00.5f.45.50.52.4f.53.49.4d.41"
discoveryServerLocatorsModel.clear()
discoveryServerLocatorsModel.append({"transportProtocolIdx": 0, "ip": "127.0.0.1", "port": 11811})
}
Expand All @@ -57,26 +56,9 @@ Dialog {
anchors.fill: parent

Label {
text: 'Set the GUID and the network addresses (locators) of a Discovery Server.'
text: 'Set the network addresses (locators) of a Discovery Server.'
}

ColumnLayout {
Layout.fillWidth: true
Label {
id: discoveryServerGuidLabel
text: "• Discovery Server GUID: "
InfoToolTip {
text: 'Discovery Server GUID.'
}
}
TextField {
id: discoveryServerGuid
placeholderText: "GUID example: 44.53.00.5f.45.50.52.4f.53.49.4d.41"
implicitWidth: dialogLayout.width
text: "44.53.00.5f.45.50.52.4f.53.49.4d.41"
selectByMouse: true
}
}
GridLayout {
Layout.fillWidth: true
columns: 5
Expand All @@ -85,7 +67,6 @@ Dialog {
Label {
id: discoveryServerLocatorLabel
Layout.columnSpan: parent.columns
text: "• Discovery Server locator(s): "
InfoToolTip {
text: 'Each row defines a locator\n' +
'for the Discovery Server.'
Expand Down Expand Up @@ -310,15 +291,6 @@ Dialog {
onAccepted: initDSMonitorDialog.open()
}

MessageDialog {
id: wrongGuid
title: "Invalid Discovery Server GUID"
icon: StandardIcon.Warning
standardButtons: StandardButton.Retry | StandardButton.Discard
text: "The inserted Discovery Server GUID is not valid."
onAccepted: initDSMonitorDialog.open()
}

MessageDialog {
id: wrongLocator
title: "Invalid Discovery Server Locator"
Expand Down Expand Up @@ -364,14 +336,6 @@ Dialog {
return ipv6re
}

/**
* Returns an regular expression for Discovery Server GUID
*/
function guidRegex() {
var guidRe = /^(([0-9a-fA-F]{1,2}\.){11})([0-9a-fA-F]{1,2})$/
return guidRe
}

/**
* Returns an regular expression that matches any string
*/
Expand All @@ -384,14 +348,6 @@ Dialog {
* Function to parse the input parameter of the initialize monitor dialog for Discovery Server
*/
function initDiscoveryServer() {
/////
// Check that Discovery Server GUID is correct
var guidRe = guidRegex()
if (!guidRe.test(discoveryServerGuid.text)) {
wrongGuid.open()
return
}

/////
// Build the locators
var locators = []
Expand Down Expand Up @@ -448,7 +404,7 @@ Dialog {
return
}

controller.init_monitor(discoveryServerGuid.text, locators.join(';'))
controller.init_monitor(locators.join(';'))
}
}

Expand Down
7 changes: 3 additions & 4 deletions src/Controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <fastdds_monitor/config.h>
#include <fastdds_statistics_backend/config.h>
#include <fastrtps/config.h>
#include <fastdds/config.hpp>

#include <fastdds_monitor/Controller.h>
#include <fastdds_monitor/Engine.h>
Expand All @@ -34,10 +34,9 @@ void Controller::init_monitor(
}

void Controller::init_monitor(
QString discovery_server_guid_prefix,
QString discovery_server_locators)
{
engine_->init_monitor(discovery_server_guid_prefix, discovery_server_locators);
engine_->init_monitor(discovery_server_locators);
}

void Controller::host_click(
Expand Down Expand Up @@ -170,7 +169,7 @@ QtCharts::QVXYModelMapper* Controller::add_statistics_data(

QString Controller::fastdds_version()
{
return utils::to_QString(FASTRTPS_VERSION_STR);
return utils::to_QString(FASTDDS_VERSION_STR);
}

QString Controller::fastdds_statistics_backend_version()
Expand Down
Loading

0 comments on commit 48d90a1

Please sign in to comment.