16 #ifndef RMW_FASTRTPS_SHARED_CPP__QOS_HPP_
17 #define RMW_FASTRTPS_SHARED_CPP__QOS_HPP_
19 #include "fastrtps/attributes/PublisherAttributes.h"
20 #include "fastrtps/attributes/SubscriberAttributes.h"
21 #include "fastrtps/qos/QosPolicies.h"
22 #include "fastrtps/qos/ReaderQos.h"
23 #include "fastrtps/qos/WriterQos.h"
33 class SubscriberAttributes;
34 class PublisherAttributes;
46 eprosima::fastrtps::SubscriberAttributes & sattr);
52 eprosima::fastrtps::PublisherAttributes & pattr);
62 template<
typename DDSQoSPolicyT>
65 const DDSQoSPolicyT & dds_qos,
68 switch (dds_qos.m_reliability.kind) {
69 case eprosima::fastrtps::BEST_EFFORT_RELIABILITY_QOS:
72 case eprosima::fastrtps::RELIABLE_RELIABILITY_QOS:
76 qos->
reliability = RMW_QOS_POLICY_RELIABILITY_UNKNOWN;
80 switch (dds_qos.m_durability.kind) {
81 case eprosima::fastrtps::TRANSIENT_LOCAL_DURABILITY_QOS:
84 case eprosima::fastrtps::VOLATILE_DURABILITY_QOS:
88 qos->
durability = RMW_QOS_POLICY_DURABILITY_UNKNOWN;
92 qos->
deadline.
sec = dds_qos.m_deadline.period.seconds;
95 qos->
lifespan.
sec = dds_qos.m_lifespan.duration.seconds;
96 qos->
lifespan.
nsec = dds_qos.m_lifespan.duration.nanosec;
98 switch (dds_qos.m_liveliness.kind) {
99 case eprosima::fastrtps::AUTOMATIC_LIVELINESS_QOS:
102 case eprosima::fastrtps::MANUAL_BY_TOPIC_LIVELINESS_QOS:
106 qos->
liveliness = RMW_QOS_POLICY_LIVELINESS_UNKNOWN;
113 template<
typename AttributeT>
116 const AttributeT & dds_qos,
121 dds_attributes_to_rmw_qos<eprosima::fastrtps::PublisherAttributes>(
122 const eprosima::fastrtps::PublisherAttributes & dds_qos,
127 dds_attributes_to_rmw_qos<eprosima::fastrtps::SubscriberAttributes>(
128 const eprosima::fastrtps::SubscriberAttributes & dds_qos,
131 #endif // RMW_FASTRTPS_SHARED_CPP__QOS_HPP_