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

Class to hold sample Rank information and is part of dds::sub::SampleInfo. More...

#include "Rank.hpp"

Inheritance diagram for dds::sub::Rank:
Inheritance graph

Public Member Functions

int32_t absolute_generation () const
 
int32_t generation () const
 
bool operator!= (const Value &other) const
 
D * operator-> ()
 
const D * operator-> () const
 
bool operator== (const Value &other) const
 
int32_t sample () const
 

Detailed Description

Class to hold sample Rank information and is part of dds::sub::SampleInfo.

The sample_rank and generation_rank available in dds::sub::Rank are computed based solely on the actual samples in the ordered collection returned by read or take.

  • The sample_rank indicates the number of samples of the same instance that follow the current one in the collection.
  • The generation_rank indicates the difference in 'generations' between the sample (S) and the Most Recent Sample of the same instance that appears In the returned Collection (MRSIC). That is, it counts the number of times the instance transitioned from not-alive to alive in the time from the reception of the S to the reception of MRSIC.

The generation_rank is computed using the formula:
generation_rank = (MRSIC.disposed_generation_count + MRSIC.no_writers_generation_count) - (S.disposed_generation_count + S.no_writers_generation_count)

The absolute_generation_rank indicates the difference in 'generations' between the sample (S) and the Most Recent Sample of the same instance that the middleware has received (MRS). That is, it counts the number of times the instance transitioned from not-alive to alive in the time from the reception of the S to the time when the read or take was called.

The absolute_generation_rank is computed using the formula:
absolute_generation_rank = (MRS.disposed_generation_count + MRS.no_writers_generation_count) - (S.disposed_generation_count + S.no_writers_generation_count)

See also
SampleInfo for more information

Definition at line 67 of file Rank.hpp.

Member Function Documentation

◆ absolute_generation()

int32_t dds::sub::Rank::absolute_generation ( ) const

Gets the absolute_generation_rank.

The absolute_generation_rank indicates the difference in 'generations' between the sample (S) and the Most Recent Sample of the same instance that the middleware has received (MRS). That is, it counts the number of times the instance transitioned from not-alive to alive in the time from the reception of the S to the time when the read or take was called.

The absolute_generation_rank is computed using the formula:
absolute_generation_rank = (MRS.disposed_generation_count + MRS.no_writers_generation_count) - (S.disposed_generation_count + S.no_writers_generation_count)

Returns
the absolute_generation_rank

Definition at line 47 of file RankImpl.hpp.

◆ generation()

int32_t dds::sub::Rank::generation ( ) const
inline

Gets the generation_rank.

The generation_rank indicates the difference in 'generations' between the sample (S) and the Most Recent Sample of the same instance that appears In the returned Collection (MRSIC). That is, it counts the number of times the instance transitioned from not-alive to alive in the time from the reception of the S to the reception of MRSIC.

The generation_rank is computed using the formula:
generation_rank = (MRSIC.disposed_generation_count + MRSIC.no_writers_generation_count) - (S.disposed_generation_count + S.no_writers_generation_count)

Returns
the generation_rank

Definition at line 53 of file RankImpl.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.

◆ sample()

int32_t dds::sub::Rank::sample ( ) const
inline

Gets the sample_rank.

The sample_rank indicates the number of samples of the same instance that follow the current one in the collection.

Returns
the sample_rank

Definition at line 59 of file RankImpl.hpp.


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