Commit 1ef9c08 1 parent 3026b3d commit 1ef9c08 Copy full SHA for 1ef9c08
File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -559,6 +559,30 @@ std::string StatisticsBackend::get_type_idl(
559
559
return StatisticsBackendData::get_instance ()->database_ ->get_type_idl (topic_info[DATA_TYPE_TAG]);
560
560
}
561
561
562
+ std::string StatisticsBackend::get_ros2_type_name (
563
+ EntityId entity_id)
564
+ {
565
+ // Check if the entity is a topic
566
+ if (EntityKind::TOPIC != get_type (entity_id))
567
+ {
568
+ throw BadParameter (" EntityId received does not match with a valid topic entity" );
569
+ }
570
+ Info topic_info = StatisticsBackend::get_info (entity_id);
571
+ return StatisticsBackendData::get_instance ()->database_ ->get_ros2_type_name (topic_info[DATA_TYPE_TAG]);
572
+ }
573
+
574
+ std::string StatisticsBackend::get_ros2_type_idl (
575
+ EntityId entity_id)
576
+ {
577
+ // Check if the entity is a topic
578
+ if (EntityKind::TOPIC != get_type (entity_id))
579
+ {
580
+ throw BadParameter (" EntityId received does not match with a valid topic entity" );
581
+ }
582
+ Info topic_info = StatisticsBackend::get_info (entity_id);
583
+ return StatisticsBackendData::get_instance ()->database_ ->get_ros2_type_idl (topic_info[DATA_TYPE_TAG]);
584
+ }
585
+
562
586
EntityId StatisticsBackend::get_endpoint_topic_id (
563
587
EntityId endpoint_id)
564
588
{
You can’t perform that action at this time.
0 commit comments