rclcpp  master
C++ ROS Client Library API
Public Member Functions | List of all members
rclcpp::QoS Class Reference

Encapsulation of Quality of Service settings. More...

#include <qos.hpp>

Inheritance diagram for rclcpp::QoS:
Inheritance graph
[legend]

Public Member Functions

 QoS (const QoSInitialization &qos_initialization, const rmw_qos_profile_t &initial_profile=rmw_qos_profile_default)
 Create a QoS by specifying only the history policy and history depth. More...
 
 QoS (size_t history_depth)
 Conversion constructor to ease construction in the common case of just specifying depth. More...
 
rmw_qos_profile_tget_rmw_qos_profile ()
 Return the rmw qos profile. More...
 
const rmw_qos_profile_tget_rmw_qos_profile () const
 Return the rmw qos profile. More...
 
QoShistory (HistoryPolicy history)
 Set the history policy. More...
 
QoShistory (rmw_qos_history_policy_t history)
 Set the history policy. More...
 
QoSkeep_last (size_t depth)
 Set the history to keep last. More...
 
QoSkeep_all ()
 Set the history to keep all. More...
 
QoSreliability (rmw_qos_reliability_policy_t reliability)
 Set the reliability setting. More...
 
QoSreliability (ReliabilityPolicy reliability)
 Set the reliability setting. More...
 
QoSreliable ()
 Set the reliability setting to reliable. More...
 
QoSbest_effort ()
 Set the reliability setting to best effort. More...
 
QoSdurability (rmw_qos_durability_policy_t durability)
 Set the durability setting. More...
 
QoSdurability (DurabilityPolicy durability)
 Set the durability setting. More...
 
QoSdurability_volatile ()
 Set the durability setting to volatile. More...
 
QoStransient_local ()
 Set the durability setting to transient local. More...
 
QoSdeadline (rmw_time_t deadline)
 Set the deadline setting. More...
 
QoSdeadline (const rclcpp::Duration &deadline)
 Set the deadline setting, rclcpp::Duration. More...
 
QoSlifespan (rmw_time_t lifespan)
 Set the lifespan setting. More...
 
QoSlifespan (const rclcpp::Duration &lifespan)
 Set the lifespan setting, rclcpp::Duration. More...
 
QoSliveliness (rmw_qos_liveliness_policy_t liveliness)
 Set the liveliness setting. More...
 
QoSliveliness (LivelinessPolicy liveliness)
 Set the liveliness setting. More...
 
QoSliveliness_lease_duration (rmw_time_t liveliness_lease_duration)
 Set the liveliness_lease_duration setting. More...
 
QoSliveliness_lease_duration (const rclcpp::Duration &liveliness_lease_duration)
 Set the liveliness_lease_duration setting, rclcpp::Duration. More...
 
QoSavoid_ros_namespace_conventions (bool avoid_ros_namespace_conventions)
 Set the avoid_ros_namespace_conventions setting. More...
 
HistoryPolicy history () const
 Get the history qos policy. More...
 
size_t depth () const
 Get the history depth. More...
 
ReliabilityPolicy reliability () const
 Get the reliability policy. More...
 
DurabilityPolicy durability () const
 Get the durability policy. More...
 
rclcpp::Duration deadline () const
 Get the deadline duration setting. More...
 
rclcpp::Duration lifespan () const
 Get the lifespan duration setting. More...
 
LivelinessPolicy liveliness () const
 Get the liveliness policy. More...
 
rclcpp::Duration liveliness_lease_duration () const
 Get the liveliness lease duration setting. More...
 
bool avoid_ros_namespace_conventions () const
 Get the avoid ros namespace convention setting. More...
 

Detailed Description

Encapsulation of Quality of Service settings.

Quality of Service settings control the behavior of publishers, subscriptions, and other entities, and includes things like how data is sent or resent, how data is buffered on the publishing and subscribing side, and other things. See: https://docs.ros.org/en/rolling/Concepts/About-Quality-of-Service-Settings.html

Constructor & Destructor Documentation

◆ QoS() [1/2]

rclcpp::QoS::QoS ( const QoSInitialization qos_initialization,
const rmw_qos_profile_t initial_profile = rmw_qos_profile_default 
)
explicit

Create a QoS by specifying only the history policy and history depth.

When using the default initial profile, the defaults will include:

See rmw_qos_profile_default for a full list of default settings. If some other rmw_qos_profile_t is passed to initial_profile, then the defaults will derive from that profile instead.

Parameters
[in]qos_initializationSpecifies history policy and history depth.
[in]initial_profileThe rmw_qos_profile_t instance on which to base the default settings.

◆ QoS() [2/2]

rclcpp::QoS::QoS ( size_t  history_depth)

Conversion constructor to ease construction in the common case of just specifying depth.

This is a convenience constructor that calls QoS(KeepLast(history_depth)).

Parameters
[in]history_depthHow many messages can be queued when publishing with a Publisher, or how many messages can be queued before being replaced by a Subscription.

