![]() |
OpenSplice ISO C++ 2 DCPS
v7.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
|
QoS Policy for automatically remove samples from the DataReader after a specified timeout. More...
#include "ProprietaryApi.hpp"
Public Member Functions | |
ReaderLifespan () | |
ReaderLifespan (bool used, const dds::core::Duration &duration) | |
ReaderLifespan (const ReaderLifespan &other) | |
ReaderLifespan & | duration (const dds::core::Duration &duration) |
const dds::core::Duration | duration () const |
bool | operator!= (const Value &other) const |
D * | operator-> () |
const D * | operator-> () const |
bool | operator== (const Value &other) const |
ReaderLifespan & | used (bool used) |
bool | used () const |
QoS Policy for automatically remove samples from the DataReader after a specified timeout.
This QosPolicy is similar to the Lifespan QosPolicy (applicable to Topic and DataWriter), but limited to the DataReader on which the QosPolicy is applied. The data is automatically removed from the DataReader if it has not been taken yet after the lifespan duration expires. The duration of the ReaderLifespan is added to the insertion time of the data in the DataReader to determine the expiry time.
When both the ReaderLifespan QosPolicy and a DataWriter’s Lifespan QosPolicy are applied to the same data, only the earliest expiry time is taken into account.
By default, the ReaderLifespan QosPolicy is not used and use_lifespan is FALSE.
The duration is set to dds::core::Duration::infinite().
This QosPolicy is applicable to a DataReader only, and is mutable even when the DataReader is already enabled. If modified, the new setting will only be applied to samples that are received after the modification took place.
Definition at line 969 of file ProprietaryApi.hpp.
org::opensplice::core::policy::ReaderLifespan::ReaderLifespan | ( | ) |
Creates a ReaderLifespan QoS Policy instance
|
explicit |
Creates a ReaderLifespan QoS Policy instance
used | Indicates ReaderLifespan is used |
duration | ReaderLifespan expiration duration |
org::opensplice::core::policy::ReaderLifespan::ReaderLifespan | ( | const ReaderLifespan & | other | ) |
Copies a Lifespan QoS Policy instance
other | the Lifespan QoS instance to copy |
ReaderLifespan& org::opensplice::core::policy::ReaderLifespan::duration | ( | const dds::core::Duration & | duration | ) |
Sets the expiration duration
duration | expiration duration |
const dds::core::Duration org::opensplice::core::policy::ReaderLifespan::duration | ( | ) | const |
Gets the expiration duration
|
inherited |
|
inherited |
The operator->() is provided to be able to directly invoke functions on the delegate.
The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Value and on all its subclasses as follows:
|
inherited |
The operator->() is provided to be able to directly invoke functions on the delegate.
The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Value and on all its subclasses as follows:
|
inherited |
ReaderLifespan& org::opensplice::core::policy::ReaderLifespan::used | ( | bool | used | ) |
Sets the used flag
the | used flag |
bool org::opensplice::core::policy::ReaderLifespan::used | ( | ) | const |
Gets the used flag