microRTPS: use package.version to compare FastRTPS lib versions

This commit is contained in:
TSC21
2020-03-16 14:44:03 +00:00
committed by Nuno Marques
parent 1f4b2d1d53
commit 1ea5280299
9 changed files with 33 additions and 28 deletions
+3 -2
View File
@@ -11,6 +11,7 @@
@# - ids (List) list of all RTPS msg ids
@###############################################
@{
from packaging import version
import genmsg.msgs
from px_generate_uorb_topic_helper import * # this is in Tools/
@@ -68,7 +69,7 @@ except AttributeError:
#include <fastrtps/fastrtps_fwd.h>
#include <fastrtps/publisher/PublisherListener.h>
@[if fastrtps_version <= 1.7]@
@[if version.parse(fastrtps_version) <= version.parse('1.7')]@
#include "@(topic)_PubSubTypes.h"
@[else]@
#include "@(topic)PubSubTypes.h"
@@ -77,7 +78,7 @@ except AttributeError:
using namespace eprosima::fastrtps;
using namespace eprosima::fastrtps::rtps;
@[if fastrtps_version <= 1.7]@
@[if version.parse(fastrtps_version) <= version.parse('1.7')]@
@[ if ros2_distro]@
using @(topic)_msg_t = @(package)::msg::dds_::@(topic)_;
using @(topic)_msg_datatype = @(package)::msg::dds_::@(topic)_PubSubType;