CoreDX DDS Modern C++ API
Public Member Functions | List of all members
dds::core::policy::Lifespan Class Reference

The purpose of this QoS is to avoid delivering "stale" data to the application. More...

Public Member Functions

 Lifespan (const dds::core::Duration &d=dds::core::Duration::infinite())
 Create a lifespan with a specified duration.
 
 Lifespan (const Lifespan &other)
 Copy constructor.
 
Lifespanduration (const dds::core::Duration &d)
 Set the lifespan duration.
 
const dds::core::Duration duration () const
 Access the lifespan duration.
 

Detailed Description

The purpose of this QoS is to avoid delivering "stale" data to the application.

Each data sample written by the DataWriter has an associated expiration time beyond which the data should not be delivered to any application. Once the sample expires, the data will be removed from the DataReader caches as well as from the transient and persistent information caches. The expiration time of each sample is computed by adding the duration specified by the LIFESPAN QoS to the source timestamp. As described in Section 7.1.2.4.2.11, write and Section 7.1.2.4.2.12, write_w_timestamp the source timestamp is either automatically computed by the Service each time the DataWriter write operation is called, or else supplied by the application by means of the write_w_timestamp operation.

This QoS relies on the sender and receiving applications having their clocks sufficiently synchronized. If this is not the case and the Service can detect it, the DataReader is allowed to use the reception timestamp instead of the source timestamp in its computation of the expiration time.


© 2009-2020 Twin Oaks Computing, Inc
Castle Rock, CO 80104
All rights reserved.