Class QosOverridingOptions
Defined in File qos_overriding_options.hpp
Class Documentation
-
class QosOverridingOptions
Options that are passed in subscription/publisher constructor to specify QoSConfigurability.
This options struct allows configuring:
Which policy kinds will have declared parameters.
An optional callback, that will be called to validate the final qos profile.
An optional id. In the case that different qos are desired for two publishers/subscriptions in the same topic, this id will allow disambiguating them.
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
Public Functions
-
QosOverridingOptions() = default
Default constructor, no overrides allowed.
-
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_kinds – list of policy kinds that will be reconfigurable.
validation_callback – callbak that will be called to validate the validity of the qos profile set by the user.
id – id of the entity.
-
const std::string &get_id() const
-
const std::vector<QosPolicyKind> &get_policy_kinds() const
-
const QosCallback &get_validation_callback() const
Public Static Functions
-
static QosOverridingOptions with_default_policies(QosCallback validation_callback = nullptr, std::string id = {})
Construct passing a list of QoS policies and a verification callback.
Same as
QosOverridingOptions
constructor, but only declares the default policies:History, Depth, Reliability.