diff --git a/.github/workflows/reusable-workflow.yml b/.github/workflows/reusable-workflow.yml index ed364f3e..e6d95e84 100644 --- a/.github/workflows/reusable-workflow.yml +++ b/.github/workflows/reusable-workflow.yml @@ -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 @@ -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 @@ -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 }} diff --git a/docs/rst/ros/galactic/galactic.rst b/docs/rst/ros/galactic/galactic.rst index d23cef8a..a20f7e48 100644 --- a/docs/rst/ros/galactic/galactic.rst +++ b/docs/rst/ros/galactic/galactic.rst @@ -20,7 +20,7 @@ Installation from sources Follow the `ROS 2 galactic installation from sources documentation `_ 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 @@ -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;\ @@ -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;\ diff --git a/include/fastdds_monitor/Controller.h b/include/fastdds_monitor/Controller.h index e2cb20eb..c43f9ee4 100644 --- a/include/fastdds_monitor/Controller.h +++ b/include/fastdds_monitor/Controller.h @@ -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 diff --git a/include/fastdds_monitor/Engine.h b/include/fastdds_monitor/Engine.h index 862394bb..0185f0fe 100644 --- a/include/fastdds_monitor/Engine.h +++ b/include/fastdds_monitor/Engine.h @@ -526,6 +526,14 @@ class Engine : public QQmlApplicationEngine //! Retrive a string list containing the available data kinds. std::vector 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); diff --git a/include/fastdds_monitor/backend/SyncBackendConnection.h b/include/fastdds_monitor/backend/SyncBackendConnection.h index 023ad6ac..bf7bf2bd 100644 --- a/include/fastdds_monitor/backend/SyncBackendConnection.h +++ b/include/fastdds_monitor/backend/SyncBackendConnection.h @@ -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); @@ -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( diff --git a/qml.qrc b/qml.qrc index 8091aea8..d34f60a4 100644 --- a/qml.qrc +++ b/qml.qrc @@ -108,6 +108,10 @@ resources/images/icons/domain/domain_eProsimaLightBlue.svg resources/images/icons/domain/domain_grey.svg resources/images/icons/domain/domain_white.svg + resources/images/icons/domain_graph/domain_graph_black.svg + resources/images/icons/domain_graph/domain_graph_eProsimaLightBlue.svg + resources/images/icons/domain_graph/domain_graph_grey.svg + resources/images/icons/domain_graph/domain_graph_white.svg resources/images/icons/dynamicchart/dynamicchart_black.svg resources/images/icons/dynamicchart/dynamicchart_eProsimaLightBlue.svg resources/images/icons/dynamicchart/dynamicchart_grey.svg @@ -157,6 +161,10 @@ resources/images/icons/host/host_eProsimaLightBlue.svg resources/images/icons/host/host_grey.svg resources/images/icons/host/host_white.svg + resources/images/icons/idl/idl_black.svg + resources/images/icons/idl/idl_eProsimaLightBlue.svg + resources/images/icons/idl/idl_grey.svg + resources/images/icons/idl/idl_white.svg resources/images/icons/info/info_black.svg resources/images/icons/info/info_eProsimaDarkBlue.svg resources/images/icons/info/info_eProsimaLightBlue.svg @@ -250,6 +258,7 @@ resources/images/app_icons/FASTDDS.svg resources/images/app_icons/FASTDDS_MONITOR.svg resources/images/app_icons/FASTDDS_SPY.svg + resources/images/app_icons/FASTDDS_VISUALIZER.svg resources/images/app_icons/SAFEDDS.svg resources/images/app_icons/SHAPES_DEMO.svg resources/images/app_icons/SUSTAINML.svg @@ -262,6 +271,7 @@ resources/images/app_logos/FASTDDS.png resources/images/app_logos/FASTDDS_MONITOR.png resources/images/app_logos/FASTDDS_SPY.png + resources/images/app_logos/FASTDDS_VISUALIZER.png resources/images/app_logos/SAFEDDS.png resources/images/app_logos/SHAPES_DEMO.png resources/images/app_logos/SUSTAINML.png diff --git a/qml/DomainGraphLayout.qml b/qml/DomainGraphLayout.qml index 6cc819c0..3f5a0705 100644 --- a/qml/DomainGraphLayout.qml +++ b/qml/DomainGraphLayout.qml @@ -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 @@ -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 } } @@ -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 { @@ -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) } } diff --git a/qml/LeftPanel.qml b/qml/LeftPanel.qml index 35a7435c..61da7c0c 100644 --- a/qml/LeftPanel.qml +++ b/qml/LeftPanel.qml @@ -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) @@ -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) } diff --git a/qml/Panels.qml b/qml/Panels.qml index 5e80df17..0dd5141d 100644 --- a/qml/Panels.qml +++ b/qml/Panels.qml @@ -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 { diff --git a/qml/TabLayout.qml b/qml/TabLayout.qml index 905d4c8a..002cb058 100644 --- a/qml/TabLayout.qml +++ b/qml/TabLayout.qml @@ -34,15 +34,16 @@ Item { // Private properties property int current_: 0 // current tab displayed property int last_index_: 1 // force unique idx on QML components - property var tab_model_: [{"idx":0, "title":"New Tab", "stack_id": 0}] // tab model for tab bad and tab management + property var tab_model_: [{"idx":0, "title":"New Tab", "icon":"", "stack_id": 0}] // tab model for tab bad and tab management property bool disable_chart_selection_: false // flag to disable multiple chart view tabs readonly property var allowed_stack_components_: // list of allowed component names to be - ["view_selector", "chartsLayout", "domainGraphLayout_component"]// loaded in the tabs stack view + ["view_selector", "chartsLayout", "domainGraphLayout_component", "idlView_component"] // loaded in the tabs stack view // private signals signal open_domain_view_(int stack_id, int entity_id, int domain_id) signal initialize_domain_view_(int stack_id, int entity_id, int domain_id) signal filter_domain_view_by_topic_(int stack_id, int domain_entity_id, string topic_id) + signal display_idl_content_(int stack_id, string content) // Read only design properties readonly property int max_tabs_: 15 @@ -51,10 +52,17 @@ Item { readonly property int tabs_height_: 36 readonly property int tabs_margins_: 15 readonly property int tab_icons_size_: 16 + readonly property int tab_icons_margins_: 8 readonly property int add_tab_width_: 50 readonly property int timer_ms_interval_: 500 readonly property int dialog_width_: 300 readonly property int dialog_height_: 152 + readonly property int idl_text_margin_: 30 + readonly property int hover_text_offset_: 50 + readonly property int elements_spacing_: 5 + readonly property int scrollbar_min_size_: 8 + readonly property int scrollbar_max_size_: 12 + readonly property real scroll_speed_: 0.05 readonly property string selected_tab_color_: "#ffffff" readonly property string selected_shadow_tab_color_: "#c0c0c0" readonly property string not_selected_tab_color_: "#f0f0f0" @@ -91,7 +99,8 @@ Item { property int stack_id: 0 property string customInitialItem: "view_selector" initialItem: customInitialItem == "chartsLayout" ? chartsLayout : - customInitialItem == "domainGraphLayout_component" ? domainGraphLayout_component : view_selector + customInitialItem == "domainGraphLayout_component" ? domainGraphLayout_component : + customInitialItem == "idlView_component" ? idlView_component : view_selector // override push transition to none pushEnter: Transition {} @@ -145,6 +154,7 @@ Item { if (!disable_chart_selection_) { tabLayout.tab_model_[current_]["title"] = "Chart View" + tabLayout.tab_model_[current_]["icon"] = "dynamicchart" if (stack.deep > 1) { stack.pop() @@ -222,6 +232,7 @@ Item { if (tabLayout.tab_model_[i]["stack_id"] == stack_id) { tabLayout.tab_model_[i]["title"] = new_name + tabLayout.tab_model_[i]["icon"] = new_icon // update model to set the visual change tab_list.model = tabLayout.tab_model_ @@ -279,6 +290,99 @@ Item { } } + Component { + id: idlView_component + Flickable + { + id: idlView + clip: true + boundsBehavior: Flickable.StopAtBounds + interactive: false + anchors.fill: parent + width: parent.width + height: parent.height + contentWidth: parent.width + contentHeight: idl_text.height + 2 * tabLayout.idl_text_margin_ + ScrollBar.vertical: ScrollBar { + id: vertical_bar + policy: ScrollBar.AlwaysOn + visible: idlView.contentHeight > idlView.height + stepSize: tabLayout.scroll_speed_ + anchors.top: parent.top; anchors.topMargin: 0 + anchors.right: parent.right; + hoverEnabled: true + + contentItem: Item { + implicitWidth: scrollbar_min_size_ + Rectangle { + anchors.fill: parent + anchors.topMargin: 1 + anchors.rightMargin: 2 + anchors.leftMargin: 2 + radius: width / 2 + color: vertical_bar.pressed ? Theme.eProsimaLightBlue : Theme.lightGrey + } + } + + background: Item { + implicitWidth: scrollbar_max_size_ + Rectangle { + anchors.fill: parent + color: vertical_bar.pressed ? Theme.lightGrey : Theme.grey + } + } + + Rectangle { + anchors.top: parent.top + height: 1 + width: parent.width + color: vertical_bar.pressed ? Theme.lightGrey : Theme.grey + } + } + + MouseArea { + anchors.fill: parent + onWheel: { + if(wheel.angleDelta.y > 0){ + vertical_bar.decrease() + }else{ + vertical_bar.increase() + } + } + } + + TextEdit + { + id: idl_text + text: "" + anchors.left: parent.left + anchors.top: parent.top + anchors.leftMargin: tabLayout.idl_text_margin_ + anchors.rightMargin: tabLayout.idl_text_margin_ + anchors.topMargin: tabLayout.idl_text_margin_ + width: parent.width - 2 * tabLayout.idl_text_margin_ + wrapMode: TextEdit.WrapAnywhere + + // Enable text selection in the view + readOnly: true + selectByMouse: true + selectByKeyboard: true + Connections + { + target: tabLayout + + function onDisplay_idl_content_(stack_id, content) + { + if (stack.stack_id == stack_id) + { + idl_text.text = content + } + } + } + } + } + } + Connections { target: tabLayout @@ -333,10 +437,20 @@ Item { GradientStop { position: 0.96; color: delegated_rect.color } GradientStop { position: 1.0; color: current_ == modelData["idx"] + 1 ? shadow_color : delegated_rect.color} } + // tab icon + IconSVG { + id: tab_icon + visible: modelData["title"] != "New Tab" && modelData["icon"] != "" + anchors.left: parent.left + anchors.leftMargin: tab_icons_margins_ + anchors.verticalCenter: parent.verticalCenter + name: modelData["icon"] + size: tab_icons_size_ + } Text { horizontalAlignment: Qt.AlignLeft; verticalAlignment: Qt.AlignVCenter - anchors.left: parent.left - anchors.leftMargin: tabs_margins_ + anchors.left: tab_icon.right + anchors.leftMargin: tab_icons_margins_ anchors.right: close_icon.visible ? close_icon.left : parent.right anchors.rightMargin: tabs_margins_ anchors.verticalCenter: parent.verticalCenter @@ -353,8 +467,20 @@ Item { name: "cross" size: tab_icons_size_ } + Label { + id: hover_label + visible: false + anchors.top: delegated_rect.bottom + anchors.topMargin: tabLayout.hover_text_offset_ + anchors.horizontalCenter: delegated_rect.horizontalCenter + ToolTip.text: modelData["title"] + ToolTip.visible: mouse_area.containsMouse + } + // tab selection action MouseArea { + id: mouse_area + hoverEnabled: true anchors.top: parent.top; anchors.bottom: parent.bottom; anchors.left: parent.left; anchors.right: close_icon.left; anchors.rightMargin: - tabs_margins_ onClicked: { @@ -403,9 +529,19 @@ Item { name: "plus" size: tab_icons_size_ } + Label { + visible: false + anchors.top: add_new_tab_button.bottom + anchors.topMargin: tabLayout.hover_text_offset_ + anchors.horizontalCenter: add_new_tab_button.horizontalCenter + ToolTip.text: "Add new tab" + ToolTip.visible: add_tab_mouse_area.containsMouse + } // add new tab action MouseArea { + id: add_tab_mouse_area anchors.fill: parent + hoverEnabled: true onClicked: { if (tabLayout.tab_model_.length < max_tabs_) tabLayout.create_new_tab() @@ -562,7 +698,7 @@ Item { initial_component = "view_selector"; } var idx = tabLayout.tab_model_.length - tabLayout.tab_model_[idx] = {"idx" : idx, "title": "New Tab", "stack_id":last_index_} + tabLayout.tab_model_[idx] = {"idx" : idx, "title": "New Tab", "icon":"", "stack_id":last_index_} var new_stack = stack_component.createObject(null, { "stack_id": tabLayout.tab_model_[idx]["stack_id"], "customInitialItem": initial_component }) last_index_++ @@ -619,6 +755,7 @@ Item { if (swap) { tabLayout.tab_model_[idx_prev]["title"] = tabLayout.tab_model_[i]["title"] + tabLayout.tab_model_[idx_prev]["icon"] = tabLayout.tab_model_[i]["icon"] tabLayout.tab_model_[idx_prev]["stack_id"] = tabLayout.tab_model_[i]["stack_id"] } // reorder model idx usage, and delete idx tab components (stack layout content) @@ -713,6 +850,15 @@ Item { filter_domain_view_by_topic_(tabLayout.tab_model_[current_]["stack_id"], domainEntityId, entityId) } + function open_idl_view(entityId) { + create_new_custom_tab_("idlView_component") + tabLayout.tab_model_[current_]["title"] = controller.get_data_type_name(entityId) + tabLayout.tab_model_[current_]["icon"] = "idl" + var content = controller.get_type_idl(entityId) + display_idl_content_(tabLayout.tab_model_[current_]["stack_id"], content) + refresh_layout(current_) + } + function refresh_domain_graph_view(domainEntityId, entityId) { for (var i=0; i \ No newline at end of file diff --git a/resources/images/app_logos/FASTDDS_VISUALIZER.png b/resources/images/app_logos/FASTDDS_VISUALIZER.png new file mode 100644 index 00000000..05f53b4a Binary files /dev/null and b/resources/images/app_logos/FASTDDS_VISUALIZER.png differ diff --git a/resources/images/icons/domain_graph/domain_graph_black.svg b/resources/images/icons/domain_graph/domain_graph_black.svg new file mode 100644 index 00000000..72dc7fb5 --- /dev/null +++ b/resources/images/icons/domain_graph/domain_graph_black.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/icons/domain_graph/domain_graph_eProsimaLightBlue.svg b/resources/images/icons/domain_graph/domain_graph_eProsimaLightBlue.svg new file mode 100644 index 00000000..a0f97583 --- /dev/null +++ b/resources/images/icons/domain_graph/domain_graph_eProsimaLightBlue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/icons/domain_graph/domain_graph_grey.svg b/resources/images/icons/domain_graph/domain_graph_grey.svg new file mode 100644 index 00000000..0d99d4b0 --- /dev/null +++ b/resources/images/icons/domain_graph/domain_graph_grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/icons/domain_graph/domain_graph_white.svg b/resources/images/icons/domain_graph/domain_graph_white.svg new file mode 100644 index 00000000..6f168143 --- /dev/null +++ b/resources/images/icons/domain_graph/domain_graph_white.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/icons/idl/idl_black.svg b/resources/images/icons/idl/idl_black.svg new file mode 100644 index 00000000..d6482309 --- /dev/null +++ b/resources/images/icons/idl/idl_black.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/icons/idl/idl_eProsimaLightBlue.svg b/resources/images/icons/idl/idl_eProsimaLightBlue.svg new file mode 100644 index 00000000..f61b77d5 --- /dev/null +++ b/resources/images/icons/idl/idl_eProsimaLightBlue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/icons/idl/idl_grey.svg b/resources/images/icons/idl/idl_grey.svg new file mode 100644 index 00000000..9e6303c6 --- /dev/null +++ b/resources/images/icons/idl/idl_grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/images/icons/idl/idl_white.svg b/resources/images/icons/idl/idl_white.svg new file mode 100644 index 00000000..b5cf6ed5 --- /dev/null +++ b/resources/images/icons/idl/idl_white.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Controller.cpp b/src/Controller.cpp index 3f508b73..276e4e64 100644 --- a/src/Controller.cpp +++ b/src/Controller.cpp @@ -322,3 +322,15 @@ QString Controller::get_domain_view_graph( backend::Graph domain_view = engine_->get_domain_view_graph(backend::models_id_to_backend_id(entity_id)); return QString::fromUtf8(domain_view.dump().data(), int(domain_view.dump().size())); } + +QString Controller::get_type_idl( + QString entity_id) +{ + return utils::to_QString(engine_->get_type_idl(backend::models_id_to_backend_id(entity_id))); +} + +QString Controller::get_data_type_name( + QString entity_id) +{ + return utils::to_QString(engine_->get_data_type_name(backend::models_id_to_backend_id(entity_id))); +} diff --git a/src/Engine.cpp b/src/Engine.cpp index 0c959c18..27c2170d 100644 --- a/src/Engine.cpp +++ b/src/Engine.cpp @@ -280,7 +280,8 @@ void Engine::init_monitor( else { process_error( - "Error trying to initialize monitor in Discovery Server with locators: " + utils::to_string(discovery_server_locators), + "Error trying to initialize monitor in Discovery Server with locators: " + + utils::to_string(discovery_server_locators), ErrorType::INIT_DS_MONITOR); } } @@ -1708,6 +1709,18 @@ std::vector Engine::get_data_kinds() return backend_connection_.get_data_kinds(); } +std::string Engine::get_data_type_name( + const backend::EntityId& entity_id) +{ + return backend_connection_.get_data_type_name(entity_id); +} + +std::string Engine::get_type_idl( + const backend::EntityId& entity_id) +{ + return backend_connection_.get_type_idl(entity_id); +} + bool Engine::data_kind_has_target( const QString& data_kind) { diff --git a/src/backend/SyncBackendConnection.cpp b/src/backend/SyncBackendConnection.cpp index c3db8378..d7ec5a76 100644 --- a/src/backend/SyncBackendConnection.cpp +++ b/src/backend/SyncBackendConnection.cpp @@ -625,6 +625,12 @@ std::string SyncBackendConnection::get_alias( return backend::get_info_value(get_info(id), "alias"); } +std::string SyncBackendConnection::get_data_type_name( + backend::EntityId id) +{ + return backend::get_info_value(get_info(id), "data_type"); +} + StatusLevel SyncBackendConnection:: get_status( EntityId id) { @@ -953,6 +959,20 @@ Graph SyncBackendConnection::get_domain_view_graph ( } } +std::string SyncBackendConnection::get_type_idl( + const EntityId& id) +{ + try + { + return StatisticsBackend::get_type_idl(id); + } + catch (const std::exception& e) + { + qWarning() << "Fail getting the IDL type for entity id " << id.value() << ": " << e.what(); + return ""; + } +} + void SyncBackendConnection::change_unit_magnitude( std::vector& data, DataKind data_kind)