Set TopicDataType name before registering types in DomainParticipant#73
Merged
rsanchez15 merged 2 commits intomainfrom Apr 7, 2025
Merged
Set TopicDataType name before registering types in DomainParticipant#73rsanchez15 merged 2 commits intomainfrom
rsanchez15 merged 2 commits intomainfrom
Conversation
Signed-off-by: Carlosespicur <carlosespicur@proton.me>
Signed-off-by: Carlosespicur <carlosespicur@proton.me>
5b7e668 to
7dc9ca0
Compare
rsanchez15
approved these changes
Apr 7, 2025
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR solves an issue reported in eProsima/Fast-DDS-python#222.
If the user sets the type name manually using
TopicDataType::set_name(type_name_A), an error happens when trying to create the topic in the Plotjuggler side Participant.On the Publisher side, the
TypeObjectthat is registered in theTypeObjectRegistryis built with a type nametype_name_B, hardcoded in the code generated by Fast DDS Gen.On the PlotJuggler side, the Participant reconstructs the
TypeSupportfrom the registeredTypeObject, soTypeSupport->get_name()returnstype_name_Binstead oftype_name_A, which is received an stored internally through theon_data_writer_discoverycallback implementation. Therefore, the Participant registers the type with the nametype_name_B, while the topic is attempted to be created with type nametype_name_A, causing an error.There are two possible solutions to fix the problem:
DomainParticipantAPI to register the type withtype_name_A.TypeSupporttype name to the type name discovered usingTypeSupport->set_name(type_name_A)before registering the type.This PR uses the second approach.