Member Function Documentation

◆ get_rmw_qos_profile() [1/2]

rmw_qos_profile_t& rclcpp::QoS::get_rmw_qos_profile ( )

Return the rmw qos profile.

◆ get_rmw_qos_profile() [2/2]

const rmw_qos_profile_t& rclcpp::QoS::get_rmw_qos_profile ( ) const

Return the rmw qos profile.

◆ history() [1/3]

QoS& rclcpp::QoS::history ( HistoryPolicy  history)

Set the history policy.

◆ history() [2/3]

QoS& rclcpp::QoS::history ( rmw_qos_history_policy_t  history)

Set the history policy.

◆ keep_last()

QoS& rclcpp::QoS::keep_last ( size_t  depth)

Set the history to keep last.

◆ keep_all()

QoS& rclcpp::QoS::keep_all ( )

Set the history to keep all.

◆ reliability() [1/3]

QoS& rclcpp::QoS::reliability ( rmw_qos_reliability_policy_t  reliability)

Set the reliability setting.

◆ reliability() [2/3]

QoS& rclcpp::QoS::reliability ( ReliabilityPolicy  reliability)

Set the reliability setting.

◆ reliable()

QoS& rclcpp::QoS::reliable ( )

Set the reliability setting to reliable.

◆ best_effort()

QoS& rclcpp::QoS::best_effort ( )

Set the reliability setting to best effort.

◆ durability() [1/3]

QoS& rclcpp::QoS::durability ( rmw_qos_durability_policy_t  durability)

Set the durability setting.

◆ durability() [2/3]

QoS& rclcpp::QoS::durability ( DurabilityPolicy  durability)

Set the durability setting.

◆ durability_volatile()

QoS& rclcpp::QoS::durability_volatile ( )

Set the durability setting to volatile.

Note that this cannot be named volatile because it is a C++ keyword.

◆ transient_local()

QoS& rclcpp::QoS::transient_local ( )

Set the durability setting to transient local.

◆ deadline() [1/3]

QoS& rclcpp::QoS::deadline ( rmw_time_t  deadline)

Set the deadline setting.

◆ deadline() [2/3]

QoS& rclcpp::QoS::deadline ( const rclcpp::Duration deadline)

Set the deadline setting, rclcpp::Duration.

◆ lifespan() [1/3]

QoS& rclcpp::QoS::lifespan ( rmw_time_t  lifespan)

Set the lifespan setting.

◆ lifespan() [2/3]

QoS& rclcpp::QoS::lifespan ( const rclcpp::Duration lifespan)

Set the lifespan setting, rclcpp::Duration.

◆ liveliness() [1/3]

QoS& rclcpp::QoS::liveliness ( rmw_qos_liveliness_policy_t  liveliness)

Set the liveliness setting.

◆ liveliness() [2/3]

QoS& rclcpp::QoS::liveliness ( LivelinessPolicy  liveliness)

Set the liveliness setting.

◆ liveliness_lease_duration() [1/3]

QoS& rclcpp::QoS::liveliness_lease_duration ( rmw_time_t  liveliness_lease_duration)

Set the liveliness_lease_duration setting.

◆ liveliness_lease_duration() [2/3]

QoS& rclcpp::QoS::liveliness_lease_duration ( const rclcpp::Duration liveliness_lease_duration)

Set the liveliness_lease_duration setting, rclcpp::Duration.

◆ avoid_ros_namespace_conventions() [1/2]

QoS& rclcpp::QoS::avoid_ros_namespace_conventions ( bool  avoid_ros_namespace_conventions)

Set the avoid_ros_namespace_conventions setting.

◆ history() [3/3]

HistoryPolicy rclcpp::QoS::history ( ) const

Get the history qos policy.

◆ depth()

size_t rclcpp::QoS::depth ( ) const

Get the history depth.

◆ reliability() [3/3]

ReliabilityPolicy rclcpp::QoS::reliability ( ) const

Get the reliability policy.

◆ durability() [3/3]

DurabilityPolicy rclcpp::QoS::durability ( ) const

Get the durability policy.

◆ deadline() [3/3]

rclcpp::Duration rclcpp::QoS::deadline ( ) const

Get the deadline duration setting.

◆ lifespan() [3/3]

rclcpp::Duration rclcpp::QoS::lifespan ( ) const

Get the lifespan duration setting.

◆ liveliness() [3/3]

LivelinessPolicy rclcpp::QoS::liveliness ( ) const

Get the liveliness policy.

◆ liveliness_lease_duration() [3/3]

rclcpp::Duration rclcpp::QoS::liveliness_lease_duration ( ) const

Get the liveliness lease duration setting.

◆ avoid_ros_namespace_conventions() [2/2]

bool rclcpp::QoS::avoid_ros_namespace_conventions ( ) const

Get the avoid ros namespace convention setting.


The documentation for this class was generated from the following file: