nros C++ API
Lightweight ROS 2 client for embedded real-time systems (C++ headers)
Loading...
Searching...
No Matches
qos.hpp
Go to the documentation of this file.
1// nros-cpp: QoS (Quality of Service) profiles
2// Freestanding C++ — no STL required
3
9
10#ifndef NROS_RCLCPP_QOS_HPP
11#define NROS_RCLCPP_QOS_HPP
12
13#include <stdint.h>
14
15// Phase 379 W5 — the deadline / lifespan / lease accessors take and return
16// `rclcpp::Duration`, so this header names it. `nros.hpp` includes `qos.hpp`
17// before `duration.hpp`, so the dependency is spelled HERE rather than left to
18// the umbrella's ordering: a header that names a type must be able to be
19// included first.
20#include "rclcpp/duration.hpp"
21// phase-417 G7 — `NROS_PUBLIC`, for the one C entry point this header
22// declares (`qos_policy_kind_to_cstr`, below). Macros only; the file includes
23// nothing and compiles freestanding, so it costs this header's
24// self-containment nothing.
25#include "rclc/visibility_control.h"
26// phase-417 stage 6 step A — `rclcpp::detail::refuse` and the
27// `NROS_RCLCPP_REFUSE_*` diagnostics, used by `SystemDefaultsQoS` below.
28// `log.hpp` includes nothing of ours, so this adds no cycle.
29#include "rclcpp/logging.hpp"
30// `<type_traits>` is GATED, and this is issue 0112's class one step further
31// than step A caught it. Zephyr's minimal libcpp ships exactly THREE headers --
32// `cstddef`, `cstdint`, `new` (`zephyr/lib/cpp/minimal/include/`) -- so an
33// UNGATED include here made `#include <rclcpp/rclcpp.hpp>` fail to compile on every
34// Zephyr C++ image. Step A verified against a SYNTHESISED minimal libcpp that
35// happened to provide `<type_traits>`, so the lane stayed green.
36//
37// `is_qos_arg` exists only to disambiguate `rclcpp::Node`'s create_service
38// overloads, and that node type is itself hosted-only, so nothing freestanding
39// can reach the predicate.
40// This header includes NOTHING, deliberately -- see `is_qos_arg` below.
41
42// FFI struct definition — mirrors `nros_cpp_qos_t` in
43// nros_cpp_ffi.h. Phase 118.D: guarded by `NROS_CPP_FFI_H`. If
44// `nros_cpp_ffi.h` was included earlier (it sets that guard), the
45// canonical types are already in scope; otherwise emit local
46// definitions so this header stays self-contained for callers that
47// don't pull the cbindgen header directly.
48//
49// The FIELD names below are ABI. `deadline_ms` / `lifespan_ms` /
50// `liveliness_lease_ms` are `uint32_t` milliseconds and are mirrored again in
51// `rclc/component.h` (issue 0160, gated by `check-ffi-struct-mirrors`). The
52// `_ms` suffix on a `QoS` METHOD was renamed in phase-379 W5; the suffix on a
53// STRUCT FIELD was not, and must not be — the C ABI carries milliseconds.
54#ifndef NROS_CPP_FFI_H
55extern "C" {
96}
97#endif // NROS_CPP_FFI_H
98
99// issue 2054 — upstream's rmw profile struct, under its upstream TAG.
100// Declared here, incomplete, so `QoS` below can name it in three member
101// declarations; it is DEFINED at the bottom of this file, after `QoS` is
102// complete, because its conversion to `QoS` needs the whole class. The tag is
103// upstream's `rmw_qos_profile_s`, not `rmw_qos_profile_t`, which is the RMW
104// ABI's own struct in `<nros/rmw_entity.h>` — a different type with ABI field
105// widths, which this declaration does not touch.
106struct rmw_qos_profile_s;
107
108namespace rclcpp {
109
110// -- Policy enums (phase 379 W5) ------------------------------------------
111//
112// At NAMESPACE scope and public, under rclcpp's names, because that is where a
113// ported node looks for them (`rclcpp::ReliabilityPolicy`, `qos.hpp:34-58`).
114// Three of these were PRIVATE members of `QoS` until phase-379 W5, which is why
115// the getters had to hand back `int` — a public getter cannot name a private
116// type. Ledger: `cpp:ReliabilityPolicy` and its three siblings.
117//
118// The two rclcpp enumerators we used to decline ARRIVED in phase-444 (issue
119// 1437), and the reason each was declined is the reason it is now needed:
120//
121// * `SystemDefault` — "defer to the middleware". Declined because nothing
122// DEFERS: the backend is linked at build time (RFC-0036). True of a
123// REQUEST, and a `QoS` is no longer only a request — `get_actual_qos()`
124// hands one back, and a backend CAN report that a policy was never stated.
125// * `Unknown` — declined as "a discovery artefact for a policy read off a
126// remote endpoint, and we do no dynamic discovery". It is not that: it is
127// what `rmw_*_get_actual_qos` owes for a policy the backend looked at and
128// cannot determine, on the LOCAL endpoint. `rmw_vtable.h` has always said
129// so, and until issue 1437 no implementation anywhere wrote one.
130//
131// What is still declined is `rclcpp::SystemDefaultsQoS` — the all-sentinel
132// PRESET, whose two RMWs resolve it to depth 1 and depth 42 (issue 0829).
133// A value a backend may REPORT is not a profile a caller may REQUEST, and the
134// refusal on that class stands (`NROS_RCLCPP_REFUSE_SYSTEM_DEFAULTS_QOS`).
135//
136// The enumerators are upstream's and SCOPED (phase-483 W1): one
137// `SystemDefault` and one `Unknown` per policy, reached as
138// `rclcpp::ReliabilityPolicy::Unknown`. The prefixed spellings
139// (~~`ReliabilityUnknown`~~, ~~`LivelinessNone`~~) existed only because these were
140// unscoped enums, and the bare `rclcpp::Reliable` form went with them.
141
161
173
175enum class HistoryPolicy : int {
182};
183
201
202class QoS;
203struct QoSInitialization;
204
205namespace detail {
206
225constexpr uint32_t qos_window_ms(const Duration& d) {
226 return d.nanoseconds() <= 0 ? 0u
227 : d.nanoseconds() == INT64_MAX - 1
228 ? UINT32_MAX - 1u
229 : (d.nanoseconds() >= static_cast<int64_t>(UINT32_MAX - 1u) * 1000000 - 999999
230 ? UINT32_MAX
231 : static_cast<uint32_t>((d.nanoseconds() + 999999) / 1000000));
232}
233
241constexpr Duration qos_best_available_duration() {
242 return Duration::from_nanoseconds(INT64_MAX - 1);
243}
244
248constexpr Duration qos_window_duration(uint32_t ms) {
249 return ms == UINT32_MAX - 1u ? qos_best_available_duration()
250 : Duration::from_nanoseconds(static_cast<int64_t>(ms) * 1000000);
251}
252
256constexpr QoS qos_from_ffi(const nros_cpp_qos_t& f);
257
258} // namespace detail
259
276class QoS {
277 public:
280 constexpr QoS()
281 : reliability_(ReliabilityPolicy::Reliable), durability_(DurabilityPolicy::Volatile),
282 history_(HistoryPolicy::KeepLast), liveliness_(::rclcpp::LivelinessPolicy::SystemDefault),
283 depth_(10), deadline_ms_(0), lifespan_ms_(0), liveliness_lease_ms_(0),
284 avoid_ros_namespace_conventions_(0), tx_express_(0) {}
285
291 // NOLINTNEXTLINE(google-explicit-constructor)
292 constexpr QoS(::size_t depth) : QoS() { depth_ = static_cast<int>(depth); }
293
300 explicit constexpr QoS(const QoSInitialization& init);
301 constexpr QoS(const QoSInitialization& init, const ::rmw_qos_profile_s& profile);
302
303 // -- Chainable setters (match rclcpp fluent API) --
304
306 constexpr QoS& reliable() {
307 reliability_ = ReliabilityPolicy::Reliable;
308 return *this;
309 }
310
312 constexpr QoS& best_effort() {
313 reliability_ = ReliabilityPolicy::BestEffort;
314 return *this;
315 }
316
318 constexpr QoS& transient_local() {
320 return *this;
321 }
322
325 durability_ = DurabilityPolicy::Volatile;
326 return *this;
327 }
328
335 return *this;
336 }
337
343 return *this;
344 }
345
348 constexpr QoS& keep_last(int depth) {
349 history_ = HistoryPolicy::KeepLast;
350 depth_ = depth;
351 return *this;
352 }
353
355 constexpr QoS& keep_all() {
356 history_ = HistoryPolicy::KeepAll;
357 return *this;
358 }
359
367 constexpr QoS& deadline(const Duration& d) {
368 deadline_ms_ = detail::qos_window_ms(d);
369 return *this;
370 }
371
374 constexpr QoS& lifespan(const Duration& d) {
375 lifespan_ms_ = detail::qos_window_ms(d);
376 return *this;
377 }
378
381 constexpr QoS& liveliness(LivelinessPolicy kind) {
382 liveliness_ = kind;
383 return *this;
384 }
385
388 constexpr QoS& liveliness_lease_duration(const Duration& d) {
389 liveliness_lease_ms_ = detail::qos_window_ms(d);
390 return *this;
391 }
392
396 avoid_ros_namespace_conventions_ = on ? 1 : 0;
397 return *this;
398 }
399
404 constexpr QoS& tx_express(bool on) {
405 tx_express_ = on ? 1 : 0;
406 return *this;
407 }
408
409 // -- Predefined profiles (match rclcpp named constructors) --
410 //
411 // phase-428 W10 — DECLARED here, DEFINED below from `rclcpp::detail::qos_table`,
412 // which is the one place this header spells a profile's fields. Until W10
413 // these three carried their own literals AND the `rclcpp::*QoS` classes at
414 // the bottom of the file carried a second, independent set: `sensor_data`
415 // and `services_default` were each written twice inside ONE header, with
416 // nothing asserting they agreed. That is the hand-mirror class
417 // (issues 0088 / 0160 / 0245) at file scope.
418
420 static constexpr QoS default_profile();
421
423 static constexpr QoS sensor_data();
424
426 static constexpr QoS services();
427
428 // -- Accessors --
429
431 constexpr ReliabilityPolicy reliability() const { return reliability_; }
433 constexpr DurabilityPolicy durability() const { return durability_; }
435 constexpr HistoryPolicy history() const { return history_; }
437 constexpr LivelinessPolicy liveliness() const { return liveliness_; }
439 constexpr int depth() const { return depth_; }
441 constexpr Duration deadline() const { return detail::qos_window_duration(deadline_ms_); }
443 constexpr Duration lifespan() const { return detail::qos_window_duration(lifespan_ms_); }
445 constexpr Duration liveliness_lease_duration() const {
446 return detail::qos_window_duration(liveliness_lease_ms_);
447 }
448
449 constexpr bool avoid_ros_namespace_conventions() const {
450 return avoid_ros_namespace_conventions_ != 0;
451 }
452
453 constexpr bool tx_express() const { return tx_express_ != 0; }
454
460 constexpr ::rmw_qos_profile_s get_rmw_qos_profile() const;
461
462 private:
463 // issue 1437 — the ONE function allowed to write these directly.
464 //
465 // `qos_from_ffi` builds the profile a backend GRANTED, and a grant can
466 // state `ReliabilityPolicy::Unknown` / `HistoryPolicy::SystemDefault` / ... which NO
467 // public setter can produce: the setters are `reliable()`,
468 // `best_effort()`, `keep_last(n)` — the vocabulary of a REQUEST, and a
469 // request may not carry a sentinel. Adding enum-taking setters to reach
470 // them would hand every caller a way to ask for one, which is the refusal
471 // `NROS_RCLCPP_REFUSE_SYSTEM_DEFAULTS_QOS` exists to keep. A friend for
472 // the read-back direction alone keeps both properties.
473 friend constexpr QoS detail::qos_from_ffi(const nros_cpp_qos_t& f);
474
475 // The private members keep their `_ms_` spelling: they hold exactly what
476 // the C ABI carries (`uint32_t` milliseconds), and renaming them would say
477 // the storage changed when only the accessors did.
478 ReliabilityPolicy reliability_;
479 DurabilityPolicy durability_;
480 HistoryPolicy history_;
481 LivelinessPolicy liveliness_;
482 int depth_;
483 uint32_t deadline_ms_;
484 uint32_t lifespan_ms_;
485 uint32_t liveliness_lease_ms_;
486 uint8_t avoid_ros_namespace_conventions_;
487 uint8_t tx_express_;
488};
489
490// ============================================================================
491// phase-417 G6 — profile comparison. `rclcpp::operator==(const QoS&, const QoS&)`
492// ============================================================================
493//
494// FREE functions, as upstream's are, and written from the PUBLIC accessors —
495// every one of the ten members has one, so no `friend` is needed and the
496// comparison stays a thing a reader can check against the accessor list.
497//
498// TEN hand-written comparisons rather than `= default`. `operator==() =
499// default` is C++20 and this surface's floor is `cxx_std_17`
500// (`packages/api/nros-cpp/CMakeLists.txt` — `target_compile_features(
501// nros-cpp-headers INTERFACE cxx_std_17)`), so the defaulted form would not
502// compile for the targets this header exists to serve. Still `constexpr`,
503// still no allocator, still no exceptions.
504//
505// Rust's `QoSProfile` derives `PartialEq, Eq` and has had this for nothing
506// since it existed; the ledger row `cpp:operator==` recorded the asymmetry as
507// having no platform reason, and it did not.
508//
509// The three time windows are compared through `Duration::nanoseconds()`: the
510// storage is milliseconds and the conversion is exact in both directions
511// (`detail::qos_window_duration`).
512
518constexpr bool operator==(const QoS& left, const QoS& right) {
519 return left.reliability() == right.reliability() && left.durability() == right.durability() &&
520 left.history() == right.history() && left.liveliness() == right.liveliness() &&
521 left.depth() == right.depth() &&
522 left.deadline().nanoseconds() == right.deadline().nanoseconds() &&
523 left.lifespan().nanoseconds() == right.lifespan().nanoseconds() &&
524 left.liveliness_lease_duration().nanoseconds() ==
525 right.liveliness_lease_duration().nanoseconds() &&
527 left.tx_express() == right.tx_express();
528}
529
532constexpr bool operator!=(const QoS& left, const QoS& right) {
533 return !(left == right);
534}
535
536// ============================================================================
537// phase-417 G7 — naming a QoS policy
538// ============================================================================
539
578extern "C" NROS_PUBLIC const char* rclc_qos_policy_kind_to_cstr(uint32_t policy);
579
582inline const char* qos_policy_kind_to_cstr(uint32_t policy) {
583 return rclc_qos_policy_kind_to_cstr(policy);
584}
585
586namespace detail {
587
588// --- THE C++ QoS profile table (phase-428 W10) -------------------------------
589//
590// Every named profile the C++ surface offers is spelled HERE and nowhere else.
591// `rclcpp::QoS`'s three named statics and all six concrete `rclcpp::*QoS` classes
592// are defined by calling into this block; none of them restates a policy.
593//
594// Why a table and not a hand copy per class: W10 exists because upstream's 7
595// profiles were transcribed in four places across the repo — this header,
596// `nros-rmw/src/traits.rs`, `nros/src/lib.rs` and `nros-rmw-abi/.../
597// rmw_entity.h` — about 26 constants for a 7-row table, with no gate binding
598// them. `QOS_PROFILE_PARAMETER_EVENTS` is the proof: `KeepAll, 0` in Rust under
599// a comment claiming it matched `rmw_qos_profile_parameter_events`, which is
600// `KEEP_LAST, 1000`. This header had the same profile right, which is exactly
601// what an ungated mirror looks like until the day it is not.
602//
603// This block cannot CONSUME the cross-language SSoT. The C spellings in
604// `rmw_entity.h` are `((rmw_qos_profile_t){...})` compound literals, which are
605// C99 and not standard C++, over a struct whose field types differ from
606// `nros_cpp_qos_t`'s; and `qos.hpp` is deliberately self-contained and
607// freestanding (see issue 0112 at the top of this file), so it cannot take a
608// dependency on a build-generated header either. What the table DOES buy is
609// that the C++ side has ONE row per profile for a cross-language gate to read,
610// instead of nine constructor bodies to parse.
611//
612// phase-454 W1 collected on that. `scripts/check-qos-profile-ssot.py` now
613// EVALUATES these rows — the ctor supplies the base profile and each chained
614// call applies its one effect — and compares every field against
615// `QoSProfile::QOS_PROFILE_*`. So the table is bound after all; what it is not
616// is DERIVED, which is the weaker of the two and the strongest available to a
617// freestanding header. A `.setter()` the gate does not model is a hard failure
618// there, not a skipped field.
619//
620// Values read 2026-09-05 against ROS 2 Humble as installed:
621// /opt/ros/humble/include/rmw/rmw/qos_profiles.h :25,38,51,64,77,90
622// /opt/ros/humble/include/rcl/rcl/logging_rosout.h :36
623// /opt/ros/humble/include/rclcpp/rclcpp/qos.hpp :371-500
624//
625// Three fields are identical in EVERY upstream profile and are therefore folded
626// into `QoS`'s default constructor rather than spelled per row:
627// * `avoid_ros_namespace_conventions` is `false` upstream, `0` here.
628// * liveliness is `RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT` upstream, and
629// `rclcpp::QoS` now defaults to `LivelinessPolicy::SystemDefault`, which is our spelling of
630// that sentinel. It defaulted to ~~`LivelinessAutomatic`~~ — "what every
631// reference RMW folds that sentinel to" — under a
632// `nros-qos-mirror-deviation` record whose own reason was that this
633// surface and `nros-c`'s "move together with the C ABI or not at all".
634// They moved together (issue 1329): this constructor, `nros-c`'s
635// `NROS_QOS_*` statics and (until phase-492 W4) `component.h`'s
636// ~~`rclc_c_qos_default()`~~.
637//
638// The forcing argument is issue 1329's per-backend QoS mask. XRCE honours
639// no liveliness, so an AUTOMATIC default would have made
640// `required_policies()` demand `LIVELINESS_AUTOMATIC` and refuse every C++
641// default profile on that backend — over a policy upstream leaves unset
642// and the application never asked for. A caller that wants automatic
643// liveliness states `.liveliness(rclcpp::LivelinessPolicy::Automatic)`.
644//
645// * deadline and the liveliness lease are `RMW_QOS_*_DEFAULT` (infinite)
646// upstream and `0` here, which `qos_window_ms` above documents as infinite.
647//
648// `rmw_qos_profile_system_default` has NO row: every one of its fields is a
649// sentinel, so no value could be right. `rclcpp::SystemDefaultsQoS` refuses at
650// compile time instead — see the class below.
651struct qos_table {
656 static constexpr QoS default_profile() { return QoS(); }
657
659 static constexpr QoS sensor_data() { return QoS().best_effort().keep_last(5); }
660
666 static constexpr QoS services_default() { return QoS().reliable().keep_last(10); }
667
669 static constexpr QoS parameters() { return QoS().reliable().keep_last(1000); }
670
676 static constexpr QoS parameter_events() { return QoS().reliable().keep_last(1000); }
677
680 static constexpr QoS rosout() {
681 return QoS().reliable().transient_local().keep_last(1000).lifespan(
682 ::rclcpp::Duration::from_nanoseconds(10000000000LL));
683 }
684
690 static constexpr QoS clock() { return QoS().best_effort().keep_last(1); }
691
704};
705
719constexpr nros_cpp_qos_t qos_to_ffi(const QoS& qos) {
720 nros_cpp_qos_t f{};
721 f.reliability = static_cast<nros_cpp_qos_reliability_t>(qos.reliability());
722 f.durability = static_cast<nros_cpp_qos_durability_t>(qos.durability());
723 f.history = static_cast<nros_cpp_qos_history_t>(qos.history());
725 f.depth = qos.depth();
726 // The FFI FIELDS are milliseconds and keep their `_ms` names; only the
727 // accessors changed. `qos_window_ms` is the exact inverse of the
728 // `Duration` the getter built, so this round-trip loses nothing.
733 f.tx_express = qos.tx_express() ? 1 : 0;
734 return f;
735}
736
762
778constexpr QoS qos_from_ffi(const nros_cpp_qos_t& f) {
779 QoS q;
780 q.reliability_ = static_cast<ReliabilityPolicy>(f.reliability);
781 q.durability_ = static_cast<DurabilityPolicy>(f.durability);
782 q.history_ = static_cast<HistoryPolicy>(f.history);
783 q.liveliness_ = static_cast<LivelinessPolicy>(f.liveliness_kind);
784 q.depth_ = f.depth;
785 q.deadline_ms_ = f.deadline_ms;
786 q.lifespan_ms_ = f.lifespan_ms;
787 q.liveliness_lease_ms_ = f.liveliness_lease_ms;
788 q.avoid_ros_namespace_conventions_ = f.avoid_ros_namespace_conventions;
789 q.tx_express_ = f.tx_express;
790 return q;
791}
792
793} // namespace detail
794
795// phase-428 W10 — the three named statics declared on `QoS`, defined from the
796// one table. Out of line because the table needs a COMPLETE `QoS` and these are
797// members of it; `constexpr` implies `inline`, so this is still header-only and
798// still usable in the `static_assert`s and default arguments that call it.
804}
808
809} // namespace rclcpp
810
811// ============================================================================
812// rclcpp:: — the ROS 2 spelling of the QoS surface (RFC-0089 stage 6, step A)
813// ============================================================================
814//
815// Moved here from `nros/rclcpp_compat.hpp`, which no longer exists as a
816// separate surface: RFC-0089 §"Naming: replace, with alias as the migration
817// step" makes the ROS 2 spelling a first-class name declared by the API header
818// that owns the concept. Step B, retiring the in-tree `nros::QoS` spelling,
819// landed in phase-483 W1.
820//
821// Everything below is freestanding-safe — `constexpr` classes over `rclcpp::QoS`
822// and one `<type_traits>` predicate — so a `no_std` C++ build gets the ROS 2
823// QoS vocabulary too, which the hosted-STL shim could never offer it.
824
825namespace rclcpp {
826
827namespace detail {
828
862template <typename F> struct qos_arg_strip {
863 typedef F type;
864};
865template <typename F> struct qos_arg_strip<F&> {
866 typedef F type;
867};
868template <typename F> struct qos_arg_strip<const F&> {
869 typedef F type;
870};
871template <typename F> struct qos_arg_strip<const F> {
872 typedef F type;
873};
874
875template <typename F> class is_qos_arg {
876 typedef char yes_t[1];
877 typedef char no_t[2];
878 // Declared, never defined: both calls live in `sizeof`, which does not
879 // evaluate its operand.
880 static yes_t& probe(const ::rclcpp::QoS*);
881 // issue 2054 — an `rmw_qos_profile_t` is a profile argument too, as
882 // `create_service<S>(name, rmw_qos_profile_services_default)` passes it.
883 // Incomplete here, which a pointer probe does not mind.
884 static yes_t& probe(const ::rmw_qos_profile_s*);
885 static no_t& probe(...);
886 static typename qos_arg_strip<F>::type* arg();
887
888 public:
889 static const bool value = sizeof(probe(arg())) == sizeof(yes_t);
890};
891
892} // namespace detail
893
894// --- Named QoS profiles (RFC-0089 W3.f; bound to one table, phase-428 W10) ---
895//
896// Each class below is a NAME for a row of `rclcpp::detail::qos_table`, and states
897// no policy of its own. Before W10 each carried its own literals, so
898// `SensorDataQoS` and `ServicesQoS` restated what `rclcpp::QoS::sensor_data()` and
899// `rclcpp::QoS::services()` already said, 400 lines up in the same header — the
900// shape upstream itself avoids: rclcpp's `SensorDataQoS` is
901// `QoSInitialization::from_rmw(rmw_qos_profile_sensor_data)`, a REFERENCE to the
902// rmw constant, never a re-transcription of it (`rclcpp/qos.hpp:391-399`).
903//
904// The reason a name-only class is still worth having is unchanged: two of these
905// shipped WRONG, which is why the values are pinned by a test rather than by
906// review.
907//
908// * `ParametersQoS()` returned `QoS(10)` where `rmw_qos_profile_parameters`
909// is KEEP_LAST/**1000** — a hundredfold history difference under a name
910// that claims to be the ROS 2 profile, costing samples under load with
911// nothing to read.
912// * `SystemDefaultsQoS()` returned `QoS(10)`, which is
913// `rmw_qos_profile_default` — a DIFFERENT upstream profile. It is now
914// REFUSE-LOUD; see the class below for why no value can be right.
915//
916// The upstream sources, and the three fields folded into `QoS()` rather than
917// spelled per row, are documented on `qos_table` itself — one place, because
918// that is the whole point of this work item.
919//
920// These are CLASSES, as upstream's are, so `rclcpp::SensorDataQoS{}` — the
921// brace form — compiles alongside `rclcpp::SensorDataQoS()`. They are
922// `constexpr`, so the table-driven check lives in `static_assert`s
923// (`tests/compile/ros2_api_adoption_stage2.cpp`) rather than in a runtime test
924// no embedded lane runs.
925
927class SensorDataQoS : public QoS {
928 public:
929 constexpr SensorDataQoS() : QoS(::rclcpp::detail::qos_table::sensor_data()) {}
930};
931
936class ServicesQoS : public QoS {
937 public:
938 constexpr ServicesQoS() : QoS(::rclcpp::detail::qos_table::services_default()) {}
939};
940
944class ParametersQoS : public QoS {
945 public:
946 constexpr ParametersQoS() : QoS(::rclcpp::detail::qos_table::parameters()) {}
947};
948
956class ParameterEventsQoS : public QoS {
957 public:
958 constexpr ParameterEventsQoS() : QoS(::rclcpp::detail::qos_table::parameter_events()) {}
959};
960
969class RosoutQoS : public QoS {
970 public:
971 constexpr RosoutQoS() : QoS(::rclcpp::detail::qos_table::rosout()) {}
972};
973
975class ClockQoS : public QoS {
976 public:
977 constexpr ClockQoS() : QoS(::rclcpp::detail::qos_table::clock()) {}
978};
979
990class BestAvailableQoS : public QoS {
991 public:
992 constexpr BestAvailableQoS() : QoS(::rclcpp::detail::qos_table::best_available()) {}
993};
994
1003class SystemDefaultsQoS : public QoS {
1004 public:
1005 template <typename T = void> SystemDefaultsQoS() {
1006 static_assert(detail::refuse<T>::value, NROS_RCLCPP_REFUSE_SYSTEM_DEFAULTS_QOS);
1007 }
1008};
1009
1020constexpr QoS KeepLast(::size_t depth) {
1021 return QoS(depth);
1022}
1023
1025constexpr QoS KeepAll() {
1026 return QoS(::rclcpp::QoS().keep_all());
1027}
1028
1029} // namespace rclcpp
1030
1031// phase-488, issue 2054 — upstream's `rmw_qos_profile_t`, its policy enums and
1032// its `rmw_qos_profile_*` constants, as ported code spells them:
1033//
1034// create_service<S>(name, cb, rmw_qos_profile_services_default, group);
1035// rmw_qos_profile_t profile = rmw_qos_profile_default;
1036// profile.depth = 1;
1037// rclcpp::QoS qos(rclcpp::QoSInitialization::from_rmw(profile), profile);
1038//
1039// Field names, field types and enumerator values are upstream's
1040// (`rmw/types.h` and `rmw/time.h`, ROS 2 Humble; the BEST_AVAILABLE values are
1041// Iron's, and Humble code never names them). A profile converts IMPLICITLY to
1042// `rclcpp::QoS`, which is what every verb here takes, so Humble's
1043// `create_service(..., const rmw_qos_profile_t&, ...)` call sites compile
1044// unchanged; `QoS::get_rmw_qos_profile()` goes back.
1045//
1046// On every target, as the rest of this header is: RFC-0096 D1 is one API on
1047// every platform, and `rclcpp::QoSInitialization` is a public type. Nothing
1048// here needs the STL.
1049//
1050// The RMW ABI's `<nros/rmw_entity.h>` also defines a struct named
1051// `rmw_qos_profile_t` — the backend vtable's, with ABI field widths
1052// (`uint16_t depth`, `uint32_t deadline_ms`). That header is for a backend's
1053// implementation, never for a node, so a translation unit that includes both
1054// is a backend that also includes rclcpp; it is refused below with the reason
1055// rather than left to a redefinition error naming two files.
1056//
1057// `rmw_qos_profile_system_default` is still absent: every field of it is a
1058// sentinel, which a `QoS` request may not carry (see `qos_table`), and the two
1059// reference RMWs resolve it differently (issue 0829).
1060#if defined(NROS_RMW_ENTITY_H)
1061#error \
1062 "<rclcpp/qos.hpp> defines upstream's rmw_qos_profile_t, and <nros/rmw_entity.h> defines the RMW ABI's struct under the same name. A node includes rclcpp only; a backend includes the ABI header only (issue 2054)."
1063#endif
1064
1065#include <stddef.h>
1066
1069typedef struct rmw_time_s {
1070 uint64_t sec;
1071 uint64_t nsec;
1073
1074#define RMW_DURATION_INFINITE \
1075 { 9223372036LL, 854775807LL }
1076#define RMW_DURATION_UNSPECIFIED \
1077 { 0LL, 0LL }
1078#define RMW_QOS_POLICY_DEPTH_SYSTEM_DEFAULT 0
1079#define RMW_QOS_DEADLINE_DEFAULT RMW_DURATION_UNSPECIFIED
1080#define RMW_QOS_DEADLINE_BEST_AVAILABLE \
1081 { 9223372036LL, 854775806LL }
1082#define RMW_QOS_LIFESPAN_DEFAULT RMW_DURATION_UNSPECIFIED
1083#define RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT RMW_DURATION_UNSPECIFIED
1084#define RMW_QOS_LIVELINESS_LEASE_DURATION_BEST_AVAILABLE \
1085 { 9223372036LL, 854775806LL }
1086
1094
1101
1109
1119
1120namespace rclcpp {
1121namespace detail {
1122
1129constexpr rmw_time_t qos_window_to_rmw(uint32_t ms) {
1130 return ms == 0u ? rmw_time_t{0u, 0u}
1131 : ms == UINT32_MAX ? rmw_time_t{9223372036u, 854775807u}
1132 : ms == UINT32_MAX - 1u ? rmw_time_t{9223372036u, 854775806u}
1133 : rmw_time_t{ms / 1000u, (ms % 1000u) * 1000000u};
1134}
1135
1138constexpr uint32_t qos_window_from_rmw(const rmw_time_t& t) {
1139 return (t.sec == 0u && t.nsec == 0u) ? 0u
1140 : (t.sec == 9223372036u && t.nsec == 854775807u) ? UINT32_MAX
1141 : (t.sec == 9223372036u && t.nsec == 854775806u)
1142 ? UINT32_MAX - 1u
1143 : (t.sec > 9000000000u ? UINT32_MAX
1144 : qos_window_ms(Duration::from_nanoseconds(
1145 static_cast<int64_t>(t.sec) * 1000000000 +
1146 static_cast<int64_t>(t.nsec))));
1147}
1148
1149// Each policy as a switch, because the two vocabularies number them
1150// differently (`rclcpp::ReliabilityPolicy::Reliable` is 0, upstream's
1151// `RMW_QOS_POLICY_RELIABILITY_RELIABLE` is 1), so no cast could be right.
1208
1209} // namespace detail
1210} // namespace rclcpp
1211
1251
1252namespace rclcpp {
1253namespace detail {
1254
1257constexpr rmw_qos_profile_t qos_to_rmw(const QoS& q) {
1259 static_cast<size_t>(q.depth() < 0 ? 0 : q.depth()),
1262 qos_window_to_rmw(qos_to_ffi(q).deadline_ms),
1263 qos_window_to_rmw(qos_to_ffi(q).lifespan_ms),
1265 qos_window_to_rmw(qos_to_ffi(q).liveliness_lease_ms),
1267}
1268
1269} // namespace detail
1270
1279 size_t depth;
1280
1281 constexpr QoSInitialization(rmw_qos_history_policy_t history_policy_arg, size_t depth_arg)
1282 : history_policy(history_policy_arg), depth(depth_arg) {}
1283
1284 // NOLINTNEXTLINE(google-explicit-constructor)
1285 constexpr QoSInitialization(const QoS& qos)
1286 : history_policy(detail::qos_history_to_rmw(qos.history())),
1287 depth(static_cast<size_t>(qos.depth() < 0 ? 0 : qos.depth())) {}
1288
1289 static constexpr QoSInitialization from_rmw(const rmw_qos_profile_t& profile) {
1290 return QoSInitialization(profile.history, profile.depth);
1291 }
1292};
1293
1294constexpr QoS::QoS(const QoSInitialization& init, const ::rmw_qos_profile_s& profile)
1295 : QoS(static_cast<QoS>(profile)) {
1296 history_ = detail::qos_history_from_rmw(init.history_policy);
1297 depth_ = static_cast<int>(init.depth);
1298}
1299
1300constexpr ::rmw_qos_profile_s QoS::get_rmw_qos_profile() const {
1301 return detail::qos_to_rmw(*this);
1302}
1303
1304} // namespace rclcpp
1305
1319
1320namespace rclcpp {
1321// Defined after the constants because it starts from one of them.
1323} // namespace rclcpp
1324
1325#endif // NROS_RCLCPP_QOS_HPP
constexpr BestAvailableQoS()
Definition qos.hpp:992
constexpr ClockQoS()
Definition qos.hpp:977
constexpr ParameterEventsQoS()
Definition qos.hpp:958
constexpr ParametersQoS()
Definition qos.hpp:946
Definition qos.hpp:276
constexpr Duration lifespan() const
The lifespan window. Duration() (zero) = infinite.
Definition qos.hpp:443
constexpr Duration deadline() const
The deadline window. Duration() (zero) = infinite.
Definition qos.hpp:441
constexpr QoS & liveliness_lease_duration(const Duration &d)
Definition qos.hpp:388
constexpr QoS & durability_best_available()
Definition qos.hpp:341
constexpr QoS & keep_all()
Use KEEP_ALL history (bounded by transport).
Definition qos.hpp:355
constexpr QoS & reliability_best_available()
Definition qos.hpp:333
constexpr QoS()
Definition qos.hpp:280
constexpr QoS & deadline(const Duration &d)
Definition qos.hpp:367
constexpr Duration liveliness_lease_duration() const
The liveliness lease window. Duration() (zero) = infinite.
Definition qos.hpp:445
constexpr bool tx_express() const
Whether this publisher's samples bypass transport tx batching.
Definition qos.hpp:453
constexpr QoS & best_effort()
Set reliability to BEST_EFFORT (fire-and-forget; default for sensors).
Definition qos.hpp:312
constexpr QoS & transient_local()
Set durability to TRANSIENT_LOCAL — late joiners get the last value.
Definition qos.hpp:318
constexpr QoS & lifespan(const Duration &d)
Definition qos.hpp:374
constexpr QoS & keep_last(int depth)
Definition qos.hpp:348
constexpr HistoryPolicy history() const
The history policy.
Definition qos.hpp:435
constexpr QoS & reliable()
Set reliability to RELIABLE (acked transport, retransmits on loss).
Definition qos.hpp:306
constexpr ::rmw_qos_profile_s get_rmw_qos_profile() const
Definition qos.hpp:1300
constexpr LivelinessPolicy liveliness() const
The liveliness policy kind.
Definition qos.hpp:437
constexpr DurabilityPolicy durability() const
The durability policy.
Definition qos.hpp:433
constexpr QoS & tx_express(bool on)
Definition qos.hpp:404
constexpr ReliabilityPolicy reliability() const
The reliability policy.
Definition qos.hpp:431
constexpr QoS & liveliness(LivelinessPolicy kind)
Definition qos.hpp:381
constexpr QoS & avoid_ros_namespace_conventions(bool on)
Definition qos.hpp:395
constexpr QoS & durability_volatile()
Set durability to VOLATILE — late joiners get nothing (default).
Definition qos.hpp:324
static constexpr QoS services()
Services profile: RELIABLE + VOLATILE + KEEP_LAST(10).
Definition qos.hpp:805
static constexpr QoS sensor_data()
Sensor-data profile: BEST_EFFORT + VOLATILE + KEEP_LAST(5).
Definition qos.hpp:802
constexpr QoS(::size_t depth)
Definition qos.hpp:292
constexpr bool avoid_ros_namespace_conventions() const
Whether to skip the /rt/ ROS topic-name prefix.
Definition qos.hpp:449
constexpr int depth() const
Configured queue depth (only meaningful for KEEP_LAST).
Definition qos.hpp:439
static constexpr QoS default_profile()
Default profile: RELIABLE + VOLATILE + KEEP_LAST(10).
Definition qos.hpp:799
constexpr RosoutQoS()
Definition qos.hpp:971
constexpr SensorDataQoS()
Definition qos.hpp:929
constexpr ServicesQoS()
Definition qos.hpp:938
SystemDefaultsQoS()
Definition qos.hpp:1005
Definition qos.hpp:875
static const bool value
Definition qos.hpp:889
Definition rclcpp.hpp:418
constexpr QoS qos_all_unknown()
Definition qos.hpp:753
constexpr uint32_t qos_window_from_rmw(const rmw_time_t &t)
Definition qos.hpp:1138
constexpr DurabilityPolicy qos_durability_from_rmw(rmw_qos_durability_policy_t p)
Definition qos.hpp:1185
constexpr Duration qos_window_duration(uint32_t ms)
Definition qos.hpp:248
constexpr rmw_qos_history_policy_t qos_history_to_rmw(HistoryPolicy p)
Definition qos.hpp:1166
constexpr nros_cpp_qos_t qos_to_ffi(const QoS &qos)
Definition qos.hpp:719
constexpr rmw_qos_liveliness_policy_t qos_liveliness_to_rmw(LivelinessPolicy p)
Definition qos.hpp:1192
constexpr HistoryPolicy qos_history_from_rmw(rmw_qos_history_policy_t p)
Definition qos.hpp:1172
constexpr rmw_qos_durability_policy_t qos_durability_to_rmw(DurabilityPolicy p)
Definition qos.hpp:1178
constexpr rmw_time_t qos_window_to_rmw(uint32_t ms)
Definition qos.hpp:1129
constexpr QoS qos_from_ffi(const nros_cpp_qos_t &f)
Definition qos.hpp:778
constexpr ReliabilityPolicy qos_reliability_from_rmw(rmw_qos_reliability_policy_t p)
Definition qos.hpp:1159
constexpr uint32_t qos_window_ms(const Duration &d)
Definition qos.hpp:225
constexpr Duration qos_best_available_duration()
Definition qos.hpp:241
constexpr rmw_qos_profile_t qos_to_rmw(const QoS &q)
Definition qos.hpp:1257
constexpr LivelinessPolicy qos_liveliness_from_rmw(rmw_qos_liveliness_policy_t p)
Definition qos.hpp:1200
constexpr rmw_qos_reliability_policy_t qos_reliability_to_rmw(ReliabilityPolicy p)
Definition qos.hpp:1152
Definition rclcpp.hpp:75
constexpr bool operator==(const QoS &left, const QoS &right)
Definition qos.hpp:518
const char * rclc_qos_policy_kind_to_cstr(uint32_t policy)
constexpr bool operator!=(const QoS &left, const QoS &right)
Definition qos.hpp:532
constexpr QoS KeepLast(::size_t depth)
Definition qos.hpp:1020
const char * qos_policy_kind_to_cstr(uint32_t policy)
Definition qos.hpp:582
constexpr QoS KeepAll()
rclcpp::KeepAll(). Same ADOPT-BOUNDED note as KeepLast.
Definition qos.hpp:1025
ReliabilityPolicy
Definition qos.hpp:148
@ BestAvailable
Definition qos.hpp:159
@ Reliable
Definition qos.hpp:149
@ Unknown
The backend could not determine this policy. An ABSENCE.
Definition qos.hpp:155
@ SystemDefault
Definition qos.hpp:153
@ BestEffort
Definition qos.hpp:150
LivelinessPolicy
Definition qos.hpp:190
@ Automatic
Definition qos.hpp:192
@ BestAvailable
Resolve at creation against the discovered graph (issue 1973).
Definition qos.hpp:199
@ ManualByNode
Definition qos.hpp:194
@ Unknown
Definition qos.hpp:197
@ SystemDefault
Definition qos.hpp:191
@ ManualByTopic
Definition qos.hpp:193
HistoryPolicy
History policy. Matches DDS HISTORY_QOS_POLICY.
Definition qos.hpp:175
@ Unknown
The backend could not determine this policy. An ABSENCE.
Definition qos.hpp:181
@ KeepAll
Definition qos.hpp:177
@ SystemDefault
Nobody stated a history policy — the middleware chose.
Definition qos.hpp:179
@ KeepLast
Definition qos.hpp:176
void init(int argc, char const *const *argv)
Definition rclcpp.hpp:525
DurabilityPolicy
Durability policy. Matches DDS DURABILITY_QOS_POLICY.
Definition qos.hpp:163
@ BestAvailable
Resolve at creation against the discovered graph (issue 1973).
Definition qos.hpp:171
@ Volatile
Definition qos.hpp:164
@ Unknown
The backend could not determine this policy. An ABSENCE.
Definition qos.hpp:169
@ TransientLocal
Definition qos.hpp:165
@ SystemDefault
Nobody stated a durability policy — the middleware chose.
Definition qos.hpp:167
rmw_qos_reliability_policy_e
Definition qos.hpp:1087
@ RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT
Definition qos.hpp:1090
@ RMW_QOS_POLICY_RELIABILITY_BEST_AVAILABLE
Definition qos.hpp:1092
@ RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT
Definition qos.hpp:1088
@ RMW_QOS_POLICY_RELIABILITY_RELIABLE
Definition qos.hpp:1089
@ RMW_QOS_POLICY_RELIABILITY_UNKNOWN
Definition qos.hpp:1091
enum rmw_qos_liveliness_policy_e rmw_qos_liveliness_policy_t
static constexpr rmw_qos_profile_t rmw_qos_profile_sensor_data
Definition qos.hpp:1311
nros_cpp_qos_history_t
Definition qos.hpp:70
@ NROS_CPP_QOS_HISTORY_UNKNOWN
Definition qos.hpp:74
@ NROS_CPP_QOS_KEEP_LAST
Definition qos.hpp:71
@ NROS_CPP_QOS_KEEP_ALL
Definition qos.hpp:72
@ NROS_CPP_QOS_HISTORY_SYSTEM_DEFAULT
Definition qos.hpp:73
static constexpr rmw_qos_profile_t rmw_qos_profile_default
Definition qos.hpp:1309
enum rmw_qos_reliability_policy_e rmw_qos_reliability_policy_t
static constexpr rmw_qos_profile_t rmw_qos_profile_parameter_events
Definition qos.hpp:1317
nros_cpp_qos_liveliness_t
Definition qos.hpp:76
@ NROS_CPP_QOS_LIVELINESS_MANUAL_BY_NODE
Definition qos.hpp:80
@ NROS_CPP_QOS_LIVELINESS_AUTOMATIC
Definition qos.hpp:78
@ NROS_CPP_QOS_LIVELINESS_UNKNOWN
Definition qos.hpp:81
@ NROS_CPP_QOS_LIVELINESS_BEST_AVAILABLE
Definition qos.hpp:82
@ NROS_CPP_QOS_LIVELINESS_MANUAL_BY_TOPIC
Definition qos.hpp:79
@ NROS_CPP_QOS_LIVELINESS_NONE
Definition qos.hpp:77
struct rmw_qos_profile_s rmw_qos_profile_t
static constexpr rmw_qos_profile_t rmw_qos_profile_services_default
Definition qos.hpp:1313
enum rmw_qos_durability_policy_e rmw_qos_durability_policy_t
enum rmw_qos_history_policy_e rmw_qos_history_policy_t
rmw_qos_durability_policy_e
Definition qos.hpp:1102
@ RMW_QOS_POLICY_DURABILITY_BEST_AVAILABLE
Definition qos.hpp:1107
@ RMW_QOS_POLICY_DURABILITY_UNKNOWN
Definition qos.hpp:1106
@ RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
Definition qos.hpp:1104
@ RMW_QOS_POLICY_DURABILITY_VOLATILE
Definition qos.hpp:1105
@ RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT
Definition qos.hpp:1103
rmw_qos_history_policy_e
Definition qos.hpp:1095
@ RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT
Definition qos.hpp:1096
@ RMW_QOS_POLICY_HISTORY_KEEP_LAST
Definition qos.hpp:1097
@ RMW_QOS_POLICY_HISTORY_UNKNOWN
Definition qos.hpp:1099
@ RMW_QOS_POLICY_HISTORY_KEEP_ALL
Definition qos.hpp:1098
rmw_qos_liveliness_policy_e
Definition qos.hpp:1110
@ RMW_QOS_POLICY_LIVELINESS_UNKNOWN
Definition qos.hpp:1116
@ RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE
Deprecated upstream; kept because the value is upstream's.
Definition qos.hpp:1114
@ RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC
Definition qos.hpp:1115
@ RMW_QOS_POLICY_LIVELINESS_BEST_AVAILABLE
Definition qos.hpp:1117
@ RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT
Definition qos.hpp:1111
@ RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
Definition qos.hpp:1112
struct rmw_time_s rmw_time_t
nros_cpp_qos_durability_t
Definition qos.hpp:63
@ NROS_CPP_QOS_DURABILITY_UNKNOWN
Definition qos.hpp:67
@ NROS_CPP_QOS_DURABILITY_BEST_AVAILABLE
Definition qos.hpp:68
@ NROS_CPP_QOS_VOLATILE
Definition qos.hpp:64
@ NROS_CPP_QOS_TRANSIENT_LOCAL
Definition qos.hpp:65
@ NROS_CPP_QOS_DURABILITY_SYSTEM_DEFAULT
Definition qos.hpp:66
nros_cpp_qos_reliability_t
Definition qos.hpp:56
@ NROS_CPP_QOS_RELIABILITY_BEST_AVAILABLE
Definition qos.hpp:61
@ NROS_CPP_QOS_RELIABLE
Definition qos.hpp:57
@ NROS_CPP_QOS_RELIABILITY_UNKNOWN
Definition qos.hpp:60
@ NROS_CPP_QOS_BEST_EFFORT
Definition qos.hpp:58
@ NROS_CPP_QOS_RELIABILITY_SYSTEM_DEFAULT
Definition qos.hpp:59
static constexpr rmw_qos_profile_t rmw_qos_profile_parameters
Definition qos.hpp:1315
Definition qos.hpp:84
enum nros_cpp_qos_durability_t durability
Definition qos.hpp:86
uint32_t liveliness_lease_ms
Definition qos.hpp:92
uint32_t lifespan_ms
Definition qos.hpp:91
enum nros_cpp_qos_history_t history
Definition qos.hpp:87
uint8_t tx_express
Definition qos.hpp:94
enum nros_cpp_qos_liveliness_t liveliness_kind
Definition qos.hpp:88
enum nros_cpp_qos_reliability_t reliability
Definition qos.hpp:85
uint8_t avoid_ros_namespace_conventions
Definition qos.hpp:93
uint32_t deadline_ms
Definition qos.hpp:90
int depth
Definition qos.hpp:89
Definition qos.hpp:1277
rmw_qos_history_policy_t history_policy
Definition qos.hpp:1278
constexpr QoSInitialization(rmw_qos_history_policy_t history_policy_arg, size_t depth_arg)
Definition qos.hpp:1281
static constexpr QoSInitialization from_rmw(const rmw_qos_profile_t &profile)
Definition qos.hpp:1289
constexpr QoSInitialization(const QoS &qos)
Definition qos.hpp:1285
size_t depth
Definition qos.hpp:1279
F type
Definition qos.hpp:866
Definition qos.hpp:862
F type
Definition qos.hpp:863
Definition qos.hpp:651
static constexpr QoS rosout()
Definition qos.hpp:680
static constexpr QoS parameters()
rmw_qos_profile_parameters — KEEP_LAST(1000), RELIABLE, VOLATILE.
Definition qos.hpp:669
static constexpr QoS best_available()
Definition qos.hpp:695
static constexpr QoS clock()
Definition qos.hpp:690
static constexpr QoS parameter_events()
Definition qos.hpp:676
static constexpr QoS services_default()
Definition qos.hpp:666
static constexpr QoS sensor_data()
rmw_qos_profile_sensor_data — KEEP_LAST(5), BEST_EFFORT, VOLATILE.
Definition qos.hpp:659
static constexpr QoS default_profile()
Definition qos.hpp:656
Definition qos.hpp:1221
size_t depth
Definition qos.hpp:1223
rmw_time_t deadline
Definition qos.hpp:1226
rmw_time_t lifespan
Definition qos.hpp:1227
rmw_qos_reliability_policy_t reliability
Definition qos.hpp:1224
rmw_time_t liveliness_lease_duration
Definition qos.hpp:1229
rmw_qos_history_policy_t history
Definition qos.hpp:1222
rmw_qos_durability_policy_t durability
Definition qos.hpp:1225
rmw_qos_liveliness_policy_t liveliness
Definition qos.hpp:1228
bool avoid_ros_namespace_conventions
Definition qos.hpp:1230
Definition qos.hpp:1069
uint64_t nsec
Definition qos.hpp:1071
uint64_t sec
Definition qos.hpp:1070