![]() |
OpenSplice ISO C++ 2 DCPS
v7.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
|
#include "CorePolicy.hpp"
Static Public Member Functions | |
static ReaderDataLifecycle | AutoPurgeDisposedSamples (const dds::core::Duration &autopurge_disposed_samples_delay) |
static ReaderDataLifecycle | NoAutoPurgeDisposedSamples () |
This QosPolicy specifies the maximum duration for which the DataReader will maintain information regarding a data instance for which the instance_state becomes either NOT_ALIVE_NO_WRITERS_INSTANCE_STATE or NOT_ALIVE_DISPOSED_INSTANCE_STATE.
Value | Meaning | Concerns | RxO | Changeable |
---|---|---|---|---|
A duration: autopurge_nowriter_samples_delay | specifies the duration for which the DataReader will maintain information regarding a data instance for which the instance_state becomes NOT_ALIVE_NO_WRITERS_INSTANCE_STATE. By default the duration value is DURATION_INFINITE. When the delay time has expired, the data instance is marked so that it can be purged in the next garbage collection sweep. | DataReader | N/A | Yes |
A duration: autopurge_disposed_samples_delay | specifies the duration for which the DataReader will maintain information regarding a data instance for which the instance_state becomes NOT_ALIVE_DISPOSED_INSTANCE_STATE. By default the duration value is DURATION_INFINITE. When the delay time has expired, the data instance is marked so that it can be purged in the next garbage collection sweep. | |||
A boolean: autopurge_dispose_all | Determines whether all samples in the DataReader will be purged automatically when a dispose_all_data() call is performed on the Topic that is associated with the DataReader. If this attribute set to TRUE, no more samples will exist in the DataReader after the dispose_all_data has been processed. Because all samples are purged, no data available events will be notified to potential Listeners or Conditions that are set for the DataReader. If this attribute is set to FALSE, the dispose_all_data() behaves as if each individual instance was disposed separately. | |||
A boolean: enable_invalid_samples | Insert dummy samples if no data sample is available to notify readers of an instance state change. By default the value is TRUE. NOTE: This feature is deprecated. It is recommended that you use invalid_sample_visibility instead | |||
An InvalidSampleVisibilityQosPolicy: invalid_sample_visibility | Insert dummy samples if no data sample is available, to notify readers of an instance state change. By default the value is MINIMUM_INVALID_SAMPLES. Options are NO_INVALID_SAMPLES, MINIMUM_INVALID_SAMPLES, ALL_INVALID_SAMPLES |
This QosPolicy specifies the maximum duration for which the DataReader will maintain information regarding a data instance for which the instance_state becomes either NOT_ALIVE_NO_WRITERS_INSTANCE_STATE or NOT_ALIVE_DISPOSED_INSTANCE_STATE. The DataReader manages resources for instances and samples of those instances. The amount of resources managed depends on other QosPolicies like the HistoryQosPolicy and the ResourceLimitsQosPolicy. The DataReader can only release resources for data instances for which all samples have been taken and the instance_state has become NOT_ALIVE_NO_WRITERS_INSTANCE_STATE or NOT_ALIVE_DISPOSED_INSTANCE_STATE. If an application does not take the samples belonging to a data instance with such an instance_state, the DataReader will never be able to release the maintained resources. The application can use this QosPolicy to instruct the DataReader to release all resources related to the relevant data instance after a specified duration.
There is one exception to this rule. If the autopurge_dispose_all attribute is TRUE, the maintained resources in the DataReader are cleaned up immediately in case dispose_all_data() is called on the Topic that is associated with the DataReader. Instance state changes are communicated to a DataReader by means of the SampleInfo accompanying a data sample. If no samples are available in the DataReader, a so-called ‘invalid sample’ can be injected with the sole purpose of notifying applications of the instance state. This behaviour is configured by the InvalidSampleVisibilityQosPolicy.
An alternative but deprecated way to determine the visibility of state changes is to set a boolean value for the enable_invalid_samples field.
You cannot set both the the enable_invalid_samples field AND the invalid_sample_visibility field. If both deviate from their factory default, this is considered a RETCODE_INCONSISTENT_POLICY. If only one of the fields deviates from its factory default, then that setting will be leading. However, modifying the default value of the enable_invalid_samples field will automatically result in a warning message stating that you are using deprecated functionality. This QosPolicy is applicable to a DataReader only. After enabling the relevant DataReader, this QosPolicy can be changed using the set_qos operation.
Definition at line 820 of file CorePolicy.hpp.
dds::core::policy::ReaderDataLifecycle::ReaderDataLifecycle | ( | const dds::core::Duration & | autopurge_nowriter_samples_delay = dds::core::Duration::infinite() , |
const dds::core::Duration & | autopurge_disposed_samples_delay = dds::core::Duration::infinite() |
||
) |
Creates a ReaderDataLifecycle QoS instance
autopurge_nowriter_samples_delay | the autopurge nowriter samples delay |
autopurge_disposed_samples_delay | the autopurge disposed samples delay |
Definition at line 551 of file CorePolicyImpl.hpp.
dds::core::policy::ReaderDataLifecycle::ReaderDataLifecycle | ( | const ReaderDataLifecycle & | other | ) |
Copies a ReaderDataLifecycle QoS instance
other | the ReaderDataLifecycle QoS instance to copy |
Definition at line 555 of file CorePolicyImpl.hpp.
bool dds::core::policy::ReaderDataLifecycle::autopurge_dispose_all | ( | ) | const |
Gets the autopurge_dispose_all
Call
This is a proprietary operation and can be called by using the operator->.
void dds::core::policy::ReaderDataLifecycle::autopurge_dispose_all | ( | bool | b | ) |
Sets the autopurge_dispose_all
Determines whether all samples in the DataReader will be purged automatically when a dds::topic::AnyTopic::dispose_all_data()() call is performed on the Topic that is associated with the DataReader. If this attribute set to TRUE, no more samples will exist in the DataReader after the dispose_all_data has been processed. Because all samples are purged, no data available events will be notified to potential Listeners or Conditions that are set for the DataReader. If this attribute is set to FALSE, the dispose_all_data behaves as if each individual instance was disposed separately.
Call
This is a proprietary operation and can be called by using the operator->.
b | autopurge on/off with dispose all |
const dds::core::Duration dds::core::policy::ReaderDataLifecycle::autopurge_disposed_samples_delay | ( | ) | const |
Gets the autopurge_disposed_samples_delay
Definition at line 572 of file CorePolicyImpl.hpp.
ReaderDataLifecycle & dds::core::policy::ReaderDataLifecycle::autopurge_disposed_samples_delay | ( | const dds::core::Duration & | autopurge_disposed_samples_delay | ) |
Sets the autopurge_disposed_samples_delay
Definition at line 578 of file CorePolicyImpl.hpp.
const dds::core::Duration dds::core::policy::ReaderDataLifecycle::autopurge_nowriter_samples_delay | ( | ) | const |
Gets the autopurge nowriter samples delay
Definition at line 559 of file CorePolicyImpl.hpp.
ReaderDataLifecycle & dds::core::policy::ReaderDataLifecycle::autopurge_nowriter_samples_delay | ( | const dds::core::Duration & | autopurge_nowriter_samples_delay | ) |
Sets the autopurge nowriter samples delay
autopurge_nowriter_samples_delay | the autopurge nowriter samples delay |
Definition at line 565 of file CorePolicyImpl.hpp.
|
static |
autopurge_disposed_samples_delay | the autopurge disposed samples delay |
Definition at line 591 of file CorePolicyImpl.hpp.
org::opensplice::core::policy::InvalidSampleVisibility::Type dds::core::policy::ReaderDataLifecycle::invalid_sample_visibility | ( | ) | const |
Gets the invalid_sample_visibility
Call
This is a proprietary operation and can be called by using the operator->.
void dds::core::policy::ReaderDataLifecycle::invalid_sample_visibility | ( | org::opensplice::core::policy::InvalidSampleVisibility::Type | visibility | ) |
Sets the invalid_sample_visibility
Insert dummy samples if no data sample is available, to notify readers of an instance state change. By default the value is MINIMUM_INVALID_SAMPLES.
Call
This is a proprietary operation and can be called by using the operator->.
visibility | the invalid samples visibility |
|
static |
Definition at line 585 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 |