RTI Connext Modern C++ API  Version 6.0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dds::sub::status::ViewState Class Reference

Indicates whether or not an instance is new. More...

#include <dds/sub/status/DataState.hpp>

Inherits bitset< OMG_DDS_STATE_BIT_COUNT >.

Public Types

typedef std::bitset
< OMG_DDS_STATE_BIT_COUNT > 
MaskType
 An std::bitset of ViewStates.
 

Public Member Functions

 ViewState (const MaskType &other)
 Create an ViewState from MaskType.
 

Static Public Member Functions

static const ViewState new_view ()
 Creates a new_view ViewState object.
 
static const ViewState not_new_view ()
 Creates a not_new_view ViewState object.
 
static const ViewState any ()
 Creates an any ViewState object.
 

Detailed Description

Indicates whether or not an instance is new.

For each instance (identified by the key), the middleware internally maintains a view state relative to each dds::sub::DataReader. The view state can be either:

The view_state available in the dds::sub::SampleInfo is a snapshot of the view state of the instance relative to the dds::sub::DataReader used to access the samples at the time the collection was obtained (i.e. at the time read or take was called). The view_state is therefore the same for all samples in the returned collection that refer to the same instance.

Once an instance has been detected as not having any "live" writers and all the samples associated with the instance are "taken" from the dds::sub::DataReader, the middleware can reclaim all local resources regarding the instance. Future samples will be treated as "never seen."

Member Typedef Documentation

typedef std::bitset<OMG_DDS_STATE_BIT_COUNT > dds::sub::status::ViewState::MaskType

An std::bitset of ViewStates.

Constructor & Destructor Documentation

dds::sub::status::ViewState::ViewState ( const MaskType other)
inline

Create an ViewState from MaskType.

Parameters
otherThe MaskType to create the ViewState with

Member Function Documentation

static const ViewState dds::sub::status::ViewState::new_view ( )
inlinestatic

Creates a new_view ViewState object.

The latest generation of the instance has not previously been accessed.

static const ViewState dds::sub::status::ViewState::not_new_view ( )
inlinestatic

Creates a not_new_view ViewState object.

The latest generation of the instance has previously been accessed.

static const ViewState dds::sub::status::ViewState::any ( )
inlinestatic

Creates an any ViewState object.

new_view() | not_new_view()


RTI Connext Modern C++ API Version 6.0.1 Copyright © Sat Nov 23 2019 Real-Time Innovations, Inc