RTI Connext Modern C++ API  Version 5.2.3
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dds::pub::qos::DataWriterQos Class Reference

<<value-type>> Container of the QoS policies that a dds::pub::DataWriter supports More...

#include <dds/pub/qos/DataWriterQos.hpp>

Public Member Functions

 DataWriterQos ()
 Creates a DataWriterQos with the default value for each policy.
 
DataWriterQosoperator= (const dds::topic::qos::TopicQos &topic_qos)
 Copies into this DataWriterQos those policies that are also in TopicQos.
 
template<typename Policy >
const Policy & policy () const
 Gets a QoS policy by const reference.
 
template<typename Policy >
Policy & policy ()
 Gets a QoS policy by reference.
 
template<typename Policy >
DataWriterQospolicy (const Policy &p)
 Sets a policy.
 
template<typename Policy >
DataWriterQosoperator<< (const Policy &p)
 Sets a policy.
 
template<typename Policy >
const DataWriterQosoperator>> (Policy &p) const
 Copies the values of a policy.
 

Detailed Description

<<value-type>> Container of the QoS policies that a dds::pub::DataWriter supports

DataWriterQos policies

A DataWriterQos contains the following policies:

To get or set policies use the policy() getters and setters or operator << (see examples).

You must set certain members in a consistent manner:

- dds::core::policy::History .depth <= dds::core::policy::ResourceLimits .max_samples_per_instance

- dds::core::policy::ResourceLimits .max_samples_per_instance <= dds::core::policy::ResourceLimits .max_samples

- dds::core::policy::ResourceLimits .initial_samples <= dds::core::policy::ResourceLimits .max_samples

- dds::core::policy::ResourceLimits .initial_instances <= dds::core::policy::ResourceLimits .max_instances

- length of dds::core::policy::UserData .value <= dds::domain::qos::DomainParticipantQos::resource_limits .writer_user_data_max_length

If any of the above are not true, dds::pub::DataWriter::qos(const dds::pub::qos::DataWriterQos&) and dds::pub::DataWriter::set_qos_with_profile and dds::pub::Publisher::default_datawriter_qos(const dds::pub::qos::DataWriterQos&) and dds::pub::Publisher::set_default_datawriter_qos_with_profile will fail with dds::core::InconsistentPolicyError and dds::pub::DataWriter constructors and dds::pub::DataWriter constructors and will return NULL.

Entity:
dds::pub::DataWriter
See Also
QoS Policies allowed ranges within each Qos.
Qos Use Cases

Constructor & Destructor Documentation

dds::pub::qos::DataWriterQos::DataWriterQos ( )

Creates a DataWriterQos with the default value for each policy.

Member Function Documentation

DataWriterQos& dds::pub::qos::DataWriterQos::operator= ( const dds::topic::qos::TopicQos topic_qos)
inline

Copies into this DataWriterQos those policies that are also in TopicQos.

Parameters
topic_qosThe TopicQos to copy the common policies from.
template<typename Policy >
const Policy& dds::pub::qos::DataWriterQos::policy ( ) const

Gets a QoS policy by const reference.

Template Parameters
PolicyOne of the DataWriterQos policies
See Also
Setting Qos Values
template<typename Policy >
Policy& dds::pub::qos::DataWriterQos::policy ( )

Gets a QoS policy by reference.

Template Parameters
PolicyOne of the DataWriterQos policies
See Also
Setting Qos Values
template<typename Policy >
DataWriterQos& dds::pub::qos::DataWriterQos::policy ( const Policy &  p)
inline

Sets a policy.

See Also
policy()
Setting Qos Values
template<typename Policy >
DataWriterQos& dds::pub::qos::DataWriterQos::operator<< ( const Policy &  p)
inline

Sets a policy.

See Also
policy()
Setting Qos Values
template<typename Policy >
const DataWriterQos& dds::pub::qos::DataWriterQos::operator>> ( Policy &  p) const
inline

Copies the values of a policy.

Parameters
pThe destination where to copy the current value of the Policy
See Also
policy()
Setting Qos Values

RTI Connext Modern C++ API Version 5.2.3 Copyright © Wed Apr 27 2016 Real-Time Innovations, Inc