Question: How to check PubSubType is correct [13609] #2440
Replies: 1 comment
-
Hi @briansoe66, Sorry for the late reply. I have moved your question to this new forum intended just for Q&A (Questions & Answers). I do not understand completely what do you want. DDS standard establishes that there is only going to be communication when the Topic and Data Types are the same. So if you are receiving a message, you can be sure that the PubSubType is the correct one. Regarding the key parameter, it is used for instances (having different data sub flows within the same Topic as explained in our documentation). Fast DDS allows to read specific instances with the DDS standard API ( |
Beta Was this translation helpful? Give feedback.
-
Hello, I would like to verify that the message received is the correct PubSubType. For example, I would like to check if my PubSubType::getKey() matches the received message key. However, I can't find the key info in the received eprosima::fastrtps::SampleInfo_t. How can I check?
The publisher is a ROS2 node, and the subscriber is an eprosima::fastrtps::SubscriberListener, if that matters.
Beta Was this translation helpful? Give feedback.
All reactions