RTI Connext Modern C++ API Version 7.3.0
rti::core::policy::DataReaderResourceLimits Class Reference

<<extension>> Configures the memory usage of a dds::pub::DataReader More...

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

Public Member Functions

 DataReaderResourceLimits ()
 Creates a DataReaderResourceLimits qos policy with default values. More...
 
DataReaderResourceLimitsmax_remote_writers (int32_t the_max_remote_writers)
 The maximum number of remote writers from which a dds::sub::DataReader may read, including all instances. More...
 
int32_t max_remote_writers () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsmax_remote_writers_per_instance (int32_t the_max_remote_writers_per_instance)
 The maximum number of remote writers from which a dds::sub::DataReader may read a single instance. More...
 
int32_t max_remote_writers_per_instance () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsmax_samples_per_remote_writer (int32_t the_max_samples_per_remote_writer)
 The maximum number of out-of-order samples from a given remote dds::pub::DataWriter that a dds::sub::DataReader may store when maintaining a reliable connection to the dds::pub::DataWriter. More...
 
int32_t max_samples_per_remote_writer () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsmax_infos (int32_t the_max_infos)
 The maximum number of info units that a dds::sub::DataReader can use to store dds::sub::SampleInfo. More...
 
int32_t max_infos () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsinitial_remote_writers (int32_t the_initial_remote_writers)
 The initial number of remote writers from which a dds::sub::DataReader may read, including all instances. More...
 
int32_t initial_remote_writers () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsinitial_remote_writers_per_instance (int32_t the_initial_remote_writers_per_instance)
 The initial number of remote writers from which a dds::sub::DataReader may read a single instance. More...
 
int32_t initial_remote_writers_per_instance () const
 Getter (see setter with the same name) More...
 
int32_t initial_infos () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsinitial_outstanding_reads (int32_t the_initial_outstanding_reads)
 The initial number of outstanding calls to read/take (or one of their variants) on the same dds::sub::DataReader for which memory has not been returned by calling dds::sub::LoanedSamples::return_loan(). More...
 
int32_t initial_outstanding_reads () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsmax_outstanding_reads (int32_t the_max_outstanding_reads)
 The maximum number of outstanding read/take calls (or one of their variants) on the same dds::sub::DataReader for which memory has not been returned by calling dds::sub::LoanedSamples::return_loan(). More...
 
int32_t max_outstanding_reads () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsmax_samples_per_read (int32_t the_max_samples_per_read)
 The maximum number of data samples that the application can receive from the middleware in a single call to dds::sub::DataReader::read or dds::sub::DataReader::take. If more data exists in the middleware, the application will need to issue multiple read/take calls. More...
 
int32_t max_samples_per_read () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsdisable_fragmentation_support (bool the_disable_fragmentation_support)
 Determines whether the dds::sub::DataReader can receive fragmented samples. More...
 
bool disable_fragmentation_support () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsmax_fragmented_samples (int32_t the_max_fragmented_samples)
 The maximum number of samples for which the dds::sub::DataReader may store fragments at a given point in time. More...
 
int32_t max_fragmented_samples () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsinitial_fragmented_samples (int32_t the_initial_fragmented_samples)
 The initial number of samples for which a dds::sub::DataReader may store fragments. More...
 
int32_t initial_fragmented_samples () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsmax_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 dds::sub::DataReader may store fragments. More...
 
int32_t max_fragmented_samples_per_remote_writer () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsmax_fragments_per_sample (int32_t the_max_fragments_per_sample)
 Maximum number of fragments for a single sample. More...
 
int32_t max_fragments_per_sample () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsdynamically_allocate_fragmented_samples (bool the_dynamically_allocate_fragmented_samples)
 Determines whether the dds::sub::DataReader pre-allocates storage for storing fragmented samples. More...
 
bool dynamically_allocate_fragmented_samples () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsmax_total_instances (int32_t the_max_total_instances)
 Maximum number of instances for which a DataReader will keep state. More...
 
int32_t max_total_instances () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsmax_remote_virtual_writers (int32_t the_max_remote_virtual_writers)
 The maximum number of remote virtual writers from which a dds::sub::DataReader may read, including all instances. More...
 
int32_t max_remote_virtual_writers () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsinitial_remote_virtual_writers (int32_t the_initial_remote_virtual_writers)
 The initial number of remote virtual writers from which a dds::sub::DataReader may read, including all instances. More...
 
int32_t initial_remote_virtual_writers () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsmax_remote_virtual_writers_per_instance (int32_t the_max_remote_virtual_writers_per_instance)
 The maximum number of virtual remote writers that can be associated with an instance. More...
 
int32_t max_remote_virtual_writers_per_instance () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsinitial_remote_virtual_writers_per_instance (int32_t the_initial_remote_virtual_writers_per_instance)
 The initial number of virtual remote writers per instance. More...
 
int32_t initial_remote_virtual_writers_per_instance () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsmax_remote_writers_per_sample (int32_t the_max_remote_writers_per_sample)
 The maximum number of remote writers allowed to write the same sample. More...
 
int32_t max_remote_writers_per_sample () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsmax_query_condition_filters (int32_t the_max_query_condition_filters)
 The maximum number of query condition filters a reader is allowed. More...
 
int32_t max_query_condition_filters () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsmax_app_ack_response_length (int32_t the_max_app_ack_response_length)
 Maximum length of application-level acknowledgment response data. More...
 
int32_t max_app_ack_response_length () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitskeep_minimum_state_for_instances (bool the_keep_minimum_state_for_instances)
 Whether or not keep a minimum instance state for up to rti::core::policy::DataReaderResourceLimits::max_total_instances. More...
 
bool keep_minimum_state_for_instances () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsinitial_topic_queries (int32_t the_initial_topic_queries)
 The initial number of TopicQueries allocated by a dds::sub::DataReader. More...
 
int32_t initial_topic_queries () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsmax_topic_queries (int32_t the_max_topic_queries)
 The maximum number of active TopicQueries that a dds::sub::DataReader can create. More...
 
int32_t max_topic_queries () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsautopurge_remote_not_alive_writer_delay (const dds::core::Duration &d)
 Maximum duration for which the dds::sub::DataReader will maintain information regarding a dds::pub::DataWriter once the dds::pub::DataWriter has become not alive. More...
 
dds::core::Duration autopurge_remote_not_alive_writer_delay () const
 Getter (see setter with the same name) More...
 
DataReaderResourceLimitsautopurge_remote_virtual_writer_delay (const dds::core::Duration &d)
 Maximum duration for which the dds::sub::DataReader will maintain information regarding a virtual dds::pub::DataWriter once the dds::pub::DataWriter has become detached. More...
 
dds::core::Duration autopurge_remote_virtual_writer_delay () const
 Getter (see setter with the same name) More...
 
const AllocationSettingsshmem_ref_transfer_mode_attached_segment_allocation () const
 Allocation resource for the shared memory segments attached by the dds::sub::DataReader. More...
 
AllocationSettingsshmem_ref_transfer_mode_attached_segment_allocation ()
 Getter by non-const reference (see getter by const reference with the same name) More...
 
const DataReaderResourceLimitsInstanceReplacementSettingsinstance_replacement () const
 Sets the kind of instances allowed to be replaced for each instance state (dds::sub::status::InstanceState) when a DataReader reaches dds::core::policy::ResourceLimits::max_instances. More...
 
DataReaderResourceLimitsInstanceReplacementSettingsinstance_replacement ()
 Getter by non-const reference (see getter by const reference with the same name) More...
 

Static Public Member Functions

static DDS_Long auto_max_total_instances ()
 <<extension>> This value is used to make rti::core::policy::DataReaderResourceLimits::max_total_instances equal to dds::core::policy::ResourceLimits::max_instances. More...
 

Detailed Description

<<extension>> Configures the memory usage of a dds::pub::DataReader

DataReaders must allocate internal structures to handle the maximum number of DataWriters that may connect to it, whether or not a dds::sub::DataReader handles data fragmentation and how many data fragments that it may handle (for data samples larger than the MTU of the underlying network transport), how many simultaneous outstanding loans of internal memory holding data samples can be provided to user code, as well as others.

Most of these internal structures start at an initial size and, by default, will grow as needed by dynamically allocating additional memory. You may set fixed, maximum sizes for these internal structures if you want to bound the amount of memory that can be used by a dds::sub::DataReader. By setting the initial size to the maximum size, you will prevent RTI Connext from dynamically allocating any memory after the creation of the dds::sub::DataReader.

This QoS policy is an extension to the DDS standard.

Entity:
dds::sub::DataReader
Properties:
RxO = N/A
Changeable = NO

Constructor & Destructor Documentation

◆ DataReaderResourceLimits()

rti::core::policy::DataReaderResourceLimits::DataReaderResourceLimits ( )
inline

Creates a DataReaderResourceLimits qos policy with default values.

Member Function Documentation

◆ max_remote_writers() [1/2]

DataReaderResourceLimits & rti::core::policy::DataReaderResourceLimits::max_remote_writers ( int32_t  the_max_remote_writers)

The maximum number of remote writers from which a dds::sub::DataReader may read, including all instances.

[default] dds::core::LENGTH_UNLIMITED
[range] [1, 1 million] or dds::core::LENGTH_UNLIMITED, >= initial_remote_writers, >= max_remote_writers_per_instance

For unkeyed types, this value has to be equal to max_remote_writers_per_instance if max_remote_writers_per_instance is not equal to dds::core::LENGTH_UNLIMITED.

Note: For efficiency, set max_remote_writers >= rti::core::policy::DataReaderResourceLimits::max_remote_writers_per_instance.

◆ max_remote_writers() [2/2]

int32_t rti::core::policy::DataReaderResourceLimits::max_remote_writers ( ) const

Getter (see setter with the same name)

◆ max_remote_writers_per_instance() [1/2]

DataReaderResourceLimits & rti::core::policy::DataReaderResourceLimits::max_remote_writers_per_instance ( int32_t  the_max_remote_writers_per_instance)

The maximum number of remote writers from which a dds::sub::DataReader may read a single instance.

[default] dds::core::LENGTH_UNLIMITED

[range] [1, 1024] or dds::core::LENGTH_UNLIMITED, <= max_remote_writers or dds::core::LENGTH_UNLIMITED, >= initial_remote_writers_per_instance

For unkeyed types, this value has to be equal to max_remote_writers if it is not dds::core::LENGTH_UNLIMITED.

Note: For efficiency, set max_remote_writers_per_instance <= rti::core::policy::DataReaderResourceLimits::max_remote_writers

◆ max_remote_writers_per_instance() [2/2]

int32_t rti::core::policy::DataReaderResourceLimits::max_remote_writers_per_instance ( ) const

Getter (see setter with the same name)

◆ max_samples_per_remote_writer() [1/2]

DataReaderResourceLimits & rti::core::policy::DataReaderResourceLimits::max_samples_per_remote_writer ( int32_t  the_max_samples_per_remote_writer)

The maximum number of out-of-order samples from a given remote dds::pub::DataWriter that a dds::sub::DataReader may store when maintaining a reliable connection to the dds::pub::DataWriter.

[default] dds::core::LENGTH_UNLIMITED

[range] [1, 100 million] or dds::core::LENGTH_UNLIMITED, <= dds::core::policy::ResourceLimits::max_samples

◆ max_samples_per_remote_writer() [2/2]

int32_t rti::core::policy::DataReaderResourceLimits::max_samples_per_remote_writer ( ) const

Getter (see setter with the same name)

References rti::core::policy::DataWriterTransferMode::shmem_ref_settings().

◆ max_infos() [1/2]

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

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

When read/take is called on a DataReader, the DataReader passes a sequence of data samples and an associated sample info sequence. The sample info sequence contains additional information for each data sample.

max_infos determines the resources allocated for storing sample info. This memory is loaned to the application when passing a sample info sequence.

Note that sample info is a snapshot, generated when read/take is called.

max_infos should not be less than max_samples.

[default] dds::core::LENGTH_UNLIMITED

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

◆ max_infos() [2/2]

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

Getter (see setter with the same name)

◆ initial_remote_writers() [1/2]

DataReaderResourceLimits & rti::core::policy::DataReaderResourceLimits::initial_remote_writers ( int32_t  the_initial_remote_writers)

The initial number of remote writers from which a dds::sub::DataReader may read, including all instances.

[default] 2

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

For unkeyed types this value has to be equal to initial_remote_writers_per_instance.

Note: For efficiency, set initial_remote_writers >= rti::core::policy::DataReaderResourceLimits::initial_remote_writers_per_instance.

◆ initial_remote_writers() [2/2]

int32_t rti::core::policy::DataReaderResourceLimits::initial_remote_writers ( ) const

Getter (see setter with the same name)

◆ initial_remote_writers_per_instance() [1/2]

DataReaderResourceLimits & rti::core::policy::DataReaderResourceLimits::initial_remote_writers_per_instance ( int32_t  the_initial_remote_writers_per_instance)

The initial number of remote writers from which a dds::sub::DataReader may read a single instance.

[default] 2

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

For unkeyed types this value has to be equal to initial_remote_writers.

Note: For efficiency, set initial_remote_writers_per_instance <= rti::core::policy::DataReaderResourceLimits::initial_remote_writers.

◆ initial_remote_writers_per_instance() [2/2]

int32_t rti::core::policy::DataReaderResourceLimits::initial_remote_writers_per_instance ( ) const

Getter (see setter with the same name)

◆ initial_infos()

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

Getter (see setter with the same name)

◆ initial_outstanding_reads() [1/2]

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

The initial number of outstanding calls to read/take (or one of their variants) on the same dds::sub::DataReader for which memory has not been returned by calling dds::sub::LoanedSamples::return_loan().

[default] 2

[range] [1, 65536], <= max_outstanding_reads

◆ initial_outstanding_reads() [2/2]

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

Getter (see setter with the same name)

◆ max_outstanding_reads() [1/2]

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

The maximum number of outstanding read/take calls (or one of their variants) on the same dds::sub::DataReader for which memory has not been returned by calling dds::sub::LoanedSamples::return_loan().

[default] dds::core::LENGTH_UNLIMITED

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

◆ max_outstanding_reads() [2/2]

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

Getter (see setter with the same name)

◆ max_samples_per_read() [1/2]

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

The maximum number of data samples that the application can receive from the middleware in a single call to dds::sub::DataReader::read or dds::sub::DataReader::take. If more data exists in the middleware, the application will need to issue multiple read/take calls.

When reading data using listeners, the expected number of samples available for delivery in a single take call is typically small: usually just one, in the case of unbatched data, or the number of samples in a single batch, in the case of batched data. (See rti::core::policy::Batch for more information about this feature.) When polling for data or using a dds::core::cond::WaitSet, however, multiple samples (or batches) could be retrieved at once, depending on the data rate.

A larger value for this parameter makes the API simpler to use at the expense of some additional memory consumption.

[default] 1024

[range] [1,65536]

◆ max_samples_per_read() [2/2]

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

Getter (see setter with the same name)

◆ disable_fragmentation_support() [1/2]

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

Determines whether the dds::sub::DataReader can receive fragmented samples.

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

[default] false

◆ disable_fragmentation_support() [2/2]

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

Getter (see setter with the same name)

◆ max_fragmented_samples() [1/2]

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

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

At any given time, a 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 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 dds::core::policy::ResourceLimits::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 rti::core::policy::DataReaderResourceLimits::disable_fragmentation_support is false.

[default] 1024

[range] [1, 1 million]

◆ max_fragmented_samples() [2/2]

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

Getter (see setter with the same name)

◆ initial_fragmented_samples() [1/2]

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

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

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

[default] 4

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

◆ initial_fragmented_samples() [2/2]

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

Getter (see setter with the same name)

◆ max_fragmented_samples_per_remote_writer() [1/2]

DataReaderResourceLimits & rti::core::policy::DataReaderResourceLimits::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 dds::sub::DataReader may store fragments.

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

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

[default] 256

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

◆ max_fragmented_samples_per_remote_writer() [2/2]

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

Getter (see setter with the same name)

◆ max_fragments_per_sample() [1/2]

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

Maximum number of fragments for a single sample.

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

[default] dds::core::LENGTH_UNLIMITED

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

◆ max_fragments_per_sample() [2/2]

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

Getter (see setter with the same name)

◆ dynamically_allocate_fragmented_samples() [1/2]

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

Determines whether the 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 runtime.

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

◆ dynamically_allocate_fragmented_samples() [2/2]

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

Getter (see setter with the same name)

◆ max_total_instances() [1/2]

DataReaderResourceLimits & rti::core::policy::DataReaderResourceLimits::max_total_instances ( int32_t  the_max_total_instances)

Maximum number of instances for which a DataReader will keep state.

The maximum number of instances actively managed by a DataReader is determined by dds::core::policy::ResourceLimits::max_instances.

These instances have associated DataWriters or samples in the DataReader's queue and are visible to the user through operations such as dds::sub::DataReader::take, dds::sub::DataReader::read, and dds::sub::DataReader::key_value.

The features Durable Reader State, MultiChannel DataWriters and RTI Persistence Service require RTI Connext to keep some internal state even for instances without DataWriters or samples in the DataReader's queue. The additional state is used to filter duplicate samples that could be coming from different DataWriter channels or from multiple executions of RTI Persistence Service.

The total maximum number of instances that will be managed by the middleware, including instances without associated DataWriters or samples, is determined by max_total_instances.

When a new instance is received, RTI Connext will check the resource limit dds::core::policy::ResourceLimits::max_instances. If the limit is exceeded, RTI Connext will drop the sample with the reason LOST_BY_INSTANCES_LIMIT. If the limit is not exceeded, RTI Connext will check max_total_instances. If max_total_instances is exceeded, RTI Connext will replace an existing instance without DataWriters and samples with the new one. The application could receive duplicate samples for the replaced instance if it becomes alive again.

The max_total_instances limit is not used if rti::core::policy::DataReaderResourceLimits::keep_minimum_state_for_instances is false, and in that case should be left at the default value.

[default] rti::core::policy::DataReaderResourceLimits::auto_max_total_instances

[range] [1, 1 million] or dds::core::LENGTH_UNLIMITED or rti::core::policy::DataReaderResourceLimits::auto_max_total_instances, >= dds::core::policy::ResourceLimits::max_instances

◆ max_total_instances() [2/2]

int32_t rti::core::policy::DataReaderResourceLimits::max_total_instances ( ) const

Getter (see setter with the same name)

◆ max_remote_virtual_writers() [1/2]

DataReaderResourceLimits & rti::core::policy::DataReaderResourceLimits::max_remote_virtual_writers ( int32_t  the_max_remote_virtual_writers)

The maximum number of remote virtual writers from which a dds::sub::DataReader may read, including all instances.

When dds::core::policy::Presentation::access_scope is set to dds::core::policy::PresentationAccessScopeKind_def::GROUP, this value determines the maximum number of DataWriter groups that can be managed by the dds::sub::Subscriber containing this dds::sub::DataReader.

Since the dds::sub::Subscriber may contain more than one dds::sub::DataReader, only the setting of the first applies.

[default] dds::core::LENGTH_UNLIMITED
[range] [1, 1 million] or dds::core::LENGTH_UNLIMITED, >= initial_remote_virtual_writers, >= max_remote_virtual_writers_per_instance

◆ max_remote_virtual_writers() [2/2]

int32_t rti::core::policy::DataReaderResourceLimits::max_remote_virtual_writers ( ) const

Getter (see setter with the same name)

◆ initial_remote_virtual_writers() [1/2]

DataReaderResourceLimits & rti::core::policy::DataReaderResourceLimits::initial_remote_virtual_writers ( int32_t  the_initial_remote_virtual_writers)

The initial number of remote virtual writers from which a dds::sub::DataReader may read, including all instances.

[default] 2
[range] [1, 1 million] or dds::core::LENGTH_UNLIMITED, <= max_remote_virtual_writers

◆ initial_remote_virtual_writers() [2/2]

int32_t rti::core::policy::DataReaderResourceLimits::initial_remote_virtual_writers ( ) const

Getter (see setter with the same name)

◆ max_remote_virtual_writers_per_instance() [1/2]

DataReaderResourceLimits & rti::core::policy::DataReaderResourceLimits::max_remote_virtual_writers_per_instance ( int32_t  the_max_remote_virtual_writers_per_instance)

The maximum number of virtual remote writers that can be associated with an instance.

[default] dds::core::LENGTH_UNLIMITED

[range] [1, 1024] or dds::core::LENGTH_UNLIMITED, >= initial_remote_virtual_writers_per_instance

For unkeyed types, this value is ignored.

The features of Durable Reader State and MultiChannel DataWriters, and RTI Persistence Service require RTI Connext to keep some internal state per virtual writer and instance that is used to filter duplicate samples. These duplicate samples could be coming from different DataWriter channels or from multiple executions of RTI Persistence Service.

Once an association between a remote virtual writer and an instance is established, it is permanent – it will not disappear even if the physical writer incarnating the virtual writer is destroyed.

If max_remote_virtual_writers_per_instance is exceeded for an instance, RTI Connext will not associate this instance with new virtual writers. Duplicates samples from these virtual writers will not be filtered on the reader.

If you are not using Durable Reader State, MultiChannel DataWriters or RTI Persistence Service in your system, you can set this property to 1 to optimize resources.

◆ max_remote_virtual_writers_per_instance() [2/2]

int32_t rti::core::policy::DataReaderResourceLimits::max_remote_virtual_writers_per_instance ( ) const

Getter (see setter with the same name)

◆ initial_remote_virtual_writers_per_instance() [1/2]

DataReaderResourceLimits & rti::core::policy::DataReaderResourceLimits::initial_remote_virtual_writers_per_instance ( int32_t  the_initial_remote_virtual_writers_per_instance)

The initial number of virtual remote writers per instance.

[default] 2

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

For unkeyed types, this value is ignored.

◆ initial_remote_virtual_writers_per_instance() [2/2]

int32_t rti::core::policy::DataReaderResourceLimits::initial_remote_virtual_writers_per_instance ( ) const

Getter (see setter with the same name)

◆ max_remote_writers_per_sample() [1/2]

DataReaderResourceLimits & rti::core::policy::DataReaderResourceLimits::max_remote_writers_per_sample ( int32_t  the_max_remote_writers_per_sample)

The maximum number of remote writers allowed to write the same sample.

One scenario in which two DataWriters may write the same sample is Persistence Service. The DataReader may receive the same sample coming from the original DataWriter and from a Persistence Service DataWriter. [default] 3

[range] [1, 1024]

◆ max_remote_writers_per_sample() [2/2]

int32_t rti::core::policy::DataReaderResourceLimits::max_remote_writers_per_sample ( ) const

Getter (see setter with the same name)

◆ max_query_condition_filters() [1/2]

DataReaderResourceLimits & rti::core::policy::DataReaderResourceLimits::max_query_condition_filters ( int32_t  the_max_query_condition_filters)

The maximum number of query condition filters a reader is allowed.

[default] 4

[range] [0, 32]

This value determines the maximum number of unique query condition content filters that a reader may create.

Each query condition content filter is comprised of both its query_expression and query_parameters. Two query conditions that have the same query_expression will require unique query condition filters if their query_paramters differ. Query conditions that differ only in their state masks will share the same query condition filter.

◆ max_query_condition_filters() [2/2]

int32_t rti::core::policy::DataReaderResourceLimits::max_query_condition_filters ( ) const

Getter (see setter with the same name)

◆ max_app_ack_response_length() [1/2]

DataReaderResourceLimits & rti::core::policy::DataReaderResourceLimits::max_app_ack_response_length ( int32_t  the_max_app_ack_response_length)

Maximum length of application-level acknowledgment response data.

The maximum length of response data in an application-level acknowledgment.

When set to zero, no response data is sent with application-level acknowledgments.

[default] 1

[range] [0, 32768]

◆ max_app_ack_response_length() [2/2]

int32_t rti::core::policy::DataReaderResourceLimits::max_app_ack_response_length ( ) const

Getter (see setter with the same name)

◆ keep_minimum_state_for_instances() [1/2]

DataReaderResourceLimits & rti::core::policy::DataReaderResourceLimits::keep_minimum_state_for_instances ( bool  the_keep_minimum_state_for_instances)

Whether or not keep a minimum instance state for up to rti::core::policy::DataReaderResourceLimits::max_total_instances.

