RTI Connext C API  Version 6.0.0
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
DATA_WRITER_RESOURCE_LIMITS

<<extension>> Various settings that configure how a DDS_DataWriter allocates and uses physical memory for internal resources. More...

Data Structures

struct  DDS_DataWriterResourceLimitsQosPolicy
 Various settings that configure how a DDS_DataWriter allocates and uses physical memory for internal resources. More...
 

Enumerations

enum  DDS_DataWriterResourceLimitsInstanceReplacementKind {
  DDS_UNREGISTERED_INSTANCE_REPLACEMENT,
  DDS_ALIVE_INSTANCE_REPLACEMENT,
  DDS_DISPOSED_INSTANCE_REPLACEMENT,
  DDS_ALIVE_THEN_DISPOSED_INSTANCE_REPLACEMENT,
  DDS_DISPOSED_THEN_ALIVE_INSTANCE_REPLACEMENT,
  DDS_ALIVE_OR_DISPOSED_INSTANCE_REPLACEMENT
}
 Sets the kinds of instances that can be replaced when instance resource limits are reached. More...
 

Variables

const char *const DDS_DATAWRITERRESOURCELIMITS_QOS_POLICY_NAME
 Stringified human-readable name for DDS_DataWriterResourceLimitsQosPolicy.
 

Detailed Description

<<extension>> Various settings that configure how a DDS_DataWriter allocates and uses physical memory for internal resources.

Enumeration Type Documentation

Sets the kinds of instances that can be replaced when instance resource limits are reached.

When DDS_ResourceLimitsQosPolicy::max_instances is reached, a DDS_DataWriter will try to make room for a new instance by attempting to reclaim an existing instance based on the instance replacement kind specified by DDS_DataWriterResourceLimitsQosPolicy::instance_replacement.

Only instances whose states match the specified kinds are eligible to be replaced. In addition, an instance must have had all of its samples fully acknowledged for it to be considered replaceable.

For all kinds, a DDS_DataWriter will replace the oldest instance satisfying that kind. For example, when the kind is DDS_UNREGISTERED_INSTANCE_REPLACEMENT, a DDS_DataWriter will remove the oldest, fully acknowledged, unregistered instance, if such an instance exists.

If no replaceable instance exists, the invoked function will either return with an appropriate out-of-resources return code, or in the case of a write, it may first block to wait for an instance to be acknowledged. Otherwise, the DDS_DataWriter will replace the old instance with the new instance, and invoke, if available, the DDS_DataWriterListener::on_instance_replaced to notify the user about an instance being replaced.

A DDS_DataWriter checks for replaceable instances in the following order, stopping once a replaceable instance is found:

If DDS_DataWriterResourceLimitsQosPolicy::replace_empty_instances is DDS_BOOLEAN_TRUE, a DDS_DataWriter first tries replacing instances that have no samples. These empty instances can be unregistered, disposed, or alive. Next, a DDS_DataWriter tries replacing unregistered instances. Since an unregistered instance indicates that the DDS_DataWriter is done modifying it, unregistered instances are replaced before instances of any other state (alive, disposed). This is the same as the DDS_UNREGISTERED_INSTANCE_REPLACEMENT kind. Then, a DDS_DataWriter tries replacing what is specified by DDS_DataWriterResourceLimitsQosPolicy::instance_replacement. With unregistered instances already checked, this leaves alive and disposed instances. When both alive and disposed instances may be replaced, the kind specifies whether the particular order matters (e.g., DISPOSED_THEN_ALIVE, ALIVE_THEN_DISPOSED) or not (ALIVE_OR_DISPOSED).

QoS:
DDS_DataWriterResourceLimitsQosPolicy
Enumerator:
DDS_UNREGISTERED_INSTANCE_REPLACEMENT 

Allows a DDS_DataWriter to reclaim unregistered acknowledged instances.

By default, all instance replacement kinds first attempt to reclaim an unregistered, acknowledged instance. Used in DDS_DataWriterResourceLimitsQosPolicy::instance_replacement [default]

DDS_ALIVE_INSTANCE_REPLACEMENT 

Allows a DDS_DataWriter to reclaim alive, acknowledged instances.

When an unregistered, acknowledged instance is not available to reclaim, this kind allows a DDS_DataWriter to reclaim an alive, acknowledged instance, where an alive instance is a registered, non-disposed instance. The least recently registered or written alive instance will be reclaimed.

DDS_DISPOSED_INSTANCE_REPLACEMENT 

Allows a DDS_DataWriter to reclaim disposed acknowledged instances.

When an unregistered, acknowledged instance is not available to reclaim, this kind allows a DDS_DataWriter to reclaim a disposed, acknowledged instance. The least recently disposed instance will be reclaimed.

DDS_ALIVE_THEN_DISPOSED_INSTANCE_REPLACEMENT 

Allows a DDS_DataWriter first to reclaim an alive, acknowledged instance, and then, if necessary, a disposed, acknowledged instance.

When an unregistered, acknowledged instance is not available to reclaim, this kind allows a DDS_DataWriter to first try reclaiming an alive, acknowledged instance. If no instance is reclaimable, then it tries reclaiming a disposed, acknowledged instance. The least recently used (i.e., registered, written, or disposed) instance will be reclaimed.

DDS_DISPOSED_THEN_ALIVE_INSTANCE_REPLACEMENT 

Allows a DDS_DataWriter first to reclaim a disposed, acknowledged instance, and then, if necessary, an alive, acknowledged instance.

When an unregistered, acknowledged instance is not available to reclaim, this kind allows a DDS_DataWriter to first try reclaiming a disposed, acknowledged instance. If no instance is reclaimable, then it tries reclaiming an alive, acknowledged instance. The least recently used (i.e., disposed, registered, or written) instance will be reclaimed.

DDS_ALIVE_OR_DISPOSED_INSTANCE_REPLACEMENT 

Allows a DDS_DataWriter to reclaim a either an alive acknowledged instance or a disposed acknowledged instance.

When an unregistered acknowledged instance is not available to reclaim, this kind allows a DDS_DataWriter to reclaim either an alive, acknowledged instance or a disposed, acknowledged instance. If both instance kinds are available to reclaim, the DDS_DataWriter will reclaim the least recently used (i.e. disposed, registered, or written) instance.

Variable Documentation

const char* const DDS_DATAWRITERRESOURCELIMITS_QOS_POLICY_NAME

Stringified human-readable name for DDS_DataWriterResourceLimitsQosPolicy.


RTI Connext C API Version 6.0.0 Copyright © Sun Mar 3 2019 Real-Time Innovations, Inc