Browse Source

microRTPS: RtpsTopics: code specialization simplification

sbg
TSC21 5 years ago committed by Nuno Marques
parent
commit
21f0d99145
  1. 20
      msg/templates/urtps/RtpsTopics.h.em

20
msg/templates/urtps/RtpsTopics.h.em

@ -73,22 +73,7 @@ except AttributeError: @@ -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); @@ -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: @@ -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; }

Loading…
Cancel
Save