![]() |
OpenSplice ISO C++ 2 DCPS
v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
|
#include "CorePolicy.hpp"
Public Member Functions | |
Lifespan (const dds::core::Duration &duration=dds::core::Duration::infinite()) | |
Lifespan (const Lifespan &other) | |
Lifespan & | 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 |
This QosPolicy specifies the duration of the validity of the data written by the DataWriter.
Value | Meaning | Concerns | RxO | Changeable |
---|---|---|---|---|
A duration: duration | Specifies the maximum duration of validity of the data written by the DataWriter. The default value of the lifespan duration is infinite. | Topic, DataWriter | N/A | Yes |
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. 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.’
Definition at line 371 of file CorePolicy.hpp.
|
explicit |
Creates a Lifespan QoS instance
duration | Lifespan expiration duration |
Definition at line 337 of file CorePolicyImpl.hpp.
dds::core::policy::Lifespan::Lifespan | ( | const Lifespan & | other | ) |
Copies a Lifespan QoS instance
other | the Lifespan QoS instance to copy |
Definition at line 340 of file CorePolicyImpl.hpp.
Lifespan & dds::core::policy::Lifespan::duration | ( | const dds::core::Duration & | duration | ) |
Sets the expiration duration
duration | expiration duration |
Definition at line 343 of file CorePolicyImpl.hpp.
const dds::core::Duration dds::core::policy::Lifespan::duration | ( | ) | const |
Gets the expiration duration
Definition at line 350 of file CorePolicyImpl.hpp.
|
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 |