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

The SampleInfo contains information pertaining to the associated Data value. More...

#include "SampleInfo.hpp"

Inheritance diagram for dds::sub::SampleInfo:
Inheritance graph

Public Member Functions

dds::sub::GenerationCount generation_count () const
 
dds::core::InstanceHandle instance_handle () const
 
bool operator!= (const Value &other) const
 
D * operator-> ()
 
const D * operator-> () const
 
bool operator== (const Value &other) const
 
dds::core::InstanceHandle publication_handle () const
 
dds::sub::Rank rank () const
 
const dds::sub::status::DataState state () const
 
const dds::core::Time timestamp () const
 
bool valid () const
 

Detailed Description

The SampleInfo contains information pertaining to the associated Data value.

The SampleInfo contains information pertaining to the associated Data value:

  • The data state (dds::sub::status::DataState).
    • The sample_state of the Data value (i.e., if the sample has already been READ or NOT_READ by that same DataReader).
    • The view_state of the related instance (i.e., if the instance is NEW, or NOT_NEW for that DataReader).
    • The instance_state of the related instance (i.e., if the instance is ALIVE, NOT_ALIVE_DISPOSED, or NOT_ALIVE_NO_WRITERS).
  • The valid data flag. This flag indicates whether there is data associated with the sample. Some samples do not contain data indicating only a change on the instance_state of the corresponding instance.
  • The generation counts (dds::sub::GenerationCount) for the related instance at the time the sample was received. These counters indicate the number of times the instance had become ALIVE.
    • The disposed generation count
    • The no_writer generation count
  • The rank information (dds::sub::Rank).
    • The sample rank. This rank provides a preview of the samples that follow within the sequence returned by the read or take operations.
    • The generation rank. This rank provides a preview of the samples that follow within the sequence returned by the read or take operations.
    • The absolute_generation rank. This is the timestamp provided by the DataWriter at the time the sample was produced.
  • The source timestamp of the sample. This is the timestamp provided by the DataWriter at the time the sample was produced.
  • The InstanceHandle of the associated data Sample.
  • The InstanceHandle of the associated publication.
See also
SampleInfo for more information

Definition at line 61 of file SampleInfo.hpp.

Member Function Documentation

◆ generation_count()

dds::sub::GenerationCount dds::sub::SampleInfo::generation_count ( ) const

Gets the GenerationCount of the sample.

The generation counts (dds::sub::GenerationCount) for the related instance at the time the sample was received. These counters indicate the number of times the instance had become ALIVE.

  • The disposed generation count
  • The no_writer generation count
Returns
the GenerationCount

Definition at line 55 of file SampleInfoImpl.hpp.

◆ instance_handle()

dds::core::InstanceHandle dds::sub::SampleInfo::instance_handle ( ) const

Gets the InstanceHandle of the associated data Sample.

Returns
the InstanceHandle of the sample

Definition at line 73 of file SampleInfoImpl.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.

◆ publication_handle()

dds::core::InstanceHandle dds::sub::SampleInfo::publication_handle ( ) const

Gets the InstanceHandle of the associated publication.

Returns
the publication_handle

Definition at line 79 of file SampleInfoImpl.hpp.

◆ rank()

dds::sub::Rank dds::sub::SampleInfo::rank ( ) const

Gets the Rank of the sample.

The rank information (dds::sub::Rank).

  • The sample rank. This rank provides a preview of the samples that follow within the sequence returned by the read or take operations.
  • The generation rank. This rank provides a preview of the samples that follow within the sequence returned by the read or take operations.
  • The absolute_generation rank. This is the timestamp provided by the DataWriter at the time the sample was produced.
Returns
the Rank

Definition at line 61 of file SampleInfoImpl.hpp.

◆ state()

const dds::sub::status::DataState dds::sub::SampleInfo::state ( ) const

Gets the DataState of the sample.

The data state (dds::sub::status::DataState).

  • The sample_state of the Data value (i.e., if the sample has already been READ or NOT_READ by that same DataReader).
  • The view_state of the related instance (i.e., if the instance is NEW, or NOT_NEW for that DataReader).
  • The instance_state of the related instance (i.e., if the instance is ALIVE, NOT_ALIVE_DISPOSED, or NOT_ALIVE_NO_WRITERS).
Returns
the DataState

Definition at line 49 of file SampleInfoImpl.hpp.

◆ timestamp()

const dds::core::Time dds::sub::SampleInfo::timestamp ( ) const

Gets the timestamp of the sample.

This is the timestamp provided by the DataWriter at the time the sample was produced.

Returns
the timestamp

Definition at line 43 of file SampleInfoImpl.hpp.

◆ valid()

bool dds::sub::SampleInfo::valid ( ) const

Gets the valid_data flag.

This flag indicates whether there is data associated with the sample. Some samples do not contain data, indicating only a change on the instance_state of the corresponding instance.

Returns
the valid_data flag

Definition at line 67 of file SampleInfoImpl.hpp.


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