OpenSplice ISO C++ 2 DCPS  v7.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
Writer Data Lifecycle QoS

This QosPolicy drives the behaviour of a DataWriter concerning the life-cycle of the instances and samples that have been written by it.

Attributes

Value Meaning Concerns RxO Changeable
A boolean:
autodispose_unregistered_instances
Specifies the behavior of the DataWriter with regards to the lifecycle of the data-instances it manages. Controls whether a DataWriter will automatically dispose instances each time they are unregistered. The setting autodispose_unregistered_instances = TRUE indicates that unregistered instances will also be considered disposed. By default, TRUE. DataWriter N/A Yes
A duration:
autopurge_suspended_samples_delay
Specifies the duration after which the DataWriter will automatically remove a sample from its history during periods in which its Publisher is suspended. This duration is calculated based on the source timestamp of the written sample. By default the duration value is set to DURATION_INFINITE and therefore no automatic purging of samples occurs.
A duration:
autounregister_instance_delay
Specifies the duration after which the DataWriter will automatically unregister an instance after the application wrote a sample for it and no further action is performed on the same instance by this DataWriter afterwards. This means that when the application writes a new sample for this instance, the duration is recalculated from that action onwards. By default the duration value is DURATION_INFINITE and therefore no automatic unregistration occurs.

This QosPolicy controls the behaviour of the DataWriter with regards to the lifecycle of the data-instances it manages; that is, those data-instances that have been registered, either explicitly using one of the register operations, or implicitly by directly writing the data using the special HANDLE_NIL parameter. The autodispose_unregistered_instances flag controls what happens when an instance gets unregistered by the DataWriter:

  • If the DataWriter unregisters the instance explicitly using either unregister_instance or unregister_instance_w_timestamp, then the autodispose_unregistered_instances flag is interpreted on the Writer side and determines whether the concerned instance is also disposed (TRUE) or not (FALSE).
  • If the DataWriter unregisters its instances implicitly because it is deleted, or if autounregister_instance_delay expires, then the autodispose_unregistered_instances flag is also interpreted on the Writer side and determines whether the concerned instances are automatically disposed (TRUE) or not (FALSE).
  • If a DataReader detects a loss of liveliness of a connected DataWriter then the autodispose_unregistered_instances flag is interpreted on the Reader side and dependent on the configured setting of DLite/Compliance/AutoDispose. When set to Explicit (the default), then the disconnected instances will never be disposed. When set to Implicit, the autodispose_unregistered_instances flag in the WriterDataLifecycleQosPolicy determines whether the concerned instances are automatically disposed (TRUE) or not (FALSE).

The default value for the autodispose_unregistered_instances flag is TRUE. For TRANSIENT and PERSISTENT Topics this means that all instances that are not explicitly unregistered by the application will by default be removed from the Transient and Persistent stores when the DataWriter is deleted or when a loss of its liveliness is detected. For DataWriters associated with TRANSIENT and PERSISTENT Topics setting the autodispose_unregister_instances attribute to TRUE would mean that all instances that are not explicitly unregistered by the application will by default be removed from the Transient and Persistent stores when the DataWriter is deleted, when a loss of liveliness is detected, or when the autounregister_instance_delay expires.