RTI Connext Modern C++ API Version 7.5.0
|
Contains the data representations supported by entities. More...
#include <dds/core/policy/CorePolicy.hpp>
Public Member Functions | |
DataRepresentation () | |
Creates an instance with one element, auto_id(). More... | |
DataRepresentation (const DataRepresentationIdSeq &seq) | |
Creates an instance with a sequence of DataRepresentationId. More... | |
DataRepresentation (const DataRepresentationId *value_begin, const DataRepresentationId *value_end) | |
Creates an instance with a sequence of DataRepresentationId. More... | |
template<typename ShortIter > | |
DataRepresentation & | value (ShortIter the_begin, ShortIter the_end) |
Sets the DataRepresentationId sequence. More... | |
DataRepresentationIdSeq | value () const |
Gets the DataRepresentation. More... | |
DataRepresentation & | value (const DataRepresentationIdSeq &source) |
Sets the data representation. More... | |
const rti::core::CompressionSettings & | compression_settings () const |
<<extension>> Gets the compression settings by const reference (see setter). More... | |
rti::core::CompressionSettings & | compression_settings () |
<<extension>> Gets the compression settings by non-const reference (see setter) More... | |
dds::core::policy::DataRepresentation & | compression_settings (const rti::core::CompressionSettings &compression_settings) |
<<extension>> Sets the compression settings. More... | |
Static Public Member Functions | |
static DataRepresentationId | xcdr () |
Extended Common Data Representation encoding version 1. More... | |
static DataRepresentationId | xml () |
XML Data Representation (unsupported) More... | |
static DataRepresentationId | xcdr2 () |
Extended Common Data Representation encoding version 2. More... | |
static DataRepresentationId | auto_id () |
Representation automatically chosen based on the type. More... | |
static DataRepresentation | create_empty () noexcept |
Unlike the default constructor, which returns a DataRepresentation instance with one element, auto_id, this static methods returns an empty DataRepresentation instance. More... | |
Contains the data representations supported by entities.
This policy has request-offer semantics for both representation and compression. For representation, a dds::pub::DataWriter may only offer a single representation. Attempting to put multiple representations in a dds::pub::DataWriter will result in dds::core::InconsistentPolicyError. A dds::pub::DataWriter will use its offered policy to communicate with its matched dds::sub::DataReader entities. A dds::sub::DataReader requests one or more representations. If a dds::pub::DataWriter offers a representation that is contained within the sequence of the dds::sub::DataReader, the offer satisfies the request and the policies are compatible. Otherwise, they are incompatible.
When representations are specified in the dds::topic::qos::TopicQos, dds::pub::qos::DataWriterQos::operator=(const dds::topic::qos::TopicQos&) copies the first element of the sequence, and dds::sub::qos::DataReaderQos::operator=(const dds::topic::qos::TopicQos&) copies the whole sequence.
For Compression, only the rti::core::CompressionSettings::compression_ids is propagated and a dds::pub::DataWriter may only offer a single compression id. Attempting to put multiple compression_ids in a dds::pub::DataWriter will result in dds::core::InconsistentPolicyError.
A dds::pub::DataWriter will use its offered compression algorithm to compress data that it sends to its matched dds::sub::DataReader entities. A dds::sub::DataReader requests zero or more compression algorithms. If a dds::pub::DataWriter offers a representation that is contained within the algorithms requested by the dds::sub::DataReader, the offer satisfies the request and the policies are compatible. Otherwise, they are incompatible.
When compression IDs are specified in the dds::topic::qos::TopicQos, dds::pub::qos::DataWriterQos::operator=(const dds::topic::qos::TopicQos&) copies a single compression ID (see rti::core::CompressionSettings::compression_ids), and dds::sub::qos::DataReaderQos::operator=(const dds::topic::qos::TopicQos&) copies all of the compression_ids.
|
inline |
Creates an instance with one element, auto_id().
|
inlineexplicit |
Creates an instance with a sequence of DataRepresentationId.
seq | A vector containing the DataRepresentationIds to create this DataRepresentation |
|
inline |
Creates an instance with a sequence of DataRepresentationId.
value_begin | Beginning of a range of DataRepresentationId |
value_end | End of the range |
|
inlinestaticnoexcept |
Unlike the default constructor, which returns a DataRepresentation instance with one element, auto_id, this static methods returns an empty DataRepresentation instance.
|
inline |
Sets the DataRepresentationId sequence.
ShortIter | An input iterator of DataRepresentationId. |
the_begin | Beginning of the range |
the_end | End of the range |
|
inline |
Gets the DataRepresentation.
|
inline |
Sets the data representation.
source | The vector where the DataRepresentationId will be copied from |
const rti::core::CompressionSettings & compression_settings | ( | ) | const |
<<extension>> Gets the compression settings by const reference (see setter).
rti::core::CompressionSettings & compression_settings | ( | ) |
<<extension>> Gets the compression settings by non-const reference (see setter)
dds::core::policy::DataRepresentation & compression_settings | ( | const rti::core::CompressionSettings & | compression_settings | ) |
<<extension>> Sets the compression settings.
compression_ids:
[default] The value depends on the entity
dds::pub::DataWriter and dds::topic::Topic are set to rti::core::CompressionIdMask::none()
dds::sub::DataReader rti::core::CompressionIdMask::all()
writer_compression_level:
[default] The value depends on the entity
dds::pub::DataWriter and dds::topic::Topic are set to rti::core::CompressionSettings::compression_level_default()
dds::sub::DataReader NOT SUPPORTED
writer_compression_threshold:
[default] The value depends on the entity
dds::pub::DataWriter and dds::topic::Topic are set to rti::core::CompressionSettings::compression_threshold_default()
dds::sub::DataReader NOT SUPPORTED