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

More...

#include "CorePolicy.hpp"

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

Public Member Functions

 DestinationOrder (dds::core::policy::DestinationOrderKind::Type kind=dds::core::policy::DestinationOrderKind::BY_RECEPTION_TIMESTAMP)
 
 DestinationOrder (const DestinationOrder &other)
 
DestinationOrderkind (dds::core::policy::DestinationOrderKind::Type kind)
 
dds::core::policy::DestinationOrderKind::Type kind () const
 
bool operator!= (const Value &other) const
 
D * operator-> ()
 
const D * operator-> () const
 
bool operator== (const Value &other) const
 

Static Public Member Functions

static DestinationOrder ReceptionTimestamp ()
 
static DestinationOrder SourceTimestamp ()
 

Detailed Description

This QosPolicy controls the order in which the DataReader stores the data.

Attributes

Value Meaning Concerns RxO Changeable
A DestinationOrderQosPolicyKind:
kind
controls the order in which the DataReader stores the data. This can be BY_RECEPTION_TIMESTAMP or BY_SOURCE_TIMESTAMP. Topic, DataReader, DataWriter Yes No
BY_RECEPTION_TIMESTAMP Indicates that data is ordered based on the reception time at each Subscriber. Since each subscriber may receive the data at different times there is no guaranteed that the changes will be seen in the same order. Consequently, it is possible for each subscriber to end up with a different final value for the data.
BY_SOURCE_TIMESTAMP Indicates that data is ordered based on a timestamp placed at the source (by the Service or by the application). In any case this guarantees a consistent final value for the data in all subscribers.

This policy controls how each subscriber resolves the final value of a data instance that is written by multiple DataWriter objects (which may be associated with different Publisher objects) running on different nodes.

The setting BY_RECEPTION_TIMESTAMP indicates that, assuming the OWNERSHIP policy allows it, the latest received value for the instance should be the one whose value is kept. This is the default value.

The setting BY_SOURCE_TIMESTAMP indicates that, assuming the OWNERSHIP policy allows it, a timestamp placed at the source should be used. This is the only setting that, in the case of concurrent same-strength DataWriter objects updating the same instance, ensures all subscribers will end up with the same final value for the instance. The mechanism to set the source timestamp is middleware dependent.

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 DESTINATION_ORDER kind are considered ordered such that BY_RECEPTION_TIMESTAMP < BY_SOURCE_TIMESTAMP.

This QoS plays a role within the scope of Eventual Consistency

Definition at line 1262 of file CorePolicy.hpp.

Constructor & Destructor Documentation

◆ DestinationOrder() [1/2]

dds::core::policy::DestinationOrder::DestinationOrder ( dds::core::policy::DestinationOrderKind::Type  kind = dds::core::policy::DestinationOrderKind::BY_RECEPTION_TIMESTAMP)
explicit

Creates a DestinationOrder QoS instance

Parameters
kindthe kind

Definition at line 757 of file CorePolicyImpl.hpp.

◆ DestinationOrder() [2/2]

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

Copies a DestinationOrder QoS instance

Parameters
otherthe Reliability QoS instance to copy

Definition at line 761 of file CorePolicyImpl.hpp.

Member Function Documentation

◆ kind() [1/2]

DestinationOrder & dds::core::policy::DestinationOrder::kind ( dds::core::policy::DestinationOrderKind::Type  kind)

Sets the kind

Parameters
kindthe kind

Definition at line 764 of file CorePolicyImpl.hpp.

◆ kind() [2/2]

dds::core::policy::DestinationOrderKind::Type dds::core::policy::DestinationOrder::kind ( ) const

Gets the kind

Returns
the kind

Definition at line 771 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.

◆ ReceptionTimestamp()

DestinationOrder dds::core::policy::DestinationOrder::ReceptionTimestamp ( )
static
Returns
a DestinationOrder QoS instance with the kind set to BY_RECEPTION_TIMESTAMP

Definition at line 783 of file CorePolicyImpl.hpp.

◆ SourceTimestamp()

DestinationOrder dds::core::policy::DestinationOrder::SourceTimestamp ( )
static
Returns
a DestinationOrder QoS instance with the kind set to BY_SOURCE_TIMESTAMP

Definition at line 777 of file CorePolicyImpl.hpp.


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