nros C++ API
Lightweight ROS 2 client for embedded real-time systems (C++ headers)
Loading...
Searching...
No Matches
qos.hpp File Reference

rclcpp::QoS — full DDS-shaped QoS settings (Phase 108.B.7). More...

#include <stdint.h>
#include "rclcpp/duration.hpp"
#include "rclc/visibility_control.h"
#include "rclcpp/logging.hpp"
#include <stddef.h>
Include dependency graph for qos.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  rclcpp::BestAvailableQoS
class  rclcpp::ClockQoS
 rclcpp::ClockQoS — KEEP_LAST(1), BEST_EFFORT, VOLATILE. ADOPT. More...
class  rclcpp::detail::is_qos_arg< F >
struct  nros_cpp_qos_t
class  rclcpp::ParameterEventsQoS
class  rclcpp::ParametersQoS
class  rclcpp::QoS
struct  rclcpp::detail::qos_arg_strip< F >
struct  rclcpp::detail::qos_arg_strip< const F & >
struct  rclcpp::detail::qos_arg_strip< const F >
struct  rclcpp::detail::qos_arg_strip< F & >
struct  rclcpp::detail::qos_table
struct  rclcpp::QoSInitialization
struct  rmw_qos_profile_s
struct  rmw_time_s
class  rclcpp::RosoutQoS
class  rclcpp::SensorDataQoS
 rmw_qos_profile_sensor_data — KEEP_LAST(5), BEST_EFFORT, VOLATILE. ADOPT. More...
class  rclcpp::ServicesQoS
class  rclcpp::SystemDefaultsQoS

Namespaces

namespace  rclcpp
namespace  rclcpp::detail

Macros

#define RMW_DURATION_INFINITE    { 9223372036LL, 854775807LL }
#define RMW_DURATION_UNSPECIFIED    { 0LL, 0LL }
#define RMW_QOS_DEADLINE_BEST_AVAILABLE    { 9223372036LL, 854775806LL }
#define RMW_QOS_DEADLINE_DEFAULT   RMW_DURATION_UNSPECIFIED
#define RMW_QOS_LIFESPAN_DEFAULT   RMW_DURATION_UNSPECIFIED
#define RMW_QOS_LIVELINESS_LEASE_DURATION_BEST_AVAILABLE    { 9223372036LL, 854775806LL }
#define RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT   RMW_DURATION_UNSPECIFIED
#define RMW_QOS_POLICY_DEPTH_SYSTEM_DEFAULT   0

Typedefs

typedef enum rmw_qos_durability_policy_e rmw_qos_durability_policy_t
typedef enum rmw_qos_history_policy_e rmw_qos_history_policy_t
typedef enum rmw_qos_liveliness_policy_e rmw_qos_liveliness_policy_t
typedef struct rmw_qos_profile_s rmw_qos_profile_t
typedef enum rmw_qos_reliability_policy_e rmw_qos_reliability_policy_t
typedef struct rmw_time_s rmw_time_t

Enumerations

enum class  rclcpp::DurabilityPolicy : int {
  rclcpp::Volatile = 0 , rclcpp::TransientLocal = 1 , rclcpp::SystemDefault = 2 , rclcpp::Unknown = 3 ,
  rclcpp::BestAvailable = 4
}
 Durability policy. Matches DDS DURABILITY_QOS_POLICY. More...
enum class  rclcpp::HistoryPolicy : int { rclcpp::KeepLast = 0 , rclcpp::KeepAll = 1 , rclcpp::SystemDefault = 2 , rclcpp::Unknown = 3 }
 History policy. Matches DDS HISTORY_QOS_POLICY. More...
