Skip to content

[22894] Apply demangling to ROS 2 topics in IDL view #267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 18 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Refs 22894: Added the headers for the new functions needed for the de…
…mangling

Signed-off-by: Juanjo Garcia <[email protected]>
  • Loading branch information
Juanjo Garcia committed Mar 12, 2025
commit 15fe00c1e175653bd76e2fa244ae1353a5e20809
22 changes: 21 additions & 1 deletion include/fastdds_statistics_backend/StatisticsBackend.hpp
Original file line number Diff line number Diff line change
@@ -275,14 +275,34 @@ class StatisticsBackend
EntityId entity_id);

/**
* @brief Get the IDL representation of a data type in string format for a given topic entity
* @brief Get the IDL representation of a data type in string format for a given topic entity.
*
* @param entity_id The entity for which the data type IDL is retrieved.
* @return String object describing the entity's data type IDL.
*/
FASTDDS_STATISTICS_BACKEND_DllAPI
static std::string get_type_idl(
EntityId entity_id);

/**
* @brief Get the demangled type name in string format for a given topic entity, if it exists, for display purposes.
*
* @param entity_id The entity for which the data type IDL is retrieved.
* @return String object describing the entity's data type IDL.
*/
FASTDDS_STATISTICS_BACKEND_DllAPI
static std::string get_ros2_type_name(
EntityId entity_id);

/**
* @brief Get the ROS 2 IDL representation of a data type in string format for a given topic entity, if it exists.
*
* @param entity_id The entity for which the data type IDL is retrieved.
* @return String object describing the entity's data type IDL.
*/
FASTDDS_STATISTICS_BACKEND_DllAPI
static std::string get_ros2_type_idl(
EntityId entity_id);

/**
* @brief Returns the id of the topic associated to an endpoint.
40 changes: 40 additions & 0 deletions src/cpp/database/database.hpp
Original file line number Diff line number Diff line change
@@ -473,6 +473,26 @@ class Database
std::string get_type_idl(
const std::string& type_name) const;

/**
* @brief Get the demangled type name of a given type, if it exists, for display purposes.
*
* @param type_name The name of the data type for which to search.
* @throws eprosima::statistics_backend::BadParameter if \c type_name does not exist in the database.
* @return The name type in std::string format.
*/
std::string get_ros2_type_name(
const std::string& type_name) const;

/**
* @brief Get the original ROS 2 type IDL of a given type name, if it exists.
*
* @param type_name The name of the data type for which to search.
* @throws eprosima::statistics_backend::BadParameter if \c type_name does not exist in the database.
* @return The original ROS 2 IDL representation of the type in std::string format.
*/
std::string get_ros2_type_idl(
const std::string& type_name) const;

/**
* @brief Get the entity of a given EntityKind that matches with the requested GUID.
*
@@ -1226,6 +1246,26 @@ class Database
std::string get_type_idl_nts(
const std::string& type_name) const;

/**
* @brief Get the demangled type name of a given type, if it exists, for display purposes. This method is not thread safe.
*
* @param type_name The name of the data type for which to search.
* @throws eprosima::statistics_backend::BadParameter if \c type_name does not exist in the database.
* @return The name type in std::string format.
*/
std::string get_ros2_type_name_nts(
const std::string& type_name) const;

/**
* @brief Get the original ROS 2 type IDL of a given type name, if it exists. This method is not thread safe.
*
* @param type_name The name of the data type for which to search.
* @throws eprosima::statistics_backend::BadParameter if \c type_name does not exist in the database.
* @return The original ROS 2 IDL representation of the type in std::string format.
*/
std::string get_ros2_type_idl_nts(
const std::string& type_name) const;

/**
* @brief Get the entity of a given EntityKind that matches with the requested GUID. This method is not thread safe.
*