<<value-type>> Container of the QoS policies that a dds::topic::Topic supports
More...
#include <dds/topic/qos/TopicQos.hpp>
<<value-type>> Container of the QoS policies that a dds::topic::Topic supports
TopicQos Policies
A TopicQos contains the following policies:
- dds::core::policy::TopicData,
- dds::core::policy::Durability,
- dds::core::policy::DurabilityService,
- dds::core::policy::Deadline,
- dds::core::policy::LatencyBudget,
- dds::core::policy::Liveliness,
- dds::core::policy::Reliability,
- dds::core::policy::DestinationOrder,
- dds::core::policy::History,
- dds::core::policy::ResourceLimits,
- dds::core::policy::TransportPriority,
- dds::core::policy::Lifespan,
- dds::core::policy::Ownership,
- dds::core::policy::DataRepresentation
To get or set policies use the policy() getters and setters or operator << (see examples).
You must set certain members in a consistent manner:
length of dds::topic::qos::TopicQos::topic_data .value <= dds::domain::qos::DomainParticipantQos::resource_limits .topic_data_max_length
If any of the above are not true, dds::topic::Topic::qos(const dds::topic::qos::TopicQos&), dds::topic::Topic::qos() and dds::domain::DomainParticipant::default_topic_qos will fail with dds::core::InconsistentPolicyError and the dds::topic::Topic constructors will fail with dds::core::Error
- Entity:
- dds::topic::Topic
- See also
- QoS Policies allowed ranges within each Qos.
-
Qos Use Cases
◆ TopicQos()
dds::topic::qos::TopicQos::TopicQos |
( |
| ) |
|
|
inline |
Creates a TopicQos with the default value for each policy.
◆ policy() [1/3]
template<typename POLICY >
const POLICY& dds::topic::qos::TopicQos::policy |
( |
| ) |
const |
◆ policy() [2/3]
template<typename POLICY >
POLICY& dds::topic::qos::TopicQos::policy |
( |
| ) |
|
◆ policy() [3/3]
template<typename Policy >
TopicQos& dds::topic::qos::TopicQos::policy |
( |
const Policy & |
p | ) |
|
|
inline |
◆ operator<<()
template<typename Policy >
TopicQos& dds::topic::qos::TopicQos::operator<< |
( |
const Policy & |
p | ) |
|
|
inline |
◆ operator>>()
template<typename Policy >
const TopicQos& dds::topic::qos::TopicQos::operator>> |
( |
Policy & |
p | ) |
const |
|
inline |
Copies the values of a policy.
- Parameters
-
p | The destination where to copy the current value of the Policy |
- See also
- policy()
-
Setting Qos Values
◆ to_string() [1/3]
<<extension>> Obtains a string representation of the dds::topic::qos::TopicQos
- Parameters
-
qos | The qos object to convert to a string |
format | The optional print format used to format the output string. |
The several to_string overloads allow formatting the output and printing only the differences with respect to another Qos object.
This overload uses the default print format and only prints the differences between qos and the documented default.
- Returns
- The string representation of the qos
◆ to_string() [2/3]
<<extension>> Obtains a string representation of the dds::topic::qos::TopicQos
- Parameters
-
qos | The qos object to convert to a string |
base | The base qos. Only the differences between base and qos are included in the output string. If you want to print everything within the QoS, use the overload that accepts a rti::core::qos_print_all_t. |
format | The optional print format used to format the output string. |
This overload prints the differences between qos and base. If no print format is specified, the default will be used.
- Returns
- The string representation of the qos
◆ to_string() [3/3]
<<extension>> Obtains a string representation of the dds::topic::qos::TopicQos
- Parameters
-
qos | The qos object to convert to a string |
qos_print_all | The sentinel value indicating that the entire QoS should be converted to a string. The other overloads of this API only print the differences with respect to a base profile, or to the documented default. |
format | The optional print format used to format the output string. |
This overload prints all of the policies within qos. If no print format is specified, the default will be used.
The only valid value for the qos_print_all argument is rti::core::qos_print_all
For example:
- Returns
- The string representation of the qos
◆ operator<<()
std::ostream & operator<< |
( |
std::ostream & |
out, |
|
|
const rti::topic::qos::TopicQos & |
qos |
|
) |
| |
|
related |