From c9df88d89225d033b9681c260cdb9d47010a1dc8 Mon Sep 17 00:00:00 2001 From: Manuel Muth Date: Mon, 19 Aug 2024 09:31:30 +0200 Subject: [PATCH] add interface_name to InterfaceDescription Co-authored-by: Sai Kishor Kothakota --- .../include/hardware_interface/hardware_info.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hardware_interface/include/hardware_interface/hardware_info.hpp b/hardware_interface/include/hardware_interface/hardware_info.hpp index bf14f24041d..3049f6fef98 100644 --- a/hardware_interface/include/hardware_interface/hardware_info.hpp +++ b/hardware_interface/include/hardware_interface/hardware_info.hpp @@ -133,7 +133,7 @@ struct TransmissionInfo struct InterfaceDescription { InterfaceDescription(const std::string & prefix_name_in, const InterfaceInfo & interface_info_in) - : prefix_name(prefix_name_in), interface_info(interface_info_in) + : prefix_name(prefix_name_in), interface_info(interface_info_in), interface_name(prefix_name + "/" + interface_info.name) { } @@ -147,7 +147,11 @@ struct InterfaceDescription */ InterfaceInfo interface_info; - std::string get_name() const { return prefix_name + "/" + interface_info.name; } + /** + * Name of the interface + */ + std::string interface_name; + std::string get_name() const { return interface_name; } std::string get_interface_type() const { return interface_info.name; } };