RTI Connext Modern C++ API Version 7.2.0
|
Indicates if the samples are from a live dds::pub::DataWriter or not. More...
#include <dds/sub/status/DataState.hpp>
Inherits std::bitset< OMG_DDS_STATE_BIT_COUNT >.
Public Types | |
typedef std::bitset< OMG_DDS_STATE_BIT_COUNT > | MaskType |
An std::bitset of InstanceStates. More... | |
Public Member Functions | |
InstanceState (const MaskType &other) | |
Create an InstanceState from MaskType. More... | |
Static Public Member Functions | |
static const InstanceState | alive () |
Creates an alive InstanceState object. More... | |
static const InstanceState | not_alive_disposed () |
Creates a not_alive_disposed InstanceState object. More... | |
static const InstanceState | not_alive_no_writers () |
Creates a not_alive_no_writers InstanceState object. More... | |
static const InstanceState | not_alive_mask () |
Creates an InstanceState object representing any not alive state. More... | |
static const InstanceState | any () |
Creates an InstanceState object representing any instance state. More... | |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &os, const InstanceState &s) |
Prints an instance state as a readable string. More... | |
Indicates if the samples are from a live dds::pub::DataWriter or not.
For each instance, the middleware internally maintains an instance state. The instance state can be:
The precise behavior events that cause the instance state to change depends on the setting of the OWNERSHIP QoS:
The instance state available in the dds::sub::SampleInfo is a snapshot of the instance state of the instance at the time the collection was obtained (i.e. at the time read or take was called). The instance state is therefore the same for all samples in the returned collection that refer to the same instance.
For example, you can check if an instance is disposed as follows:
typedef std::bitset<OMG_DDS_STATE_BIT_COUNT > dds::sub::status::InstanceState::MaskType |
An std::bitset of InstanceStates.
|
inline |
Create an InstanceState from MaskType.
other | The MaskType to create the InstanceState with |
|
inlinestatic |
Creates an alive InstanceState object.
The instance is currently in existence.
Referenced by dds::sub::status::DataState::any_data(), dds::sub::status::DataState::new_data(), and dds::sub::status::DataState::new_instance().
|
inlinestatic |
Creates a not_alive_disposed InstanceState object.
Indicates that the instance has been disposed by a DataWriter.
|
inlinestatic |
Creates a not_alive_no_writers InstanceState object.
Indicates that none of the DataWriters that are currently alive (according to the dds::core::policy::Liveliness policy) are writing the instance.
|
inlinestatic |
Creates an InstanceState object representing any not alive state.
This is equivalent to not_alive_disposed() | not_alive_no_writers()
|
inlinestatic |
Creates an InstanceState object representing any instance state.
This is equivalent to not_alive_mask() | alive()
.
Referenced by dds::sub::status::DataState::any().
|
related |
Prints an instance state as a readable string.