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

<<extension>> Configures several resource management aspects of the built-in topic DataReaders More...

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

Public Member Functions

 BuiltinTopicReaderResourceLimits ()
 Creates an instance with the default settings.
 
BuiltinTopicReaderResourceLimitsinitial_samples (int32_t the_initial_samples)
 Initial number of samples.
 
int32_t initial_samples () const
 Getter (see setter with the same name)
 
BuiltinTopicReaderResourceLimitsmax_samples (int32_t the_max_samples)
 Maximum number of samples.
 
int32_t max_samples () const
 Getter (see setter with the same name)
 
BuiltinTopicReaderResourceLimitsinitial_infos (int32_t the_initial_infos)
 Initial number of sample infos.
 
int32_t initial_infos () const
 Getter (see setter with the same name)
 
BuiltinTopicReaderResourceLimitsmax_infos (int32_t the_max_infos)
 Maximum number of sample infos.
 
int32_t max_infos () const
 Getter (see setter with the same name)
 
BuiltinTopicReaderResourceLimitsinitial_outstanding_reads (int32_t the_initial_outstanding_reads)
 The initial number of outstanding reads that have not call finish yet on the same built-in topic dds::sub::DataReader.
 
int32_t initial_outstanding_reads () const
 Getter (see setter with the same name)
 
BuiltinTopicReaderResourceLimitsmax_outstanding_reads (int32_t the_max_outstanding_reads)
 The maximum number of outstanding reads that have not called finish yet on the same built-in topic dds::sub::DataReader.
 
int32_t max_outstanding_reads () const
 Getter (see setter with the same name)
 
BuiltinTopicReaderResourceLimitsmax_samples_per_read (int32_t the_max_samples_per_read)
 Maximum number of samples that can be read/taken on a same built-in topic dds::sub::DataReader.
 
int32_t max_samples_per_read () const
 Getter (see setter with the same name)
 
BuiltinTopicReaderResourceLimitsdisable_fragmentation_support (bool the_disable_fragmentation_support)
 Determines whether the built-in topic dds::sub::DataReader can receive fragmented samples.
 
bool disable_fragmentation_support () const
 Getter (see setter with the same name)
 
BuiltinTopicReaderResourceLimitsmax_fragmented_samples (int32_t the_max_fragmented_samples)
 The maximum number of samples for which the built-in topic dds::sub::DataReader may store fragments at a given point in time.
 
int32_t max_fragmented_samples () const
 Getter (see setter with the same name)
 
BuiltinTopicReaderResourceLimitsinitial_fragmented_samples (int32_t the_initial_fragmented_samples)
 The initial number of samples for which a built-in topic dds::sub::DataReader may store fragments.
 
int32_t initial_fragmented_samples () const
 Getter (see setter with the same name)
 
BuiltinTopicReaderResourceLimitsmax_fragmented_samples_per_remote_writer (int32_t the_max_fragmented_samples_per_remote_writer)
 The maximum number of samples per remote writer for which a built-in topic dds::sub::DataReader may store fragments.
 
int32_t max_fragmented_samples_per_remote_writer () const
 Getter (see setter with the same name)
 
BuiltinTopicReaderResourceLimitsmax_fragments_per_sample (int32_t the_max_fragments_per_sample)
 Maximum number of fragments for a single sample.
 
int32_t max_fragments_per_sample () const
 Getter (see setter with the same name)
 
BuiltinTopicReaderResourceLimitsdynamically_allocate_fragmented_samples (bool the_dynamically_allocate_fragmented_samples)
 Determines whether the built-in topic dds::sub::DataReader pre-allocates storage for storing fragmented samples.
 
bool dynamically_allocate_fragmented_samples () const
 Getter (see setter with the same name)
 

Detailed Description

<<extension>> Configures several resource management aspects of the built-in topic DataReaders

Defines the resources that can be used for a built-in-topic data reader.

A built-in topic data reader subscribes reliably to built-in topics containing declarations of new entities or updates to existing entities in the domain. Keys are used to differentiate among entities of the same type. RTI Connext assigns a unique key to each entity in a domain.

Properties:
RxO = N/A
Changeable = NO
QoS:
rti::core::policy::DiscoveryConfig

Constructor & Destructor Documentation

rti::core::policy::BuiltinTopicReaderResourceLimits::BuiltinTopicReaderResourceLimits ( )
inline

Creates an instance with the default settings.

Member Function Documentation

BuiltinTopicReaderResourceLimits& rti::core::policy::BuiltinTopicReaderResourceLimits::initial_samples ( int32_t  the_initial_samples)

Initial number of samples.

This should be a value between 1 and initial number of instance of the built-in-topic reader, depending on how many instances are sending data concurrently.

[default] 64

[range] [1, 1 million], <= max_samples

int32_t rti::core::policy::BuiltinTopicReaderResourceLimits::initial_samples ( ) const

Getter (see setter with the same name)

BuiltinTopicReaderResourceLimits& rti::core::policy::BuiltinTopicReaderResourceLimits::max_samples ( int32_t  the_max_samples)

Maximum number of samples.

This should be a value between 1 and max number of instance of the built-in-topic reader, depending on how many instances are sending data concurrently. Also, it should not be less than initial_samples.

[default] dds::core::LENGTH_UNLIMITED

[range] [1, 1 million] or dds::core::LENGTH_UNLIMITED, >= initial_samples

int32_t rti::core::policy::BuiltinTopicReaderResourceLimits::max_samples ( ) const

Getter (see setter with the same name)

BuiltinTopicReaderResourceLimits& rti::core::policy::BuiltinTopicReaderResourceLimits::initial_infos ( int32_t  the_initial_infos)

Initial number of sample infos.

The initial number of info units that a built-in topic dds::sub::DataReader can have. Info units are used to store dds::sub::SampleInfo.

[default] 64

[range] [1, 1 million] <= max_infos

int32_t rti::core::policy::BuiltinTopicReaderResourceLimits::initial_infos ( ) const

Getter (see setter with the same name)

BuiltinTopicReaderResourceLimits& rti::core::policy::BuiltinTopicReaderResourceLimits::max_infos ( int32_t  the_max_infos)

Maximum number of sample infos.

The maximum number of info units that a built-in topic dds::sub::DataReader can use to store dds::sub::SampleInfo.

[default] dds::core::LENGTH_UNLIMITED

[range] [1, 1 million] or dds::core::LENGTH_UNLIMITED, >= initial_infos

int32_t rti::core::policy::BuiltinTopicReaderResourceLimits::max_infos ( ) const

Getter (see setter with the same name)

BuiltinTopicReaderResourceLimits& rti::core::policy::BuiltinTopicReaderResourceLimits::initial_outstanding_reads ( int32_t  the_initial_outstanding_reads)

The initial number of outstanding reads that have not call finish yet on the same built-in topic dds::sub::DataReader.

[default] 2

[range] [1, 65536] or dds::core::LENGTH_UNLIMITED <= max_outstanding_reads

int32_t rti::core::policy::BuiltinTopicReaderResourceLimits::initial_outstanding_reads ( ) const

Getter (see setter with the same name)

BuiltinTopicReaderResourceLimits& rti::core::policy::BuiltinTopicReaderResourceLimits::max_outstanding_reads ( int32_t  the_max_outstanding_reads)

The maximum number of outstanding reads that have not called finish yet on the same built-in topic dds::sub::DataReader.

[default] dds::core::LENGTH_UNLIMITED

[range] [1, 65536] or dds::core::LENGTH_UNLIMITED, >= initial_outstanding_reads

int32_t rti::core::policy::BuiltinTopicReaderResourceLimits::max_outstanding_reads ( ) const

Getter (see setter with the same name)

BuiltinTopicReaderResourceLimits& rti::core::policy::BuiltinTopicReaderResourceLimits::max_samples_per_read ( int32_t  the_max_samples_per_read)

Maximum number of samples that can be read/taken on a same built-in topic dds::sub::DataReader.

[default] 1024

[range] [1, 65536]

int32_t rti::core::policy::BuiltinTopicReaderResourceLimits::max_samples_per_read ( ) const

Getter (see setter with the same name)

BuiltinTopicReaderResourceLimits& rti::core::policy::BuiltinTopicReaderResourceLimits::disable_fragmentation_support ( bool  the_disable_fragmentation_support)

Determines whether the built-in topic dds::sub::DataReader can receive fragmented samples.

When fragmentation support is not needed, disabling fragmentation support will save some memory resources.

[default] false

bool rti::core::policy::BuiltinTopicReaderResourceLimits::disable_fragmentation_support ( ) const

Getter (see setter with the same name)

BuiltinTopicReaderResourceLimits& rti::core::policy::BuiltinTopicReaderResourceLimits::max_fragmented_samples ( int32_t  the_max_fragmented_samples)

