rclcpp  master
C++ ROS Client Library API
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 <qos_overriding_options.hpp>

Public Member Functions

 QosOverridingOptions ()=default
 Default constructor, no overrides allowed. More...
 
 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...
 
const std::stringget_id () const
 
const std::vector< QosPolicyKind > & get_policy_kinds () const
 
const QosCallbackget_validation_callback () const
 

Static Public Member Functions

static 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

Constructor & Destructor Documentation

◆ QosOverridingOptions() [1/2]

rclcpp::QosOverridingOptions::QosOverridingOptions ( )
default

Default constructor, no overrides allowed.

◆ QosOverridingOptions() [2/2]

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,
{
[] (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.

Member Function Documentation

◆ get_id()

const std::string& rclcpp::QosOverridingOptions::get_id ( ) const

◆ get_policy_kinds()

const std::vector<QosPolicyKind>& rclcpp::QosOverridingOptions::get_policy_kinds ( ) const

◆ get_validation_callback()

const QosCallback& rclcpp::QosOverridingOptions::get_validation_callback ( ) const

◆ with_default_policies()

static 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.


The documentation for this class was generated from the following file:
Reliability
Reliability
Definition: qos_overriding_options.hpp:44