ROS 2 rclcpp + rcl - humble  humble
ROS 2 C++ Client Library with ROS Client Library
Public Member Functions | Static Public Member Functions | List of all members
rclcpp::QosOverridingOptions Class Reference

Options that are passed in subscription/publisher constructor to specify QoSConfigurability. More...

#include <rclcpp/qos_overriding_options.hpp>

Public Member Functions

RCLCPP_PUBLIC QosOverridingOptions ()=default
 Default constructor, no overrides allowed.
 
RCLCPP_PUBLIC QosOverridingOptions (std::initializer_list< QosPolicyKind > policy_kinds, QosCallback validation_callback=nullptr, std::string id={})
 Construct passing a list of QoS policies and a verification callback. More...
 
RCLCPP_PUBLIC const std::string & get_id () const
 
RCLCPP_PUBLIC const std::vector< QosPolicyKind > & get_policy_kinds () const
 
RCLCPP_PUBLIC const QosCallback & get_validation_callback () const
 

Static Public Member Functions

static RCLCPP_PUBLIC QosOverridingOptions with_default_policies (QosCallback validation_callback=nullptr, std::string id={})
 Construct passing a list of QoS policies and a verification callback. More...
 

Detailed Description

Options that are passed in subscription/publisher constructor to specify QoSConfigurability.

This options struct allows configuring:

Example parameter file:

my_node_name:
ros__parameters:
qos_overrides:
/my/topic/name:
publisher: # publisher without provided id
reliability: reliable
depth: 100
publisher_my_id: # publisher with `id="my_id"
reliability: reliable
depth: 10

Definition at line 89 of file qos_overriding_options.hpp.

Constructor & Destructor Documentation

◆ QosOverridingOptions()

rclcpp::QosOverridingOptions::QosOverridingOptions ( std::initializer_list< QosPolicyKind >  policy_kinds,
QosCallback  validation_callback = nullptr,
std::string  id = {} 
)

Construct passing a list of QoS policies and a verification callback.

This constructor is implicit, e.g.:

node->create_publisher(
"topic_name",
default_qos_profile,
{
{QosPolicyKind::Reliability},
[] (auto && qos) {return check_qos_validity(qos)},
"my_id"
});
Parameters
policy_kindslist of policy kinds that will be reconfigurable.
validation_callbackcallbak that will be called to validate the validity of the qos profile set by the user.
idid of the entity.

Definition at line 49 of file qos_overriding_options.cpp.

Member Function Documentation

◆ with_default_policies()

QosOverridingOptions rclcpp::QosOverridingOptions::with_default_policies ( QosCallback  validation_callback = nullptr,
std::string  id = {} 
)
static

Construct passing a list of QoS policies and a verification callback.

Same as QosOverridingOptions constructor, but only declares the default policies:

History, Depth, Reliability.

Definition at line 59 of file qos_overriding_options.cpp.


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