RTI Connext Modern C++ API
Version 5.3.1
|
<<extension>> Configures the memory usage of a dds::pub::DataWriter More...
#include <rti/core/policy/CorePolicy.hpp>
Public Member Functions | |
DataWriterResourceLimits () | |
Creates a DataWriterResourceLimits qos policy with default values. | |
DataWriterResourceLimits & | initial_concurrent_blocking_threads (int32_t the_initial_concurrent_blocking_threads) |
The initial number of threads that are allowed to concurrently block on write call on the same dds::pub::DataWriter. | |
int32_t | initial_concurrent_blocking_threads () const |
Getter (see setter with the same name) | |
DataWriterResourceLimits & | max_concurrent_blocking_threads (int32_t the_max_concurrent_blocking_threads) |
The maximum number of threads that are allowed to concurrently block on write call on the same dds::pub::DataWriter. | |
int32_t | max_concurrent_blocking_threads () const |
Getter (see setter with the same name) | |
DataWriterResourceLimits & | max_remote_reader_filters (int32_t the_max_remote_reader_filters) |
The maximum number of remote DataReaders for which the dds::pub::DataWriter will perform content-based filtering. | |
int32_t | max_remote_reader_filters () const |
Getter (see setter with the same name) | |
DataWriterResourceLimits & | initial_batches (int32_t the_initial_batches) |
Represents the initial number of batches a dds::pub::DataWriter will manage. | |
int32_t | initial_batches () const |
Getter (see setter with the same name) | |
DataWriterResourceLimits & | max_batches (int32_t the_max_batches) |
Represents the maximum number of batches a dds::pub::DataWriter will manage. | |
int32_t | max_batches () const |
Getter (see setter with the same name) | |
DataWriterResourceLimits & | cookie_max_length (int32_t max_length) |
Represents the maximum length in bytes of a Cookie_t. | |
int32_t | cookie_max_length () const |
Getter (see setter with the same name) | |
DataWriterResourceLimits & | instance_replacement (DataWriterResourceLimitsInstanceReplacementKind the_instance_replacement) |
Sets the kinds of instances allowed to be replaced when instance resource limits are reached. | |
DataWriterResourceLimitsInstanceReplacementKind | instance_replacement () const |
Getter (see setter with the same name) | |
DataWriterResourceLimits & | replace_empty_instances (bool the_replace_empty_instances) |
Whether or not to replace empty instances during instance replacement. | |
bool | replace_empty_instances () const |
Getter (see setter with the same name) | |
DataWriterResourceLimits & | autoregister_instances (bool the_autoregister_instances) |
Whether or not to automatically register new instances. | |
bool | autoregister_instances () const |
Getter (see setter with the same name) | |
DataWriterResourceLimits & | initial_virtual_writers (int32_t the_initial_virtual_writers) |
The initial number of virtual writers supported by a dds::pub::DataWriter. | |
int32_t | initial_virtual_writers () const |
Getter (see setter with the same name) | |
DataWriterResourceLimits & | max_virtual_writers (int32_t the_max_virtual_writers) |
The maximum number of virtual writers supported by a dds::pub::DataWriter. | |
int32_t | max_virtual_writers () const |
Getter (see setter with the same name) | |
DataWriterResourceLimits & | max_remote_readers (int32_t the_max_remote_readers) |
The maximum number of remote readers supported by a dds::pub::DataWriter. | |
int32_t | max_remote_readers () const |
Getter (see setter with the same name) | |
DataWriterResourceLimits & | max_app_ack_remote_readers (int32_t the_max_app_ack_remote_readers) |
The maximum number of application-level acknowledging remote readers supported by a dds::pub::DataWriter. | |
int32_t | max_app_ack_remote_readers () const |
Getter (see setter with the same name) | |
DataWriterResourceLimits & | initial_active_topic_queries (int32_t the_initial_active_topic_queries) |
Represents the initial number of active topic queries a dds::pub::DataWriter will manage. | |
int32_t | initial_active_topic_queries () const |
Getter (see setter with the same name) | |
DataWriterResourceLimits & | max_active_topic_queries (int32_t the_max_active_topic_queries) |
Represents the maximum number of active topic queries a dds::pub::DataWriter will manage. | |
int32_t | max_active_topic_queries () const |
Getter (see setter with the same name) | |
<<extension>> Configures the memory usage of a dds::pub::DataWriter
DataWriters must allocate internal structures to handle the simultaneously blocking of threads trying to call dds::pub::DataWriter::write() on the same dds::pub::DataWriter, for the storage used to batch small samples, and for content-based filters specified by DataReaders.
Most of these internal structures start at an initial size and, by default, will be grown 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::pub::DataWriter. 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::pub::DataWriter.
This QoS policy is an extension to the DDS standard.
|
inline |
Creates a DataWriterResourceLimits qos policy with default values.
DataWriterResourceLimits& rti::core::policy::DataWriterResourceLimits::initial_concurrent_blocking_threads | ( | int32_t | the_initial_concurrent_blocking_threads | ) |
The initial number of threads that are allowed to concurrently block on write call on the same dds::pub::DataWriter.
This value only applies if dds::core::policy::History has its kind set to dds::core::policy::HistoryKind::KEEP_ALL and dds::core::policy::Reliability::max_blocking_time is > 0.
[default] 1
[range] [1, 10000], <= max_concurrent_blocking_threads
int32_t rti::core::policy::DataWriterResourceLimits::initial_concurrent_blocking_threads | ( | ) | const |
Getter (see setter with the same name)
DataWriterResourceLimits& rti::core::policy::DataWriterResourceLimits::max_concurrent_blocking_threads | ( | int32_t | the_max_concurrent_blocking_threads | ) |
The maximum number of threads that are allowed to concurrently block on write call on the same dds::pub::DataWriter.
This value only applies if dds::core::policy::History has its kind set to dds::core::policy::HistoryKind::KEEP_ALL and dds::core::policy::Reliability::max_blocking_time is > 0.
[default] dds::core::LENGTH_UNLIMITED
[range] [1, 10000] or dds::core::LENGTH_UNLIMITED, >= initial_concurrent_blocking_threads
int32_t rti::core::policy::DataWriterResourceLimits::max_concurrent_blocking_threads | ( | ) | const |
Getter (see setter with the same name)
DataWriterResourceLimits& rti::core::policy::DataWriterResourceLimits::max_remote_reader_filters | ( | int32_t | the_max_remote_reader_filters | ) |
The maximum number of remote DataReaders for which the dds::pub::DataWriter will perform content-based filtering.
[default] dds::core::LENGTH_UNLIMITED
[range] [0, (2^31)-2] or dds::core::LENGTH_UNLIMITED.
0: The dds::pub::DataWriter will not perform filtering for any dds::sub::DataReader.
1 to (2^31)-2: The DataWriter will filter for up to the specified number of DataReaders. In addition, the Datawriter will store the result of the filtering per sample per DataReader.
dds::core::LENGTH_UNLIMITED: The DataWriter will filter for up to (2^31)-2 DataReaders. However, in this case, the DataWriter will not store the filtering result per sample per DataReader. Thus, if a sample is resent (such as due to a loss of reliable communication), the sample will be filtered again.
int32_t rti::core::policy::DataWriterResourceLimits::max_remote_reader_filters | ( | ) | const |
Getter (see setter with the same name)
DataWriterResourceLimits& rti::core::policy::DataWriterResourceLimits::initial_batches | ( | int32_t | the_initial_batches | ) |
Represents the initial number of batches a dds::pub::DataWriter will manage.
[default] 8
[range] [1,100 million]
int32_t rti::core::policy::DataWriterResourceLimits::initial_batches | ( | ) | const |
Getter (see setter with the same name)
DataWriterResourceLimits& rti::core::policy::DataWriterResourceLimits::max_batches | ( | int32_t | the_max_batches | ) |
Represents the maximum number of batches a dds::pub::DataWriter will manage.
[default] dds::core::LENGTH_UNLIMITED
When batching is enabled, the maximum number of samples that a dds::pub::DataWriter can store is limited by this value and dds::core::policy::ResourceLimits::max_samples.
[range] [1,100 million] or dds::core::LENGTH_UNLIMITED >= DDS_RtpsReliableWriterProtocol_t::heartbeats_per_max_samples if batching is enabled
int32_t rti::core::policy::DataWriterResourceLimits::max_batches | ( | ) | const |
Getter (see setter with the same name)
DataWriterResourceLimits& rti::core::policy::DataWriterResourceLimits::cookie_max_length | ( | int32_t | max_length | ) |
Represents the maximum length in bytes of a Cookie_t.
[default] dds::core::LENGTH_UNLIMITED
Sets the maximum allowed byte-sequence length of a Cookie_t used when writing with parameters
[range] [1,100 million] or dds::core::LENGTH_UNLIMITED
int32_t rti::core::policy::DataWriterResourceLimits::cookie_max_length | ( | ) | const |
Getter (see setter with the same name)
DataWriterResourceLimits& rti::core::policy::DataWriterResourceLimits::instance_replacement | ( | DataWriterResourceLimitsInstanceReplacementKind | the_instance_replacement | ) |
Sets the kinds of instances allowed to be replaced when instance resource limits are reached.
When a dds::pub::DataWriter's number of active instances is greater than dds::core::policy::ResourceLimits::max_instances, it will try to make room by replacing an existing instance. This field specifies the kinds of instances allowed to be replaced.
If a replaceable instance is not available, either an out-of-resources exception will be returned, or the writer may block if the instance reclamation was done when writing.
[default] DataWriterResourceLimitsInstanceReplacementKind::UNREGISTERED_INSTANCE_REPLACEMENT
DataWriterResourceLimitsInstanceReplacementKind rti::core::policy::DataWriterResourceLimits::instance_replacement | ( | ) | const |
Getter (see setter with the same name)
DataWriterResourceLimits& rti::core::policy::DataWriterResourceLimits::replace_empty_instances | ( | bool | the_replace_empty_instances | ) |
Whether or not to replace empty instances during instance replacement.
When a dds::pub::DataWriter has more active instances than allowed by dds::core::policy::ResourceLimits::max_instances, it tries to make room by replacing an existing instance. This field configures whether empty instances (i.e. instances with no samples) may be replaced. If set true, then a dds::pub::DataWriter will first try reclaiming empty instances, before trying to replace whatever is specified by rti::core::policy::DataWriterResourceLimits::instance_replacement.
[default] false
bool rti::core::policy::DataWriterResourceLimits::replace_empty_instances | ( | ) | const |
Getter (see setter with the same name)
DataWriterResourceLimits& rti::core::policy::DataWriterResourceLimits::autoregister_instances | ( | bool | the_autoregister_instances | ) |
Whether or not to automatically register new instances.
[default] false
When set to true, it is possible to write with a non-NIL handle of an instance that is not registered: the write operation will succeed and the instance will be registered. Otherwise, that write operation would fail.
bool rti::core::policy::DataWriterResourceLimits::autoregister_instances | ( | ) | const |
Getter (see setter with the same name)
DataWriterResourceLimits& rti::core::policy::DataWriterResourceLimits::initial_virtual_writers | ( | int32_t | the_initial_virtual_writers | ) |
The initial number of virtual writers supported by a dds::pub::DataWriter.
[default] 1
[range] [1, 1000000], or dds::core::LENGTH_UNLIMITED
int32_t rti::core::policy::DataWriterResourceLimits::initial_virtual_writers | ( | ) | const |
Getter (see setter with the same name)
DataWriterResourceLimits& rti::core::policy::DataWriterResourceLimits::max_virtual_writers | ( | int32_t | the_max_virtual_writers | ) |
The maximum number of virtual writers supported by a dds::pub::DataWriter.
Sets the maximum number of unique virtual writers supported by a dds::pub::DataWriter, where virtual writers are added when samples are written with the virtual writer GUID.
This field is specially relevant in the configuration of Persistence Service DataWriters since these DataWriters will publish samples on behalf of multiple virtual writers.
[default] dds::core::LENGTH_UNLIMITED
[range] [1, 1000000], or dds::core::LENGTH_UNLIMITED
int32_t rti::core::policy::DataWriterResourceLimits::max_virtual_writers | ( | ) | const |
Getter (see setter with the same name)
DataWriterResourceLimits& rti::core::policy::DataWriterResourceLimits::max_remote_readers | ( | int32_t | the_max_remote_readers | ) |
The maximum number of remote readers supported by a dds::pub::DataWriter.
[default] dds::core::LENGTH_UNLIMITED
[range] [1, 1000000], or dds::core::LENGTH_UNLIMITED
int32_t rti::core::policy::DataWriterResourceLimits::max_remote_readers | ( | ) | const |
Getter (see setter with the same name)
DataWriterResourceLimits& rti::core::policy::DataWriterResourceLimits::max_app_ack_remote_readers | ( | int32_t | the_max_app_ack_remote_readers | ) |
The maximum number of application-level acknowledging remote readers supported by a dds::pub::DataWriter.
[default] dds::core::LENGTH_UNLIMITED
[range] [1, 1000000], or dds::core::LENGTH_UNLIMITED
int32_t rti::core::policy::DataWriterResourceLimits::max_app_ack_remote_readers | ( | ) | const |
Getter (see setter with the same name)
DataWriterResourceLimits& rti::core::policy::DataWriterResourceLimits::initial_active_topic_queries | ( | int32_t | the_initial_active_topic_queries | ) |
Represents the initial number of active topic queries a dds::pub::DataWriter will manage.
[default] 1
[range] [1, 1000000]
int32_t rti::core::policy::DataWriterResourceLimits::initial_active_topic_queries | ( | ) | const |
Getter (see setter with the same name)
DataWriterResourceLimits& rti::core::policy::DataWriterResourceLimits::max_active_topic_queries | ( | int32_t | the_max_active_topic_queries | ) |
Represents the maximum number of active topic queries a dds::pub::DataWriter will manage.
When topic queries are enabled, the maximum number of topic queries that a dds::pub::DataWriter can publish data samples for at the same time is limited by this value.
When the DataWriter receives one topic query above this limit, it will wait to process it until it finishes publishing all the samples for at least one of the current topic queries.
[default] dds::core::LENGTH_UNLIMITED
[range] [1, 1000000] or dds::core::LENGTH_UNLIMITED
int32_t rti::core::policy::DataWriterResourceLimits::max_active_topic_queries | ( | ) | const |
Getter (see setter with the same name)