The maximum number of samples for which the built-in topic dds::sub::DataReader may store fragments at a given point in time.

At any given time, a built-in topic dds::sub::DataReader may store fragments for up to max_fragmented_samples samples while waiting for the remaining fragments. These samples need not have consecutive sequence numbers and may have been sent by different built-in topic dds::pub::DataWriter instances.

Once all fragments of a sample have been received, the sample is treated as a regular sample and becomes subject to standard QoS settings such as BuiltinTopicReaderResourceLimits_t::max_samples.

The middleware will drop fragments if the max_fragmented_samples limit has been reached. For best-effort communication, the middleware will accept a fragment for a new sample, but drop the oldest fragmented sample from the same remote writer. For reliable communication, the middleware will drop fragments for any new samples until all fragments for at least one older sample from that writer have been received.

Only applies if BuiltinTopicReaderResourceLimits_t::disable_fragmentation_support is false.

[default] 1024

[range] [1, 1 million]

int32_t rti::core::policy::BuiltinTopicReaderResourceLimits::max_fragmented_samples ( ) const

Getter (see setter with the same name)

BuiltinTopicReaderResourceLimits& rti::core::policy::BuiltinTopicReaderResourceLimits::initial_fragmented_samples ( int32_t  the_initial_fragmented_samples)

The initial number of samples for which a built-in topic dds::sub::DataReader may store fragments.

Only applies if BuiltinTopicReaderResourceLimits_t::disable_fragmentation_support is false.

[default] 4

[range] [1,1024], <= max_fragmented_samples

int32_t rti::core::policy::BuiltinTopicReaderResourceLimits::initial_fragmented_samples ( ) const

Getter (see setter with the same name)

BuiltinTopicReaderResourceLimits& rti::core::policy::BuiltinTopicReaderResourceLimits::max_fragmented_samples_per_remote_writer ( int32_t  the_max_fragmented_samples_per_remote_writer)

The maximum number of samples per remote writer for which a built-in topic dds::sub::DataReader may store fragments.

Logical limit so a single remote writer cannot consume all available resources.

Only applies if BuiltinTopicReaderResourceLimits_t::disable_fragmentation_support is false.

[default] 256

[range] [1, 1 million], <= max_fragmented_samples

int32_t rti::core::policy::BuiltinTopicReaderResourceLimits::max_fragmented_samples_per_remote_writer ( ) const

Getter (see setter with the same name)

BuiltinTopicReaderResourceLimits& rti::core::policy::BuiltinTopicReaderResourceLimits::max_fragments_per_sample ( int32_t  the_max_fragments_per_sample)

Maximum number of fragments for a single sample.

Only applies if BuiltinTopicReaderResourceLimits_t::disable_fragmentation_support is false.

[default] dds::core::LENGTH_UNLIMITED

[range] [1, 1 million] or dds::core::LENGTH_UNLIMITED

int32_t rti::core::policy::BuiltinTopicReaderResourceLimits::max_fragments_per_sample ( ) const

Getter (see setter with the same name)

BuiltinTopicReaderResourceLimits& rti::core::policy::BuiltinTopicReaderResourceLimits::dynamically_allocate_fragmented_samples ( bool  the_dynamically_allocate_fragmented_samples)

Determines whether the built-in topic dds::sub::DataReader pre-allocates storage for storing fragmented samples.

By default, the middleware does not allocate memory upfront, but instead allocates memory from the heap upon receiving the first fragment of a new sample. The amount of memory allocated equals the amount of memory needed to store all fragments in the sample. Once all fragments of a sample have been received, the sample is deserialized and stored in the regular receive queue. At that time, the dynamically allocated memory is freed again.

This QoS setting is useful for large, but variable-sized data types where upfront memory allocation for multiple samples based on the maximum possible sample size may be expensive. The main disadvantage of not pre-allocating memory is that one can no longer guarantee the middleware will have sufficient resources at run-time.

If dynamically_allocate_fragmented_samples is set to false, the middleware will allocate memory upfront for storing fragments for up to rti::core::policy::DataReaderResourceLimits::initial_fragmented_samples samples. This memory may grow up to rti::core::policy::DataReaderResourceLimits::max_fragmented_samples if needed.

Only applies if rti::core::policy::DataReaderResourceLimits::disable_fragmentation_support is false.

[default] true

bool rti::core::policy::BuiltinTopicReaderResourceLimits::dynamically_allocate_fragmented_samples ( ) const

Getter (see setter with the same name)


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