Skip to content

Commit

Permalink
Add IDL view (#230)
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 <[email protected]>

* Refs #21458: Add type IDL viewer

Signed-off-by: Carlosespicur <[email protected]>

* Refs #21458: Add text selection and scrollbar in IDL viewer

Signed-off-by: Carlosespicur <[email protected]>

* Refs #21458: Change margin and tab names in IDL viewer

Signed-off-by: Carlosespicur <[email protected]>

* Refs #21458: Add hover event to display tab full name

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #21458: Add resources to project

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #21458: Add icons in the tabs

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #21611: Add Fast DDS Visualizer resources to project

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #21611: Increase FASTDDS_VISUALIZER icon size

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #21458: Uncrustify

Signed-off-by: Carlosespicur <[email protected]>

* Refs #21459: Fix documentation CI to run only in 'Release' mode

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #21459: Add review comments

Signed-off-by: Carlosespicur <[email protected]>

---------

Signed-off-by: Carlosespicur <[email protected]>
Signed-off-by: JesusPoderoso <[email protected]>
Co-authored-by: JesusPoderoso <[email protected]>
  • Loading branch information
Carlosespicur and JesusPoderoso authored Sep 12, 2024
1 parent 7643942 commit 642ff0a
Show file tree
Hide file tree
Showing 24 changed files with 262 additions and 26 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/reusable-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,6 @@ jobs:

documentation:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
cmake_build_type:
- Release
- Debug

steps:
- name: Sync repository
uses: eProsima/eProsima-CI/external/checkout@v0
Expand All @@ -151,7 +144,7 @@ jobs:
- name: Install Fast DDS dependencies
uses: eProsima/eProsima-CI/multiplatform/install_fastdds_dependencies@v0
with:
cmake_build_type: ${{ matrix.cmake_build_type }}
cmake_build_type: 'Release'

- name: Fetch Fast DDS Monitor repositories
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
Expand Down Expand Up @@ -181,7 +174,7 @@ jobs:
uses: eProsima/eProsima-CI/multiplatform/colcon_build_test@v0
with:
packages_names: fastdds_monitor
cmake_build_type: ${{ matrix.cmake_build_type }}
cmake_build_type: 'Release'
cmake_args: '-DTHIRDPARTY=ON -DBUILD_DOCUMENTATION=ON -DBUILD_DOCUMENTATION_TESTS=ON'
colcon_meta_file: ${{ github.workspace }}/src/fastdds_monitor/.github/workflows/configurations/Linux/colcon.meta
workspace: ${{ github.workspace }}
Expand Down
6 changes: 3 additions & 3 deletions docs/rst/ros/galactic/galactic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Installation from sources
Follow the `ROS 2 galactic installation from sources documentation
<https://docs.ros.org/en/galactic/Installation/Ubuntu-Development-Setup.html>`_
Fast DDS is downloaded within the rest of the packages.
The only consideration here is to compile :code:`fastrtps` library with the Statistics Module activated.
The only consideration here is to compile :code:`fastdds` library with the Statistics Module activated.
When compiling with colcon, the following arguments must be provided:

.. code-block:: bash
Expand Down Expand Up @@ -58,7 +58,7 @@ To execute each of the nodes, run the following commands in different terminals:

.. code-block:: bash
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
export RMW_IMPLEMENTATION=rmw_fastdds_cpp
export FASTDDS_STATISTICS="HISTORY_LATENCY_TOPIC;NETWORK_LATENCY_TOPIC;\
PUBLICATION_THROUGHPUT_TOPIC;SUBSCRIPTION_THROUGHPUT_TOPIC;RTPS_SENT_TOPIC;\
Expand All @@ -71,7 +71,7 @@ To execute each of the nodes, run the following commands in different terminals:
.. code-block:: bash
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
export RMW_IMPLEMENTATION=rmw_fastdds_cpp
export FASTDDS_STATISTICS="HISTORY_LATENCY_TOPIC;NETWORK_LATENCY_TOPIC;\
PUBLICATION_THROUGHPUT_TOPIC;SUBSCRIPTION_THROUGHPUT_TOPIC;RTPS_SENT_TOPIC;\
Expand Down
6 changes: 6 additions & 0 deletions include/fastdds_monitor/Controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,12 @@ public slots:
QString get_domain_view_graph (
QString domain_id);

QString get_type_idl (
QString entity_id);

QString get_data_type_name(
QString entity_id);

signals:

//! Signal to show the Error Dialog
Expand Down
8 changes: 8 additions & 0 deletions include/fastdds_monitor/Engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,14 @@ class Engine : public QQmlApplicationEngine
//! Retrive a string list containing the available data kinds.
std::vector<std::string> get_data_kinds();

//! Retrieve the data type name associated to a specific entity
std::string get_data_type_name(
const backend::EntityId& entity_id);

//! Retrieve the IDL representation associated to a specific data type
std::string get_type_idl(
const backend::EntityId& entity_id);

//! Returns whether the data kind entered requires a target entity to be defined.
bool data_kind_has_target(
const QString& data_kind);
Expand Down
8 changes: 8 additions & 0 deletions include/fastdds_monitor/backend/SyncBackendConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ class SyncBackendConnection
std::string get_alias(
backend::EntityId id);

//! Get the data type name of an entity from the Backend by calling \c get_info
std::string get_data_type_name(
backend::EntityId id);

//! Get the status level of an entity from the Backend by calling \c get_status
StatusLevel get_status(
backend::EntityId id);
Expand Down Expand Up @@ -305,6 +309,10 @@ class SyncBackendConnection
Graph get_domain_view_graph (
const EntityId& domain_id);

//! Retrieve the IDL representation of a topic data type in string format
std::string get_type_idl (
const EntityId& entity_id);

protected:

void change_unit_magnitude(
Expand Down
10 changes: 10 additions & 0 deletions qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@
<file alias="domain_eProsimaLightBlue.svg">resources/images/icons/domain/domain_eProsimaLightBlue.svg</file>
<file alias="domain_grey.svg">resources/images/icons/domain/domain_grey.svg</file>
<file alias="domain_white.svg">resources/images/icons/domain/domain_white.svg</file>
<file alias="domain_graph_black.svg">resources/images/icons/domain_graph/domain_graph_black.svg</file>
<file alias="domain_graph_eProsimaLightBlue.svg">resources/images/icons/domain_graph/domain_graph_eProsimaLightBlue.svg</file>
<file alias="domain_graph_grey.svg">resources/images/icons/domain_graph/domain_graph_grey.svg</file>
<file alias="domain_graph_white.svg">resources/images/icons/domain_graph/domain_graph_white.svg</file>
<file alias="dynamicchart_black.svg">resources/images/icons/dynamicchart/dynamicchart_black.svg</file>
<file alias="dynamicchart_eProsimaLightBlue.svg">resources/images/icons/dynamicchart/dynamicchart_eProsimaLightBlue.svg</file>
<file alias="dynamicchart_grey.svg">resources/images/icons/dynamicchart/dynamicchart_grey.svg</file>
Expand Down Expand Up @@ -157,6 +161,10 @@
<file alias="host_eProsimaLightBlue.svg">resources/images/icons/host/host_eProsimaLightBlue.svg</file>
<file alias="host_grey.svg">resources/images/icons/host/host_grey.svg</file>
<file alias="host_white.svg">resources/images/icons/host/host_white.svg</file>
<file alias="idl_black.svg">resources/images/icons/idl/idl_black.svg</file>
<file alias="idl_eProsimaLightBlue.svg">resources/images/icons/idl/idl_eProsimaLightBlue.svg</file>
<file alias="idl_grey.svg">resources/images/icons/idl/idl_grey.svg</file>
<file alias="idl_white.svg">resources/images/icons/idl/idl_white.svg</file>
<file alias="info_black.svg">resources/images/icons/info/info_black.svg</file>
<file alias="info_eProsimaDarkBlue.svg">resources/images/icons/info/info_eProsimaDarkBlue.svg</file>
<file alias="info_eProsimaLightBlue.svg">resources/images/icons/info/info_eProsimaLightBlue.svg</file>
Expand Down Expand Up @@ -250,6 +258,7 @@
<file alias="FASTDDS.svg">resources/images/app_icons/FASTDDS.svg</file>
<file alias="FASTDDS_MONITOR.svg">resources/images/app_icons/FASTDDS_MONITOR.svg</file>
<file alias="FASTDDS_SPY.svg">resources/images/app_icons/FASTDDS_SPY.svg</file>
<file alias="FASTDDS_VISUALIZER.svg">resources/images/app_icons/FASTDDS_VISUALIZER.svg</file>
<file alias="SAFEDDS.svg">resources/images/app_icons/SAFEDDS.svg</file>
<file alias="SHAPES_DEMO.svg">resources/images/app_icons/SHAPES_DEMO.svg</file>
<file alias="SUSTAINML.svg">resources/images/app_icons/SUSTAINML.svg</file>
Expand All @@ -262,6 +271,7 @@
<file alias="FASTDDS.png">resources/images/app_logos/FASTDDS.png</file>
<file alias="FASTDDS_MONITOR.png">resources/images/app_logos/FASTDDS_MONITOR.png</file>
<file alias="FASTDDS_SPY.png">resources/images/app_logos/FASTDDS_SPY.png</file>
<file alias="FASTDDS_VISUALIZER.png">resources/images/app_logos/FASTDDS_VISUALIZER.png</file>
<file alias="SAFEDDS.png">resources/images/app_logos/SAFEDDS.png</file>
<file alias="SHAPES_DEMO.png">resources/images/app_logos/SHAPES_DEMO.png</file>
<file alias="SUSTAINML.png">resources/images/app_logos/SUSTAINML.png</file>
Expand Down
15 changes: 8 additions & 7 deletions qml/DomainGraphLayout.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Item
required property string component_id // mandatory to be included when object created

// Public signals
signal update_tab_name(string new_name, string stack_id) // Update tab name based on selected domain id
signal update_tab_name(string new_name, string new_icon, string stack_id) // Update tab name based on selected domain id
signal openEntitiesMenu(string domainEntityId, string entityId, string currentAlias, string entityKind)
signal openTopicMenu(string domainEntityId, string domainId, string entityId, string currentAlias, string entityKind)
signal openLoadingGraphDialog() //l et tab layout know that graph is about to be generated
Expand Down Expand Up @@ -1049,13 +1049,14 @@ Item
visible: parent.visible
anchors.horizontalCenter: parent.horizontalCenter
source: modelData["app_id"] == "UNKNOWN_APP" ? "" :
"/resources/images/app_icons/" + modelData["app_id"] + ".svg"
"/resources/images/app_icons/" + modelData["app_id"] + ".svg"
readonly property int amlip_offset_: 5
// AML_IP is wider than it is tall, so its size is increased a little
// bit to make it look like the same aspect ratio as the other icons
sourceSize.width: modelData["app_id"] == "AML_IP"
// It also happens with FASTDDS_VISUALIZER
sourceSize.width: modelData["app_id"] == "AML_IP" || modelData["app_id"] == "FASTDDS_VISUALIZER"
? parent.height + amlip_offset_ : parent.height
sourceSize.height: modelData["app_id"] == "AML_IP"
sourceSize.height: modelData["app_id"] == "AML_IP" || modelData["app_id"] == "FASTDDS_VISUALIZER"
? parent.height + amlip_offset_ : parent.height
}
}
Expand Down Expand Up @@ -1655,7 +1656,7 @@ Item
{
if (filtered_topics_.length == 1)
{
domainGraphLayout.update_tab_name(topic_names[0] + " Topic View", component_id)
domainGraphLayout.update_tab_name(topic_names[0] + " Topic View", "topic", component_id)
}
else
{
Expand All @@ -1669,12 +1670,12 @@ Item
print_topic_names += " and " + topic_names[topic_names.length-1]
}

domainGraphLayout.update_tab_name(print_topic_names + " Topics View", component_id)
domainGraphLayout.update_tab_name(print_topic_names + " Topics View", "topic", component_id)
}
}
else
{
domainGraphLayout.update_tab_name("Domain " + domain_id + " View", component_id)
domainGraphLayout.update_tab_name("Domain " + domain_id + " View", "domain_graph", component_id)
}
}

