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
+4 -4
View File
@@ -68,7 +68,7 @@ except AttributeError:
#include <fastrtps/fastrtps_fwd.h>
#include <fastrtps/subscriber/SubscriberListener.h>
#include <fastrtps/subscriber/SampleInfo.h>
@[if 1.5 <= fastrtpsgen_version <= 1.7]@
@[if fastrtps_version <= 1.7]@
#include "@(topic)_PubSubTypes.h"
@[else]@
#include "@(topic)PubSubTypes.h"
@@ -89,7 +89,7 @@ public:
bool init(uint8_t topic_ID, std::condition_variable* t_send_queue_cv, std::mutex* t_send_queue_mutex, std::queue<uint8_t>* t_send_queue);
void run();
bool hasMsg();
@[if 1.5 <= fastrtpsgen_version <= 1.7]@
@[if fastrtps_version <= 1.7]@
@[ if ros2_distro]@
@(package)::msg::dds_::@(topic)_ getMsg();
@[ else]@
@@ -118,7 +118,7 @@ private:
SampleInfo_t m_info;
int n_matched;
int n_msg;
@[if 1.5 <= fastrtpsgen_version <= 1.7]@
@[if fastrtps_version <= 1.7]@
@[ if ros2_distro]@
@(package)::msg::dds_::@(topic)_ msg;
@[ else]@
@@ -140,7 +140,7 @@ private:
std::mutex has_msg_mutex;
} 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]@