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

Class to hold SampleState information. More...

#include "DataState.hpp"

Inheritance diagram for dds::sub::status::SampleState:
Inheritance graph

Public Types

typedef std::bitset< OMG_DDS_STATE_BIT_COUNTMaskType
 

Public Member Functions

 SampleState ()
 
 SampleState (uint32_t i)
 
 SampleState (const SampleState &src)
 
 SampleState (const MaskType &src)
 

Static Public Member Functions

static const SampleState any ()
 
static const SampleState not_read ()
 
static const SampleState read ()
 

Detailed Description

Class to hold SampleState information.

For each sample, the Data Distribution Service internally maintains a sample_state specific to each DataReader. The sample_state can either be READ_SAMPLE_STATE or NOT_READ_SAMPLE_STATE.

  • read
    • The DataReader has already accessed that sample by means of read. Had the sample been accessed by take it would no longer be available to the DataReader.
  • not_read
    • The DataReader has not accessed that sample before.
See also
SampleInfo for more information

Definition at line 57 of file DataState.hpp.

Member Typedef Documentation

◆ MaskType

Convenience typedef for std::bitset<OMG_DDS_STATE_BIT_COUNT>.

Definition at line 63 of file DataState.hpp.

Constructor & Destructor Documentation

◆ SampleState() [1/4]

dds::sub::status::SampleState::SampleState ( )

Construct a SampleState with default MaskType.

◆ SampleState() [2/4]

dds::sub::status::SampleState::SampleState ( uint32_t  i)
explicit

Construct a SampleState with MaskType of i.

Parameters
iMaskType

◆ SampleState() [3/4]

dds::sub::status::SampleState::SampleState ( const SampleState src)

Copy constructor. Construct a SampleState with existing SampleState.

Parameters
srcthe SampleState to copy from

◆ SampleState() [4/4]

dds::sub::status::SampleState::SampleState ( const MaskType src)

Construct a SampleState with existing MaskType.

Parameters
srcthe MaskType to copy from

Member Function Documentation

◆ any()

const SampleState dds::sub::status::SampleState::any ( )
inlinestatic

Get any SampleState.

Either the sample has already been read or not read.

Returns
any SampleState

Definition at line 54 of file DataStateImpl.hpp.

◆ not_read()

const SampleState dds::sub::status::SampleState::not_read ( )
inlinestatic

Get the NOT_READ_SAMPLE_STATE.

not_read

  • The DataReader has not accessed that sample before.
Returns
the not_read SampleState

Definition at line 49 of file DataStateImpl.hpp.

◆ read()

const SampleState dds::sub::status::SampleState::read ( )
inlinestatic

Get the READ_SAMPLE_STATE.

read

  • The DataReader has already accessed that sample by means of read. Had the sample been accessed by take it would no longer be available to the DataReader.
Returns
the read SampleState

Definition at line 44 of file DataStateImpl.hpp.


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