From 4a5af674d67df237461aba15257d4116b6578c64 Mon Sep 17 00:00:00 2001 From: Juan Lopez Fernandez Date: Mon, 23 Sep 2024 11:20:00 +0200 Subject: [PATCH] Register and propagate MonitorService status type object Signed-off-by: Juan Lopez Fernandez --- .../rtps/monitor-service/MonitorService.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/cpp/statistics/rtps/monitor-service/MonitorService.cpp b/src/cpp/statistics/rtps/monitor-service/MonitorService.cpp index 96fa9d0ba9a..bc2813eb034 100644 --- a/src/cpp/statistics/rtps/monitor-service/MonitorService.cpp +++ b/src/cpp/statistics/rtps/monitor-service/MonitorService.cpp @@ -20,12 +20,14 @@ #include +#include #include #include #include #include #include +#include #include #include @@ -494,6 +496,20 @@ bool MonitorService::create_endpoint() topic_desc.topic_name = MONITOR_SERVICE_TOPIC; topic_desc.type_name = type_.get_name(); + //! Register and propagate type object representation + type_.register_type_object_representation(); + fastdds::dds::xtypes::TypeInformation type_info; + if (fastdds::dds::RETCODE_OK == + RTPSDomainImpl::get_instance()->type_object_registry_observer().get_type_information( + type_.type_identifiers(), type_info)) + { + topic_desc.type_information = type_info; + } + else + { + EPROSIMA_LOG_WARNING(MONITOR_SERVICE, "Failed to retrieve type information for " << MONITOR_SERVICE_TOPIC); + } + endpoint_registrator_(status_writer_, topic_desc, wqos); } else