OpenSplice ISO C++ 2 DCPS  v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
dds::core::policy::Reliability Class Reference

More...

#include "CorePolicy.hpp"

Inheritance diagram for dds::core::policy::Reliability:
Inheritance graph

Public Member Functions

 Reliability (dds::core::policy::ReliabilityKind::Type kind=dds::core::policy::ReliabilityKind::BEST_EFFORT, const dds::core::Duration &max_blocking_time=dds::core::Duration::from_millisecs(100))
 
 Reliability (const Reliability &other)
 
Reliabilitykind (dds::core::policy::ReliabilityKind::Type kind)
 
dds::core::policy::ReliabilityKind::Type kind () const
 
Reliabilitymax_blocking_time (const dds::core::Duration &max_blocking_time)
 
const dds::core::Duration max_blocking_time () const
 
bool operator!= (const Value &other) const
 
D * operator-> ()
 
const D * operator-> () const
 
bool operator== (const Value &other) const
 
bool synchronous () const
 
void synchronous (bool b)
 

Static Public Member Functions

static Reliability BestEffort (const dds::core::Duration &max_blocking_time=dds::core::Duration::from_millisecs(100))
 
static Reliability Reliable (const dds::core::Duration &max_blocking_time=dds::core::Duration::from_millisecs(100))
 

Detailed Description

This QosPolicy controls the level of reliability of the data distribution offered or requested by the DataWriters and DataReaders.

Attributes

Value Meaning Concerns RxO Changeable
A ReliabilityQosPolicyKind:
kind
Specifies the type of reliability which may be BEST_EFFORT or RELIABLE, the default is BEST_EFFORT Topic, DataReader, DataWriter Yes No
RELIABLE Specifies the Service will attempt to deliver all samples in its history. Missed samples may be retried. In steady-state (no modifications communicated via the DataWriter) the middleware guarantees that all samples in the DataWriter history will eventually be delivered to all the DataReader objects. Outside steady state the HISTORY and RESOURCE_LIMITS policies will determine how samples become part of the history and whether samples can be discarded from it. This is the default value for DataWriters.
BEST_EFFORT Indicates that it is acceptable to not retry propagation of any samples. Presumably new values for the samples are generated often enough that it is not necessary to re-send or acknowledge any samples. This is the default value for DataReaders and Topics.
A duration:
max_blocking_time
The value of the max_blocking_time indicates the maximum time the operation DataWriter write is allowed to block if the DataWriter does not have space to store the value written. The default max_blocking_time=100ms.
A boolean:
synchronous
Specifies whether a DataWriter should wait for acknowledgements by all connected DataReaders that also have set a synchronous ReliabilityQosPolicy.
It is advised only to use this policy in combination with reliability, if used in combination with best effort data may not arrive at the DataReader resulting in a timeout at the DataWriter indicating that the data has not been received. Acknoledgments are always sent reliable so when the DataWriter encounters a timeout it is guaranteed that the DataReader hasn't received the data.
Note: The synchronous option is an OpenSplice specific QoS!
DataReader, DataWriter No No

This policy indicates the level of reliability requested by a DataReader or offered by a DataWriter. These levels are ordered, BEST_EFFORT being lower than RELIABLE. A DataWriter offering a level is implicitly offering all levels below.

The setting of this policy has a dependency on the setting of the RESOURCE_LIMITS policy. In case the RELIABILITY kind is set to RELIABLE the write operation on the DataWriter may block if the modification would cause data to be lost or else cause one of the limits specified in the RESOURCE_LIMITS to be exceeded. Under these circumstances, the RELIABILITY max_blocking_time configures the maximum duration the write operation may block.

If the RELIABILITY kind is set to RELIABLE, data-samples originating from a single DataWriter cannot be made available to the DataReader if there are previous data-samples that have not been received yet due to a communication error. In other words, the service will repair the error and re-transmit data-samples as needed in order to reconstruct a correct snapshot of the DataWriter history before it is accessible by the DataReader.

If the RELIABILITY kind is set to BEST_EFFORT, the service will not re-transmit missing data-samples. However for data-samples originating from any one DataWriter the service will ensure they are stored in the DataReader history in the same order they originated in the DataWriter. In other words, the DataReader may miss some data-samples but it will never see the value of a data-object change from a newer value to an order value.

The value offered is considered compatible with the value requested if and only if the inequality "offered kind >= requested kind" evaluates to 'TRUE' For the purposes of this inequality, the values of RELIABILITY kind are considered ordered such that BEST_EFFORT < RELIABLE.

