RTI Connext Java API
Version 5.3.1
|
Controls the amount of physical memory allocated for DDS entities, if dynamic allocations are allowed, and how they occur. Also controls memory usage among different instance values for keyed topics. More...
Public Attributes | |
int | max_samples |
Represents the maximum samples the middleware can store for any one com.rti.dds.publication.DataWriter (or com.rti.dds.subscription.DataReader). | |
int | max_instances |
Represents the maximum number of instances a com.rti.dds.publication.DataWriter (or com.rti.dds.subscription.DataReader) can manage. | |
int | max_samples_per_instance |
Represents the maximum number of samples of any one instance a com.rti.dds.publication.DataWriter (or com.rti.dds.subscription.DataReader) can manage. | |
int | initial_samples |
<<extension>> Represents the initial samples the middleware will store for any one com.rti.dds.publication.DataWriter (or com.rti.dds.subscription.DataReader). | |
int | initial_instances |
<<extension>> Represents the initial number of instances a com.rti.dds.publication.DataWriter (or com.rti.dds.subscription.DataReader) will manage. | |
int | instance_hash_buckets |
<<extension>> Number of hash buckets for instances. | |
![]() | |
final QosPolicyId_t | id |
The ID of this QoS policy. | |
final String | policy_name |
The name of this QoS policy. | |
Static Public Attributes | |
static final int | LENGTH_UNLIMITED |
A special value indicating an unlimited quantity. | |
Additional Inherited Members | |
![]() | |
abstract boolean | equals (Object obj) |
abstract int | hashCode () |
String | toString () |
![]() | |
Struct () | |
abstract void | pull_from_nativeI (long native_status) |
abstract void | push_to_nativeI (long native_status) |
Controls the amount of physical memory allocated for DDS entities, if dynamic allocations are allowed, and how they occur. Also controls memory usage among different instance values for keyed topics.
This policy controls the resources that RTI Connext can use to meet the requirements imposed by the application and other QoS settings.
For the reliability protocol (and com.rti.dds.infrastructure.DurabilityQosPolicy), this QoS policy determines the actual maximum queue size when the com.rti.dds.infrastructure.HistoryQosPolicy is set to com.rti.dds.infrastructure.HistoryQosPolicyKind.HistoryQosPolicyKind.KEEP_ALL_HISTORY_QOS.
In general, this QoS policy is used to limit the amount of system memory that RTI Connext can allocate. For embedded real-time systems and safety-critical systems, pre-determination of maximum memory usage is often required. In addition, dynamic memory allocation could introduce non-deterministic latencies in time-critical paths.
This QoS policy can be set such that an entity does not dynamically allocate any more memory after its initialization phase.
If com.rti.dds.publication.DataWriter objects are communicating samples faster than they are ultimately taken by the com.rti.dds.subscription.DataReader objects, the middleware will eventually hit against some of the QoS-imposed resource limits. Note that this may occur when just a single com.rti.dds.subscription.DataReader cannot keep up with its corresponding com.rti.dds.publication.DataWriter. The behavior in this case depends on the setting for the RELIABILITY. If reliability is com.rti.dds.infrastructure.ReliabilityQosPolicyKind.ReliabilityQosPolicyKind.BEST_EFFORT_RELIABILITY_QOS, then RTI Connext is allowed to drop samples. If the reliability is com.rti.dds.infrastructure.ReliabilityQosPolicyKind.RELIABLE_RELIABILITY_QOS, RTI Connext will block the com.rti.dds.publication.DataWriter or discard the sample at the com.rti.dds.subscription.DataReader in order not to lose existing samples.
The constant com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED may be used to indicate the absence of a particular limit. For example setting com.rti.dds.infrastructure.ResourceLimitsQosPolicy.max_samples_per_instance to com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED will cause RTI Connext not to enforce this particular limit.
If these resource limits are not set sufficiently, under certain circumstances the com.rti.dds.publication.DataWriter may block on a write() call even though the com.rti.dds.infrastructure.HistoryQosPolicy is com.rti.dds.infrastructure.HistoryQosPolicyKind.HistoryQosPolicyKind.KEEP_LAST_HISTORY_QOS. To guarantee the writer does not block for com.rti.dds.infrastructure.HistoryQosPolicyKind.HistoryQosPolicyKind.KEEP_LAST_HISTORY_QOS, make sure the resource limits are set such that:
The setting of com.rti.dds.infrastructure.ResourceLimitsQosPolicy.max_samples must be consistent with com.rti.dds.infrastructure.ResourceLimitsQosPolicy.max_samples_per_instance. For these two values to be consistent, it must be true that com.rti.dds.infrastructure.ResourceLimitsQosPolicy.max_samples >= com.rti.dds.infrastructure.ResourceLimitsQosPolicy.max_samples_per_instance. As described above, this limit will not be enforced if com.rti.dds.infrastructure.ResourceLimitsQosPolicy.max_samples_per_instance is set to com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED.
The setting of RESOURCE_LIMITS max_samples_per_instance
must be consistent with the HISTORY depth
. For these two QoS to be consistent, it must be true that depth <= max_samples_per_instance.
int max_samples |
Represents the maximum samples the middleware can store for any one com.rti.dds.publication.DataWriter (or com.rti.dds.subscription.DataReader).
Specifies the maximum number of data samples a com.rti.dds.publication.DataWriter (or com.rti.dds.subscription.DataReader) can manage across all the instances associated with it.
For unkeyed types, this value has to be equal to max_samples_per_instance if max_samples_per_instance is not equal to com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED.
When batching is enabled, the maximum number of data samples a com.rti.dds.publication.DataWriter can manage will also be limited by com.rti.dds.infrastructure.DataWriterResourceLimitsQosPolicy.max_batches.
[default] com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED
[range] [1, 100 million] or com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED, >= initial_samples, >= max_samples_per_instance, >= com.rti.dds.infrastructure.DataReaderResourceLimitsQosPolicy.max_samples_per_remote_writer or >= com.rti.dds.infrastructure.RtpsReliableWriterProtocol_t.heartbeats_per_max_samples
For com.rti.dds.publication.DataWriterQos max_samples >= com.rti.dds.infrastructure.RtpsReliableWriterProtocol_t.heartbeats_per_max_samples in com.rti.dds.infrastructure.DataWriterProtocolQosPolicy.rtps_reliable_writer if batching is disabled.
int max_instances |
Represents the maximum number of instances a com.rti.dds.publication.DataWriter (or com.rti.dds.subscription.DataReader) can manage.
[default] com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED
[range] [1, 1 million] or com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED, >= initial_instances
int max_samples_per_instance |
Represents the maximum number of samples of any one instance a com.rti.dds.publication.DataWriter (or com.rti.dds.subscription.DataReader) can manage.
While an unkeyed type is logically considered as a single instance, for unkeyed types this value has to be equal to max_samples or com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED.
[default] com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED
[range] [1, 100 million] or com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED, <= max_samples or com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED, >= com.rti.dds.infrastructure.HistoryQosPolicy.depth
int initial_samples |
<<extension>> Represents the initial samples the middleware will store for any one com.rti.dds.publication.DataWriter (or com.rti.dds.subscription.DataReader).
Specifies the initial number of data samples a com.rti.dds.publication.DataWriter (or com.rti.dds.subscription.DataReader) will manage across all the instances associated with it.
[default] 32
[range] [1,100 million], <= max_samples
int initial_instances |
<<extension>> Represents the initial number of instances a com.rti.dds.publication.DataWriter (or com.rti.dds.subscription.DataReader) will manage.
[default] 32
[range] [1,1 million], <= max_instances
int instance_hash_buckets |
<<extension>> Number of hash buckets for instances.
The instance hash table facilitates instance lookup. A higher number of buckets decreases instance lookup time but increases the memory usage.
[default] 1 [range] [1,1 million]