CARLA
Loading...
Searching...
No Matches
QosProfile.h
Go to the documentation of this file.
1// Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
7#pragma once
8
9#include <cstdint>
10
11namespace carla {
12namespace ros2 {
13
14/// Middleware-neutral QoS profile passed to IPublisherMiddleware::Init /
15/// ISubscriberMiddleware::Init when a topic needs QoS different from the
16/// vendor defaults (e.g. a reader that must receive the last sample a
17/// TRANSIENT_LOCAL writer latched before it joined).
18///
19/// This replaces tier4's TopicConfig (data_types.h) in the
20/// middleware-decoupled architecture: the domain id is NOT part of the
21/// profile (it lives in MiddlewareConfig.h) and the topic suffix is the
22/// caller's concern (publishers append suffixes to their base topic name).
23///
24/// The defaults (RELIABLE / VOLATILE / KEEP_LAST depth 1) mirror the FastDDS
25/// DataWriter defaults so passing QosProfile{} to a publisher is equivalent
26/// to the QoS-less Init overload.
27struct QosProfile {
28 enum class Reliability : std::uint8_t { Reliable, BestEffort };
29 enum class Durability : std::uint8_t { Volatile, TransientLocal };
30 enum class History : std::uint8_t { KeepLast, KeepAll };
31
35 std::int32_t history_depth{1};
36
37 /// RELIABLE / TRANSIENT_LOCAL / KEEP_LAST depth 1 — a latched sample
38 /// survives a late join. A reader with it matches TRANSIENT_LOCAL writers
39 /// only, which is why the Autoware command subscribers no longer use it.
48
49 /// RELIABLE / VOLATILE / KEEP_LAST depth 1 — the Autoware report publishers
50 /// and command subscribers (a volatile reader matches writers of either
51 /// durability).
60};
61
62} // namespace ros2
63} // namespace carla
This file contains definitions of common data structures used in traffic manager.
Middleware-neutral QoS profile passed to IPublisherMiddleware::Init / ISubscriberMiddleware::Init whe...
Definition QosProfile.h:27
Reliability reliability
Definition QosProfile.h:32
std::int32_t history_depth
Definition QosProfile.h:35
static QosProfile ReliableTransientLocal()
RELIABLE / TRANSIENT_LOCAL / KEEP_LAST depth 1 — a latched sample survives a late join.
Definition QosProfile.h:40
static QosProfile ReliableVolatile()
RELIABLE / VOLATILE / KEEP_LAST depth 1 — the Autoware report publishers and command subscribers (a v...
Definition QosProfile.h:52