microRTPS: use FastRTPS version instead of FastRTPSGen version to generate conditional code

This commit is contained in:
TSC21
2020-03-10 19:05:59 +00:00
committed by Nuno Marques
parent c7d86b73d4
commit 7612879ffd
10 changed files with 76 additions and 90 deletions
+3 -3
View File
@@ -68,7 +68,7 @@ except AttributeError:
#include <fastrtps/fastrtps_fwd.h>
#include <fastrtps/publisher/PublisherListener.h>
@[if 1.5 <= fastrtpsgen_version <= 1.7]@
@[if fastrtps_version <= 1.7]@
#include "@(topic)_PubSubTypes.h"
@[else]@
#include "@(topic)PubSubTypes.h"
@@ -84,7 +84,7 @@ public:
virtual ~@(topic)_Publisher();
bool init();
void run();
@[if 1.5 <= fastrtpsgen_version <= 1.7]@
@[if fastrtps_version <= 1.7]@
@[ if ros2_distro]@
void publish(@(package)::msg::dds_::@(topic)_* st);
@[ else]@
@@ -109,7 +109,7 @@ private:
void onPublicationMatched(Publisher* pub, MatchingInfo& info);
int n_matched;
} m_listener;
@[if 1.5 <= fastrtpsgen_version <= 1.7]@
@[if fastrtps_version <= 1.7]@
@[ if ros2_distro]@
@(package)::msg::dds_::@(topic)_PubSubType @(topic)DataType;
@[ else]@