Expand Down
5 changes: 5 additions & 0 deletions qml/LeftPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ RowLayout {
signal explorerLogicalChanged(bool status)
signal explorerEntityInfoChanged(bool status)
signal open_topic_view(string domainEntityId, string domainId, string entityId)
signal open_idl_view(string entityId)
signal refresh_domain_graph_view(string domainEntityId, string entityId)
signal filter_entity_status_log(string entityId)

Expand Down Expand Up @@ -107,6 +108,10 @@ RowLayout {
leftPanel.open_topic_view(domainEntityId, domainId, entityId)
}

function openIDLView(entityId) {
leftPanel.open_idl_view(entityId)
}

function refreshDomainGraphView(domainEntityId, entityId) {
leftPanel.refresh_domain_graph_view(domainEntityId, entityId)
}
Expand Down
1 change: 1 addition & 0 deletions qml/Panels.qml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ RowLayout {
onOpen_topic_view: tabs.open_topic_view(domainEntityId, domainId, entityId)
onRefresh_domain_graph_view: tabs.refresh_domain_graph_view(domainEntityId, entityId)
onFilter_entity_status_log: statusLayout.filter_entity_status_log(entityId)
onOpen_idl_view: tabs.open_idl_view(entityId)
}

Rectangle {
Expand Down
Loading

0 comments on commit 642ff0a

Please sign in to comment.