microRTPS: RtpsTopics: code specialization simplification

This commit is contained in:
TSC21 2020-03-11 14:12:12 +00:00 committed by Nuno Marques
parent e9bc675bfa
commit 21f0d99145
1 changed files with 2 additions and 18 deletions

View File

@ -73,22 +73,7 @@ except AttributeError:
@[end for]@
@[for topic in recv_topics]@
@[ if fastrtps_version <= 1.7]@
@[ if ros2_distro]@
using @(topic)_msg_t = @(package)::msg::dds_::@(topic)_;
@[ else]@
using @(topic)_msg_t = @(topic)_;
@[ end if]@
@[ else]@
@[ if ros2_distro]@
using @(topic)_msg_t = @(package)::msg::@(topic) ;
@[ else]@
using @(topic)_msg_t = @(topic);
@[ end if]@
@[ end if]@
@[end for]@
@[for topic in send_topics]@
@[for topic in (recv_topics + send_topics)]@
@[ if fastrtps_version <= 1.7]@
@[ if ros2_distro]@
using @(topic)_msg_t = @(package)::msg::dds_::@(topic)_;
@ -104,7 +89,6 @@ using @(topic)_msg_t = @(topic);
@[ end if]@
@[end for]@
class RtpsTopics {
public:
bool init(std::condition_variable* t_send_queue_cv, std::mutex* t_send_queue_mutex, std::queue<uint8_t>* t_send_queue);
@ -152,7 +136,7 @@ private:
inline uint8_t getMsgSeq(const T* msg) { return msg->seq(); }
@[end if]@
/** Msg metadata Getters **/
/** Msg metadata Setters **/
@[if fastrtps_version <= 1.7 or not ros2_distro]@
template <class T>
inline uint64_t setMsgTimestamp(T* msg, const uint64_t& timestamp) { msg->timestamp_() = timestamp; }