This QoS plays a role within the scope of Eventual Consistency

Definition at line 1147 of file CorePolicy.hpp.

Constructor & Destructor Documentation

◆ Reliability() [1/2]

dds::core::policy::Reliability::Reliability ( dds::core::policy::ReliabilityKind::Type  kind = dds::core::policy::ReliabilityKind::BEST_EFFORT,
const dds::core::Duration max_blocking_time = dds::core::Duration::from_millisecs(100) 
)

Creates a Reliability QoS instance

Parameters
kindthe kind
max_blocking_timethe max_blocking_time

Definition at line 709 of file CorePolicyImpl.hpp.

◆ Reliability() [2/2]

dds::core::policy::Reliability::Reliability ( const Reliability other)

Copies a Reliability QoS instance

Parameters
otherthe Reliability QoS instance to copy

Definition at line 713 of file CorePolicyImpl.hpp.

Member Function Documentation

◆ BestEffort()

Reliability dds::core::policy::Reliability::BestEffort ( const dds::core::Duration max_blocking_time = dds::core::Duration::from_millisecs(100))
static
Returns
a Reliability QoS instance with the kind set to BEST_EFFORT

Definition at line 749 of file CorePolicyImpl.hpp.

◆ kind() [1/2]

Reliability & dds::core::policy::Reliability::kind ( dds::core::policy::ReliabilityKind::Type  kind)

Sets the kind

Parameters
kindthe kind

Definition at line 717 of file CorePolicyImpl.hpp.

◆ kind() [2/2]

dds::core::policy::ReliabilityKind::Type dds::core::policy::Reliability::kind ( ) const

Gets the kind

Returns
the kind

Definition at line 724 of file CorePolicyImpl.hpp.

◆ max_blocking_time() [1/2]

Reliability & dds::core::policy::Reliability::max_blocking_time ( const dds::core::Duration max_blocking_time)

Sets the max_blocking_time

Parameters
max_blocking_timethe max_blocking_time

Definition at line 730 of file CorePolicyImpl.hpp.

◆ max_blocking_time() [2/2]

const dds::core::Duration dds::core::policy::Reliability::max_blocking_time ( ) const

Gets the max_blocking_time

Returns
the max_blocking_time

Definition at line 737 of file CorePolicyImpl.hpp.

◆ operator!=()

template<typename D >
bool dds::core::Value< D >::operator!= ( const Value< D > &  other) const
inherited

Compare this Value with another Value

Parameters
otherValue
Returns
true if not equal

Definition at line 99 of file Value.hpp.

◆ operator->() [1/2]

template<typename D >
D * dds::core::Value< D >::operator-> ( )
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:

my_dds_value.standard_function();
my_dds_value->vendor_specific_extension();
Returns
a reference to delegate.

Definition at line 111 of file Value.hpp.

◆ operator->() [2/2]

template<typename D >
const D * dds::core::Value< D >::operator-> ( ) const
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:

my_dds_value.standard_function();
my_dds_value->vendor_specific_extension();
Returns
a reference to delegate.

Definition at line 105 of file Value.hpp.

◆ operator==()

template<typename D >
bool dds::core::Value< D >::operator== ( const Value< D > &  other) const
inherited

Compare this Value with another Value

Parameters
otherValue
Returns
true if equal

Definition at line 93 of file Value.hpp.

◆ Reliable()

Reliability dds::core::policy::Reliability::Reliable ( const dds::core::Duration max_blocking_time = dds::core::Duration::from_millisecs(100))
static
Parameters
themax_blocking_time
Returns
a Reliability QoS instance with the kind set to RELIABLE and the max_blocking_time set to the supplied value

Definition at line 743 of file CorePolicyImpl.hpp.

◆ synchronous() [1/2]

bool dds::core::policy::Reliability::synchronous ( ) const

Gets the synchronous

Note
This is a proprietary OpenSplice extension.

Call
This is a proprietary operation and can be called by using the operator->.

Returns
the synchronous on/off

◆ synchronous() [2/2]

void dds::core::policy::Reliability::synchronous ( bool  b)

Sets the synchronous

Note
This is a proprietary OpenSplice extension.

Call
This is a proprietary operation and can be called by using the operator->.

Parameters
bspecifies whether a DataWriter should wait for acknowledgements by all connected DataReaders that also have set a synchronous Reliability QosPolicy.

The documentation for this class was generated from the following files: