RTI Connext Modern C++ API  Version 6.1.1
dds::core::policy::TopicData Class Reference

#include <dds/core/policy/CorePolicy.hpp>

Public Member Functions

 TopicData ()
 Creates an empty sequence of bytes. More...
 
 TopicData (const dds::core::ByteSeq &seq)
 Creates an instance from a vector of bytes. More...
 
 TopicData (const uint8_t *value_begin, const uint8_t *value_end)
 Creates an instance from a range of bytes. More...
 
template<typename OCTET_ITER >
TopicDatavalue (OCTET_ITER the_begin, OCTET_ITER the_end)
 Set the value for the topic data. More...
 
const dds::core::ByteSeq value () const
 Get the topic data. More...
 
dds::core::ByteSeqvalue (dds::core::ByteSeq &dst) const
 Get the topic data. More...
 
const uint8_t * begin () const
 Beginning of the range of bytes. More...
 
const uint8_t * end () const
 End of the range of bytes. More...
 

Detailed Description

Entity:
dds::topic::Topic
Properties:
RxO = NO
Changeable = YES
See also
dds::sub::builtin_subscriber

Usage

The purpose of this QoS is to allow the application to attach additional information to the created dds::topic::Topic objects, so that when a remote application discovers their existence, it can access that information and use it for its own purposes. This extra data is not used by RTI Connext.

One possible use of this QoS is to attach security credentials or some other information that can be used by the remote application to authenticate the source.

In combination with dds::sub::DataReaderListener, dds::pub::DataWriterListener, or operations such as dds::topic::ignore(), this QoS policy can assist an application in defining and enforcing its own security policies.

The use of this QoS is not limited to security; it offers a simple, yet flexible extensibility mechanism.

Important: RTI Connext stores the data placed in this policy in pre-allocated pools. It is therefore necessary to configure RTI Connext with the maximum size of the data that will be stored in policies of this type. This size is configured with rti::core::policy::DomainParticipantResourceLimits::topic_data_max_length.

See also
UserData

Constructor & Destructor Documentation

◆ TopicData() [1/3]

dds::core::policy::TopicData::TopicData ( )
inline

Creates an empty sequence of bytes.

◆ TopicData() [2/3]

dds::core::policy::TopicData::TopicData ( const dds::core::ByteSeq seq)
inlineexplicit

Creates an instance from a vector of bytes.

◆ TopicData() [3/3]

dds::core::policy::TopicData::TopicData ( const uint8_t *  value_begin,
const uint8_t *  value_end 
)
inline

Creates an instance from a range of bytes.

Member Function Documentation

◆ value() [1/3]

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

Set the value for the topic data.

◆ value() [2/3]

const dds::core::ByteSeq dds::core::policy::TopicData::value ( ) const
inline

Get the topic data.

◆ value() [3/3]

dds::core::ByteSeq& dds::core::policy::TopicData::value ( dds::core::ByteSeq dst) const
inline

Get the topic data.

◆ begin()

const uint8_t* dds::core::policy::TopicData::begin ( ) const
inline

Beginning of the range of bytes.

◆ end()

const uint8_t* dds::core::policy::TopicData::end ( ) const
inline

End of the range of bytes.