The features Durable Reader State, multi-channel DataWriters, and Persistence Service require RTI Connext to keep some minimal internal state even for instances without DataWriters or DDS samples in the DataReader's queue, or that have been purged due to a dispose. The additional state is used to filter duplicate DDS samples that could be coming from different DataWriter channels or from multiple executions of Persistence Service. The total maximum number of instances that will be managed by the middleware, including instances without associated DataWriters or DDS samples or that have been purged due to a dispose, is determined by rti::core::policy::DataReaderResourceLimits::max_total_instances.

This additional state will only be kept for up to max_total_instances if this field is set to true, otherwise the additional state will not be kept for any instances.

The minimum state includes information such as the source timestamp of the last sample received by the instance and the last sequence number received from a virtual GUID.

[default] true

◆ keep_minimum_state_for_instances() [2/2]

bool rti::core::policy::DataReaderResourceLimits::keep_minimum_state_for_instances ( ) const

Getter (see setter with the same name)

◆ initial_topic_queries() [1/2]

DataReaderResourceLimits & rti::core::policy::DataReaderResourceLimits::initial_topic_queries ( int32_t  the_initial_topic_queries)

The initial number of TopicQueries allocated by a dds::sub::DataReader.

[default] 1

See also
rti::sub::TopicQuery

◆ initial_topic_queries() [2/2]

int32_t rti::core::policy::DataReaderResourceLimits::initial_topic_queries ( ) const

Getter (see setter with the same name)

◆ max_topic_queries() [1/2]

DataReaderResourceLimits & rti::core::policy::DataReaderResourceLimits::max_topic_queries ( int32_t  the_max_topic_queries)

The maximum number of active TopicQueries that a dds::sub::DataReader can create.

Once this limit is reached, a dds::sub::DataReader can create more TopicQueries only if it deletes some of the previously created ones.

[default] dds::core::LENGTH_UNLIMITED

See also
rti::sub::TopicQuery

◆ max_topic_queries() [2/2]

int32_t rti::core::policy::DataReaderResourceLimits::max_topic_queries ( ) const

Getter (see setter with the same name)

◆ autopurge_remote_not_alive_writer_delay() [1/2]

DataReaderResourceLimits & rti::core::policy::DataReaderResourceLimits::autopurge_remote_not_alive_writer_delay ( const dds::core::Duration d)

Maximum duration for which the dds::sub::DataReader will maintain information regarding a dds::pub::DataWriter once the dds::pub::DataWriter has become not alive.

After this time elapses, the dds::sub::DataReader will purge all internal information regarding the not alive dds::pub::DataWriter.

See also
dds::core::policy::Liveliness for more information on when a dds::pub::DataWriter is considered not alive.

When set to dds::core::Duration::automatic(), this parameter is set to 10 times the value of rti::core::policy::DiscoveryConfig::participant_liveliness_lease_duration.

This QoS only applies when the dds::sub::DataReader is using rti::core::policy::InstanceStateConsistencyKind::recover_state for the dds::core::policy::Reliability::instance_state_consistency_kind QoS. When using rti::core::policy::InstanceStateConsistencyKind::recover_state, a dds::sub::DataReader keeps state about all dds::pub::DataWriter entities and the instances they were writing in order to be able to transition those instances back to their correct state if liveliness with the dds::pub::DataWriter is recovered. This can cause unbounded memory growth if that state is never purged and dds::pub::DataWriter entities continuously come and go in a system. This QoS avoids that unbounded memory growth by setting a time at which that state will be purged.

This QoS should be set such that it is longer than the longest period of time for which a dds::pub::DataWriter and dds::sub::DataReader are expected to be disconnected and then reconnected in your system.

An alternative to using this QoS to purge the state is to set the rti::core::policy::DataReaderResourceLimits::max_remote_writers QoS to a finite value. If that QoS is set to a finite value and the number of alive + not alive dds::pub::DataWriter entities reaches the limit when a new dds::pub::DataWriter is discovered, the oldest not alive dds::pub::DataWriter will be replaced.

[default] dds::core::Duration::automatic()

[range] > 0 or dds::core::Duration::automatic()

◆ autopurge_remote_not_alive_writer_delay() [2/2]

dds::core::Duration rti::core::policy::DataReaderResourceLimits::autopurge_remote_not_alive_writer_delay ( ) const

Getter (see setter with the same name)

◆ autopurge_remote_virtual_writer_delay() [1/2]