enum class  rclcpp::LivelinessPolicy : int {
  rclcpp::SystemDefault = 0 , rclcpp::Automatic = 1 , rclcpp::ManualByTopic = 2 , rclcpp::ManualByNode = 3 ,
  rclcpp::Unknown = 4 , rclcpp::BestAvailable = 5
}
enum  nros_cpp_qos_durability_t {
  NROS_CPP_QOS_VOLATILE = 0 , NROS_CPP_QOS_TRANSIENT_LOCAL = 1 , NROS_CPP_QOS_DURABILITY_SYSTEM_DEFAULT = 2 , NROS_CPP_QOS_DURABILITY_UNKNOWN = 3 ,
  NROS_CPP_QOS_DURABILITY_BEST_AVAILABLE = 4
}
enum  nros_cpp_qos_history_t { NROS_CPP_QOS_KEEP_LAST = 0 , NROS_CPP_QOS_KEEP_ALL = 1 , NROS_CPP_QOS_HISTORY_SYSTEM_DEFAULT = 2 , NROS_CPP_QOS_HISTORY_UNKNOWN = 3 }
enum  nros_cpp_qos_liveliness_t {
  NROS_CPP_QOS_LIVELINESS_NONE = 0 , NROS_CPP_QOS_LIVELINESS_AUTOMATIC = 1 , NROS_CPP_QOS_LIVELINESS_MANUAL_BY_TOPIC = 2 , NROS_CPP_QOS_LIVELINESS_MANUAL_BY_NODE = 3 ,
  NROS_CPP_QOS_LIVELINESS_UNKNOWN = 4 , NROS_CPP_QOS_LIVELINESS_BEST_AVAILABLE = 5
}
enum  nros_cpp_qos_reliability_t {
  NROS_CPP_QOS_RELIABLE = 0 , NROS_CPP_QOS_BEST_EFFORT = 1 , NROS_CPP_QOS_RELIABILITY_SYSTEM_DEFAULT = 2 , NROS_CPP_QOS_RELIABILITY_UNKNOWN = 3 ,
  NROS_CPP_QOS_RELIABILITY_BEST_AVAILABLE = 4
}
enum class  rclcpp::ReliabilityPolicy : int {
  rclcpp::Reliable = 0 , rclcpp::BestEffort = 1 , rclcpp::SystemDefault = 2 , rclcpp::Unknown = 3 ,
  rclcpp::BestAvailable = 4
}
enum  rmw_qos_durability_policy_e {
  RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT = 0 , RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL = 1 , RMW_QOS_POLICY_DURABILITY_VOLATILE = 2 , RMW_QOS_POLICY_DURABILITY_UNKNOWN = 3 ,
  RMW_QOS_POLICY_DURABILITY_BEST_AVAILABLE = 4
}
enum  rmw_qos_history_policy_e { RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT = 0 , RMW_QOS_POLICY_HISTORY_KEEP_LAST = 1 , RMW_QOS_POLICY_HISTORY_KEEP_ALL = 2 , RMW_QOS_POLICY_HISTORY_UNKNOWN = 3 }
enum  rmw_qos_liveliness_policy_e {
  RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT = 0 , RMW_QOS_POLICY_LIVELINESS_AUTOMATIC = 1 , RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE = 2 , RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC = 3 ,
  RMW_QOS_POLICY_LIVELINESS_UNKNOWN = 4 , RMW_QOS_POLICY_LIVELINESS_BEST_AVAILABLE = 5
}
enum  rmw_qos_reliability_policy_e {
  RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT = 0 , RMW_QOS_POLICY_RELIABILITY_RELIABLE = 1 , RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT = 2 , RMW_QOS_POLICY_RELIABILITY_UNKNOWN = 3 ,
  RMW_QOS_POLICY_RELIABILITY_BEST_AVAILABLE = 4
}

Functions

constexpr QoS rclcpp::KeepAll ()
 rclcpp::KeepAll(). Same ADOPT-BOUNDED note as KeepLast.
constexpr QoS rclcpp::KeepLast (::size_t depth)
constexpr bool rclcpp::operator!= (const QoS &left, const QoS &right)
constexpr bool rclcpp::operator== (const QoS &left, const QoS &right)
constexpr QoS rclcpp::detail::qos_all_unknown ()
constexpr Duration rclcpp::detail::qos_best_available_duration ()
constexpr DurabilityPolicy rclcpp::detail::qos_durability_from_rmw (rmw_qos_durability_policy_t p)
constexpr rmw_qos_durability_policy_t rclcpp::detail::qos_durability_to_rmw (DurabilityPolicy p)
constexpr QoS rclcpp::detail::qos_from_ffi (const nros_cpp_qos_t &f)
constexpr HistoryPolicy rclcpp::detail::qos_history_from_rmw (rmw_qos_history_policy_t p)
constexpr rmw_qos_history_policy_t rclcpp::detail::qos_history_to_rmw (HistoryPolicy p)
constexpr LivelinessPolicy rclcpp::detail::qos_liveliness_from_rmw (rmw_qos_liveliness_policy_t p)
constexpr rmw_qos_liveliness_policy_t rclcpp::detail::qos_liveliness_to_rmw (LivelinessPolicy p)
const char * rclcpp::qos_policy_kind_to_cstr (uint32_t policy)
constexpr ReliabilityPolicy rclcpp::detail::qos_reliability_from_rmw (rmw_qos_reliability_policy_t p)
constexpr rmw_qos_reliability_policy_t rclcpp::detail::qos_reliability_to_rmw (ReliabilityPolicy p)
constexpr nros_cpp_qos_t rclcpp::detail::qos_to_ffi (const QoS &qos)
constexpr rmw_qos_profile_t rclcpp::detail::qos_to_rmw (const QoS &q)
constexpr Duration rclcpp::detail::qos_window_duration (uint32_t ms)
constexpr uint32_t rclcpp::detail::qos_window_from_rmw (const rmw_time_t &t)
constexpr uint32_t rclcpp::detail::qos_window_ms (const Duration &d)
constexpr rmw_time_t rclcpp::detail::qos_window_to_rmw (uint32_t ms)
const char * rclcpp::rclc_qos_policy_kind_to_cstr (uint32_t policy)

Variables

static constexpr rmw_qos_profile_t rmw_qos_profile_default
static constexpr rmw_qos_profile_t rmw_qos_profile_parameter_events
static constexpr rmw_qos_profile_t rmw_qos_profile_parameters
static constexpr rmw_qos_profile_t rmw_qos_profile_sensor_data
static constexpr rmw_qos_profile_t rmw_qos_profile_services_default

Detailed Description

rclcpp::QoS — full DDS-shaped QoS settings (Phase 108.B.7).

Macro Definition Documentation

◆ RMW_DURATION_INFINITE

#define RMW_DURATION_INFINITE    { 9223372036LL, 854775807LL }

◆ RMW_DURATION_UNSPECIFIED

#define RMW_DURATION_UNSPECIFIED    { 0LL, 0LL }

◆ RMW_QOS_DEADLINE_BEST_AVAILABLE

#define RMW_QOS_DEADLINE_BEST_AVAILABLE    { 9223372036LL, 854775806LL }

◆ RMW_QOS_DEADLINE_DEFAULT

#define RMW_QOS_DEADLINE_DEFAULT   RMW_DURATION_UNSPECIFIED

◆ RMW_QOS_LIFESPAN_DEFAULT

#define RMW_QOS_LIFESPAN_DEFAULT   RMW_DURATION_UNSPECIFIED

◆ RMW_QOS_LIVELINESS_LEASE_DURATION_BEST_AVAILABLE

#define RMW_QOS_LIVELINESS_LEASE_DURATION_BEST_AVAILABLE    { 9223372036LL, 854775806LL }

◆ RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT

#define RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT   RMW_DURATION_UNSPECIFIED

◆ RMW_QOS_POLICY_DEPTH_SYSTEM_DEFAULT

#define RMW_QOS_POLICY_DEPTH_SYSTEM_DEFAULT   0

Typedef Documentation

◆ rmw_qos_durability_policy_t

◆ rmw_qos_history_policy_t

◆ rmw_qos_liveliness_policy_t

◆ rmw_qos_profile_t

Upstream's rmw_qos_profile_t (rmw/types.h): same fields, same order, same types. An aggregate, so upstream's brace initialisers compile.

The one addition is the conversion to rclcpp::QoS, which is what lets a profile reach a verb that takes QoS — Humble's create_service takes the struct, ours takes QoS. A profile carrying a SYSTEM_DEFAULT or UNKNOWN policy converts to a QoS carrying the same sentinel, exactly as a get_actual_qos() read-back does; no constant below carries one except liveliness, which every upstream profile leaves to the middleware.

◆ rmw_qos_reliability_policy_t

◆ rmw_time_t

typedef struct rmw_time_s rmw_time_t

Upstream's rmw_time_t (rmw/time.h): a duration as seconds plus nanoseconds, both unsigned.

Enumeration Type Documentation

◆ nros_cpp_qos_durability_t

