microRTPS bridge: templates: do not change naming of topics based on the fasrtpsgen version

This commit is contained in:
TSC21
2019-10-16 16:05:01 +01:00
committed by Nuno Marques
parent a053b7f69b
commit 412c364e90
2 changed files with 8 additions and 34 deletions

View File

@@ -98,28 +98,15 @@ bool @(topic)_Publisher::init()
PublisherAttributes Wparam;
Wparam.topic.topicKind = NO_KEY;
Wparam.topic.topicDataType = myType.getName(); //This type MUST be registered
@[if 1.5 <= fastrtpsgen_version <= 1.7]@
@[ if ros2_distro]@
@[ if ros2_distro == "ardent"]@
@[if ros2_distro]@
@[ if ros2_distro == "ardent"]@
Wparam.qos.m_partition.push_back("rt");
Wparam.topic.topicName = "@(topic)_PubSubTopic";
@[ else]@
Wparam.topic.topicName = "rt/@(topic)_PubSubTopic";
@[ end if]@
@[ else]@
Wparam.topic.topicName = "@(topic)_PubSubTopic";
Wparam.topic.topicName = "rt/@(topic)_PubSubTopic";
@[ end if]@
@[else]@
@[ if ros2_distro]@
@[ if ros2_distro == "ardent"]@
Wparam.qos.m_partition.push_back("rt");
Wparam.topic.topicName = "@(topic)PubSubTopic";
@[ else]@
Wparam.topic.topicName = "rt/@(topic)PubSubTopic";
@[ end if]@
@[ else]@
Wparam.topic.topicName = "@(topic)PubSubTopic";
@[ end if]@
Wparam.topic.topicName = "@(topic)_PubSubTopic";
@[end if]@
mp_publisher = Domain::createPublisher(mp_participant, Wparam, static_cast<PublisherListener*>(&m_listener));
if(mp_publisher == nullptr)