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