DataReaderResourceLimits & rti::core::policy::DataReaderResourceLimits::autopurge_remote_virtual_writer_delay ( const dds::core::Duration d)

Maximum duration for which the dds::sub::DataReader will maintain information regarding a virtual dds::pub::DataWriter once the dds::pub::DataWriter has become detached.

Determines how long the dds::sub::DataReader will maintain information regarding a virtual dds::pub::DataWriter that has has become detached.

After this time elapses, the dds::sub::DataReader will purge all internal information regarding the dds::pub::DataWriter.

[default] dds::core::Duration::infinite()

[range] >= 0 or dds::core::Duration::infinite()

◆ autopurge_remote_virtual_writer_delay() [2/2]

dds::core::Duration rti::core::policy::DataReaderResourceLimits::autopurge_remote_virtual_writer_delay ( ) const

Getter (see setter with the same name)

◆ shmem_ref_transfer_mode_attached_segment_allocation() [1/2]

const AllocationSettings & rti::core::policy::DataReaderResourceLimits::shmem_ref_transfer_mode_attached_segment_allocation ( ) const

Allocation resource for the shared memory segments attached by the dds::sub::DataReader.

The max_count does not limit the total number of shared memory segments used by the dds::sub::DataReader. When this limit is hit, the dds::sub::DataReader will try to detach from a segment that doesn't contain any loaned samples and attach to a new segment. If samples are loaned from all attached segments, then the dds::sub::DataReader will fail to attach to the new segment. This scenario will result in a sample loss.

[default] initial_count = rti::core::AllocationSettings::AUTO_COUNT (rti::core::policy::DataReaderResourceLimits::initial_remote_writers); max_count = rti::core::AllocationSettings::AUTO_COUNT (rti::core::policy::DataReaderResourceLimits::max_remote_writers); incremental_count = rti::core::AllocationSettings::AUTO_COUNT (0 if initial_count = max_count; -1 otherwise);

[range] See allowed ranges in struct rti::core::AllocationSettings

◆ shmem_ref_transfer_mode_attached_segment_allocation() [2/2]

AllocationSettings & rti::core::policy::DataReaderResourceLimits::shmem_ref_transfer_mode_attached_segment_allocation ( )

Getter by non-const reference (see getter by const reference with the same name)

◆ instance_replacement() [1/2]

const DataReaderResourceLimitsInstanceReplacementSettings & rti::core::policy::DataReaderResourceLimits::instance_replacement ( ) const

Sets the kind of instances allowed to be replaced for each instance state (dds::sub::status::InstanceState) when a DataReader reaches dds::core::policy::ResourceLimits::max_instances.

When dds::core::policy::ResourceLimits::max_instances is reached, a dds::sub::DataReader will try to make room for a new instance by attempting to reclaim an existing instance based on the instance replacement kinds specified by this field.

A DataReader can choose what kinds of instances can be replaced for each dds::sub::status::InstanceState separately. This means, for example, that a DataReader can choose to not allow replacing alive (dds::sub::status::InstanceState::alive()) instances but allow replacement of empty disposed (dds::sub::status::InstanceState::not_alive_disposed()) instances.

Only instances whose states match the specified kinds are eligible to be replaced. In addition, there must be no outstanding loans on any of the samples belonging to the instance for it to be considered for replacement.

For all kinds, a dds::sub::DataReader will replace the least-recently-updated instance satisfying that kind. An instance is considered 'updated' when a valid sample or dispose sample is received and accepted for that instance. When using dds::core::policy::OwnershipKind_def::EXCLUSIVE, only samples that are received from the owner of the instance will cause the instance to be considered updated. An instance is not considered updated when an unregister sample is received because the unregister message simply indicates that there is one less writer that has updates for the instance, not that the instance itself was updated.

If no replaceable instance exists, the sample for the new instance will be considered lost with lost reason rti::core::status::SampleLostState::lost_by_instances_limit() and the instance will not be asserted into the DataReader queue.

[default]

See also
rti::core::DataReaderResourceLimitsInstanceReplacementSettings

◆ instance_replacement() [2/2]

DataReaderResourceLimitsInstanceReplacementSettings & rti::core::policy::DataReaderResourceLimits::instance_replacement ( )

Getter by non-const reference (see getter by const reference with the same name)