RTI Connext Modern C++ API  Version 6.0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dds::core::policy::DataRepresentation Class Reference

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().
 
 DataRepresentation (const DataRepresentationIdSeq &seq)
 Creates an instance with a sequence of DataRepresentationId.
 
 DataRepresentation (const DataRepresentationId *value_begin, const DataRepresentationId *value_end)
 Creates an instance with a sequence of DataRepresentationId.
 
template<typename ShortIter >
DataRepresentationvalue (ShortIter the_begin, ShortIter the_end)
 Sets the DataRepresentationId sequence.
 
DataRepresentationIdSeq value () const
 Gets the DataRepresentation.
 
DataRepresentationIdSeqvalue (DataRepresentationIdSeq &dest) const
 Gets the data representation.
 

Static Public Member Functions

static DataRepresentationId xcdr ()
 Extended Common Data Representation encoding version 1.
 
static DataRepresentationId xml ()
 XML Data Representation (unsupported)
 
static DataRepresentationId xcdr2 ()
 Extended Common Data Representation encoding version 2.
 
static DataRepresentationId auto_id ()
 Representation automatically chosen based on the type.
 

Detailed Description

Contains the data representations supported by entities.

Entity:
dds::topic::Topic, dds::sub::DataReader, dds::pub::DataWriter
Status:
dds::core::status::StatusMask::offered_incompatible_qos(), dds::core::status::StatusMask::requested_incompatible_qos()
Properties:
RxO = YES
Changeable = UNTIL ENABLE
See Also
DATA_REPRESENTATION

This policy has request-offer semantics. 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.

Constructor & Destructor Documentation

dds::core::policy::DataRepresentation::DataRepresentation ( )
inline

Creates an instance with one element, auto_id().

dds::core::policy::DataRepresentation::DataRepresentation ( const DataRepresentationIdSeq seq)
inlineexplicit

Creates an instance with a sequence of DataRepresentationId.

Parameters
seqA vector containing the DataRepresentationIds to create this DataRepresentation
dds::core::policy::DataRepresentation::DataRepresentation ( const DataRepresentationId value_begin,
const DataRepresentationId value_end 
)
inline

Creates an instance with a sequence of DataRepresentationId.

Parameters
value_beginBeginning of a range of DataRepresentationId
value_endEnd of the range

Member Function Documentation

template<typename ShortIter >
DataRepresentation& dds::core::policy::DataRepresentation::value ( ShortIter  the_begin,
ShortIter  the_end 
)
inline

Sets the DataRepresentationId sequence.

Template Parameters
ShortIterAn input iterator of DataRepresentationId.
Parameters
the_beginBeginning of the range
the_endEnd of the range
DataRepresentationIdSeq dds::core::policy::DataRepresentation::value ( ) const
inline

Gets the DataRepresentation.

Returns
the sequence of DataRepresentationId representing the data representations
DataRepresentationIdSeq& dds::core::policy::DataRepresentation::value ( DataRepresentationIdSeq dest) const
inline

Gets the data representation.

Parameters
destThe vector where the DataRepresentationId will be copied
Returns
A reference to dest

RTI Connext Modern C++ API Version 6.0.1 Copyright © Sat Nov 23 2019 Real-Time Innovations, Inc