Enumerator
NROS_CPP_QOS_VOLATILE 
NROS_CPP_QOS_TRANSIENT_LOCAL 
NROS_CPP_QOS_DURABILITY_SYSTEM_DEFAULT 
NROS_CPP_QOS_DURABILITY_UNKNOWN 
NROS_CPP_QOS_DURABILITY_BEST_AVAILABLE 

◆ nros_cpp_qos_history_t

Enumerator
NROS_CPP_QOS_KEEP_LAST 
NROS_CPP_QOS_KEEP_ALL 
NROS_CPP_QOS_HISTORY_SYSTEM_DEFAULT 
NROS_CPP_QOS_HISTORY_UNKNOWN 

◆ nros_cpp_qos_liveliness_t

Enumerator
NROS_CPP_QOS_LIVELINESS_NONE 
NROS_CPP_QOS_LIVELINESS_AUTOMATIC 
NROS_CPP_QOS_LIVELINESS_MANUAL_BY_TOPIC 
NROS_CPP_QOS_LIVELINESS_MANUAL_BY_NODE 
NROS_CPP_QOS_LIVELINESS_UNKNOWN 
NROS_CPP_QOS_LIVELINESS_BEST_AVAILABLE 

◆ nros_cpp_qos_reliability_t

Enumerator
NROS_CPP_QOS_RELIABLE 
NROS_CPP_QOS_BEST_EFFORT 
NROS_CPP_QOS_RELIABILITY_SYSTEM_DEFAULT 
NROS_CPP_QOS_RELIABILITY_UNKNOWN 
NROS_CPP_QOS_RELIABILITY_BEST_AVAILABLE 

◆ rmw_qos_durability_policy_e

Enumerator
RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT 
RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL 
RMW_QOS_POLICY_DURABILITY_VOLATILE 
RMW_QOS_POLICY_DURABILITY_UNKNOWN 
RMW_QOS_POLICY_DURABILITY_BEST_AVAILABLE 

◆ rmw_qos_history_policy_e

Enumerator
RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT 
RMW_QOS_POLICY_HISTORY_KEEP_LAST 
RMW_QOS_POLICY_HISTORY_KEEP_ALL 
RMW_QOS_POLICY_HISTORY_UNKNOWN 

◆ rmw_qos_liveliness_policy_e

Enumerator
RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT 
RMW_QOS_POLICY_LIVELINESS_AUTOMATIC 
RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE 

Deprecated upstream; kept because the value is upstream's.

RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC 
RMW_QOS_POLICY_LIVELINESS_UNKNOWN 
RMW_QOS_POLICY_LIVELINESS_BEST_AVAILABLE 

◆ rmw_qos_reliability_policy_e

Enumerator
RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT 
RMW_QOS_POLICY_RELIABILITY_RELIABLE 
RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT 
RMW_QOS_POLICY_RELIABILITY_UNKNOWN 
RMW_QOS_POLICY_RELIABILITY_BEST_AVAILABLE 

Variable Documentation

◆ rmw_qos_profile_default

rmw_qos_profile_t rmw_qos_profile_default
staticconstexpr
Initial value:
=
constexpr rmw_qos_profile_t qos_to_rmw(const QoS &q)
Definition qos.hpp:1257
static constexpr QoS default_profile()
Definition qos.hpp:656

Upstream's five concrete profiles, each the row of rclcpp::detail:: qos_table lowered to upstream's struct, so the table is still the one place a profile's policies are spelled.

◆ rmw_qos_profile_parameter_events

rmw_qos_profile_t rmw_qos_profile_parameter_events
staticconstexpr
Initial value:

◆ rmw_qos_profile_parameters

rmw_qos_profile_t rmw_qos_profile_parameters
staticconstexpr
Initial value:
=
static constexpr QoS parameters()
rmw_qos_profile_parameters — KEEP_LAST(1000), RELIABLE, VOLATILE.
Definition qos.hpp:669

◆ rmw_qos_profile_sensor_data

rmw_qos_profile_t rmw_qos_profile_sensor_data
staticconstexpr
Initial value:
=
static constexpr QoS sensor_data()
rmw_qos_profile_sensor_data — KEEP_LAST(5), BEST_EFFORT, VOLATILE.
Definition qos.hpp:659

◆ rmw_qos_profile_services_default

rmw_qos_profile_t rmw_qos_profile_services_default
staticconstexpr
Initial value: