Apollo 10.0
自动驾驶开放平台
apollo::cyber::transport::QosFiller类 参考

#include <qos_filler.h>

apollo::cyber::transport::QosFiller 的协作图:

静态 Public 成员函数

static bool FillInPubQos (const std::string &channel_name, const proto::QosProfile &qos, eprosima::fastdds::dds::PublisherQos *pub_qos)
 
static bool FillInWriterQos (const std::string &channel_name, const proto::QosProfile &qos, eprosima::fastdds::dds::DataWriterQos *writer_qos)
 
static bool FillInSubQos (const std::string &channel_name, const proto::QosProfile &qos, eprosima::fastdds::dds::SubscriberQos *sub_qos)
 
static bool FillInReaderQos (const std::string &channel_name, const proto::QosProfile &qos, eprosima::fastdds::dds::DataReaderQos *reader_qos)
 
static bool FillInTopicQos (const std::string &channel_name, const proto::QosProfile &qos, eprosima::fastdds::dds::TopicQos *topic_qos)
 

详细描述

在文件 qos_filler.h35 行定义.

成员函数说明

◆ FillInPubQos()

bool apollo::cyber::transport::QosFiller::FillInPubQos ( const std::string &  channel_name,
const proto::QosProfile qos,
eprosima::fastdds::dds::PublisherQos *  pub_qos 
)
static

在文件 qos_filler.cc218 行定义.

220 {
221 RETURN_VAL_IF_NULL2(pub_qos, false);
222 eprosima::fastrtps::PublisherAttributes pub_attr;
223 if (!GetDefaultPubAttributes(channel_name, qos, &pub_attr)) {
224 return false;
225 }
226 pub_qos->group_data().setValue(pub_attr.qos.m_groupData);
227 pub_qos->partition() = pub_attr.qos.m_partition;
228 pub_qos->presentation() = pub_attr.qos.m_presentation;
229 return true;
230}
#define RETURN_VAL_IF_NULL2(ptr, val)
Definition log.h:123
bool GetDefaultPubAttributes(const std::string &channel_name, const QosProfile &qos, eprosima::fastrtps::PublisherAttributes *pub_attr)
Definition qos_filler.cc:35

◆ FillInReaderQos()

bool apollo::cyber::transport::QosFiller::FillInReaderQos ( const std::string &  channel_name,
const proto::QosProfile qos,
eprosima::fastdds::dds::DataReaderQos *  reader_qos 
)
static

在文件 qos_filler.cc285 行定义.

287 {
288 RETURN_VAL_IF_NULL2(reader_qos, false);
289 eprosima::fastrtps::SubscriberAttributes sub_attr;
290 if (!GetDefaultSubAttributes(channel_name, qos, &sub_attr)) {
291 return false;
292 }
293 reader_qos->reader_resource_limits().matched_publisher_allocation =
294 sub_attr.matched_publisher_allocation;
295 reader_qos->properties() = sub_attr.properties;
296 reader_qos->expects_inline_qos(sub_attr.expectsInlineQos);
297 reader_qos->endpoint().unicast_locator_list = sub_attr.unicastLocatorList;
298 reader_qos->endpoint().multicast_locator_list = sub_attr.multicastLocatorList;
299 reader_qos->endpoint().remote_locator_list = sub_attr.remoteLocatorList;
300 reader_qos->endpoint().history_memory_policy = sub_attr.historyMemoryPolicy;
301 reader_qos->endpoint().user_defined_id = sub_attr.getUserDefinedID();
302 reader_qos->endpoint().entity_id = sub_attr.getEntityID();
303 reader_qos->reliable_reader_qos().times = sub_attr.times;
304 reader_qos->reliable_reader_qos().disable_positive_ACKs =
305 sub_attr.qos.m_disablePositiveACKs;
306 reader_qos->durability() = sub_attr.qos.m_durability;
307 reader_qos->durability_service() = sub_attr.qos.m_durabilityService;
308 reader_qos->deadline() = sub_attr.qos.m_deadline;
309 reader_qos->latency_budget() = sub_attr.qos.m_latencyBudget;
310 reader_qos->liveliness() = sub_attr.qos.m_liveliness;
311 reader_qos->reliability() = sub_attr.qos.m_reliability;
312 reader_qos->lifespan() = sub_attr.qos.m_lifespan;
313 reader_qos->user_data().setValue(sub_attr.qos.m_userData);
314 reader_qos->ownership() = sub_attr.qos.m_ownership;
315 reader_qos->destination_order() = sub_attr.qos.m_destinationOrder;
316 reader_qos->type_consistency().type_consistency =
317 sub_attr.qos.type_consistency;
318 reader_qos->type_consistency().representation = sub_attr.qos.representation;
319 reader_qos->time_based_filter() = sub_attr.qos.m_timeBasedFilter;
320 reader_qos->history() = sub_attr.topic.historyQos;
321 reader_qos->resource_limits() = sub_attr.topic.resourceLimitsQos;
322 return true;
323}
bool GetDefaultSubAttributes(const std::string &channel_name, const QosProfile &qos, eprosima::fastrtps::SubscriberAttributes *sub_attr)

◆ FillInSubQos()

bool apollo::cyber::transport::QosFiller::FillInSubQos ( const std::string &  channel_name,
const proto::QosProfile qos,
eprosima::fastdds::dds::SubscriberQos *  sub_qos 
)
static

在文件 qos_filler.cc271 行定义.

273 {
274 RETURN_VAL_IF_NULL2(sub_qos, false);
275 eprosima::fastrtps::SubscriberAttributes sub_attr;
276 if (!GetDefaultSubAttributes(channel_name, qos, &sub_attr)) {
277 return false;
278 }
279 sub_qos->group_data().setValue(sub_attr.qos.m_groupData);
280 sub_qos->partition() = sub_attr.qos.m_partition;
281 sub_qos->presentation() = sub_attr.qos.m_presentation;
282 return true;
283}

◆ FillInTopicQos()

bool apollo::cyber::transport::QosFiller::FillInTopicQos ( const std::string &  channel_name,
const proto::QosProfile qos,
eprosima::fastdds::dds::TopicQos *  topic_qos 
)
static

在文件 qos_filler.cc325 行定义.

327 {
328 RETURN_VAL_IF_NULL2(topic_qos, false);
329 eprosima::fastrtps::TopicAttributes topic_attr;
330 if (!GetDefaultTopicAttributes(channel_name, qos, &topic_attr)) {
331 return false;
332 }
333 topic_qos->history() = topic_attr.historyQos;
334 topic_qos->resource_limits() = topic_attr.resourceLimitsQos;
335 return true;
336}
bool GetDefaultTopicAttributes(const std::string &channel_name, const QosProfile &qos, eprosima::fastrtps::TopicAttributes *topic_attr)

◆ FillInWriterQos()

bool apollo::cyber::transport::QosFiller::FillInWriterQos ( const std::string &  channel_name,
const proto::QosProfile qos,
eprosima::fastdds::dds::DataWriterQos *  writer_qos 
)
static

在文件 qos_filler.cc232 行定义.

234 {
235 RETURN_VAL_IF_NULL2(writer_qos, false);
236 eprosima::fastrtps::PublisherAttributes pub_attr;
237 if (!GetDefaultPubAttributes(channel_name, qos, &pub_attr)) {
238 return false;
239 }
240 writer_qos->writer_resource_limits().matched_subscriber_allocation =
241 pub_attr.matched_subscriber_allocation;
242 writer_qos->properties() = pub_attr.properties;
243 writer_qos->throughput_controller() = pub_attr.throughputController;
244 writer_qos->endpoint().unicast_locator_list = pub_attr.unicastLocatorList;
245 writer_qos->endpoint().multicast_locator_list = pub_attr.multicastLocatorList;
246 writer_qos->endpoint().remote_locator_list = pub_attr.remoteLocatorList;
247 writer_qos->endpoint().history_memory_policy = pub_attr.historyMemoryPolicy;
248 writer_qos->endpoint().user_defined_id = pub_attr.getUserDefinedID();
249 writer_qos->endpoint().entity_id = pub_attr.getEntityID();
250 writer_qos->reliable_writer_qos().times = pub_attr.times;
251 writer_qos->reliable_writer_qos().disable_positive_acks =
252 pub_attr.qos.m_disablePositiveACKs;
253 writer_qos->durability() = pub_attr.qos.m_durability;
254 writer_qos->durability_service() = pub_attr.qos.m_durabilityService;
255 writer_qos->deadline() = pub_attr.qos.m_deadline;
256 writer_qos->latency_budget() = pub_attr.qos.m_latencyBudget;
257 writer_qos->liveliness() = pub_attr.qos.m_liveliness;
258 writer_qos->reliability() = pub_attr.qos.m_reliability;
259 writer_qos->lifespan() = pub_attr.qos.m_lifespan;
260 writer_qos->user_data().setValue(pub_attr.qos.m_userData);
261 writer_qos->ownership() = pub_attr.qos.m_ownership;
262 writer_qos->ownership_strength() = pub_attr.qos.m_ownershipStrength;
263 writer_qos->destination_order() = pub_attr.qos.m_destinationOrder;
264 writer_qos->representation() = pub_attr.qos.representation;
265 writer_qos->publish_mode() = pub_attr.qos.m_publishMode;
266 writer_qos->history() = pub_attr.topic.historyQos;
267 writer_qos->resource_limits() = pub_attr.topic.resourceLimitsQos;
268 return true;
269}

该类的文档由以下文件生成: