#include <InstanceState.h>
Collaboration diagram for OpenDDS::DCPS::InstanceState:

Public Member Functions | |
| InstanceState (DataReaderImpl *reader, DDS::InstanceHandle_t handle) | |
| Constructor. | |
| virtual | ~InstanceState (void) |
| Destructor. | |
| void | sample_info (::DDS::SampleInfo &si, const ReceivedDataElement *de) |
| Populate the SampleInfo structure. | |
| DDS::InstanceStateKind | instance_state () const |
| Access instance state. | |
| DDS::ViewStateKind | view_state () const |
| Access view state. | |
| size_t | disposed_generation_count () const |
| Access disposed generation count. | |
| size_t | no_writers_generation_count () const |
| Access no writers generation count. | |
| void | dispose_was_received (const PublicationId &writer_id) |
| DISPOSE message received for this instance. | |
| void | data_was_received (const PublicationId &writer_id) |
| Data sample received for this instance. | |
| void | lively (const PublicationId &writer_id) |
| LIVELINESS message received for this DataWriter. | |
| void | accessed () |
| A read or take operation has been performed on this instance. | |
| bool | most_recent_generation (ReceivedDataElement *item) const |
| void | empty (bool value) |
| DataReader has become empty. | |
| void | release_if_empty () |
| void | writer_became_dead (const PublicationId &writer_id, int num_alive_writers, const ACE_Time_Value &when) |
| tell this instance when a DataWriter transitions to NOT_ALIVE | |
| void | unregister_was_received (const PublicationId &writer_id) |
Private Types | |
| typedef std::set< PublicationId, GUID_tKeyLessThan > | Writers |
Private Attributes | |
| DDS::InstanceStateKind | instance_state_ |
| DDS::ViewStateKind | view_state_ |
| size_t | disposed_generation_count_ |
| size_t | no_writers_generation_count_ |
| bool | no_writers_ |
| bool | empty_ |
| DataReaderImpl * | reader_ |
| ::DDS::InstanceHandle_t | handle_ |
| Writers | writers_ |
Provide a mechanism to manage the view state and instance state values for an instance contained within a DataReader. The instance_state and view_state are managed by this class. Accessors are provided to query the current value of each of these states.
typedef std::set<PublicationId, GUID_tKeyLessThan> OpenDDS::DCPS::InstanceState::Writers [private] |
| OpenDDS::DCPS::InstanceState::InstanceState | ( | DataReaderImpl * | reader, | |
| DDS::InstanceHandle_t | handle | |||
| ) |
Constructor.
| ACE_INLINE OpenDDS::DCPS::InstanceState::~InstanceState | ( | void | ) | [virtual] |
Destructor.
| ACE_INLINE void OpenDDS::DCPS::InstanceState::accessed | ( | ) |
A read or take operation has been performed on this instance.
| ACE_INLINE void OpenDDS::DCPS::InstanceState::data_was_received | ( | const PublicationId & | writer_id | ) |
Data sample received for this instance.
| void OpenDDS::DCPS::InstanceState::dispose_was_received | ( | const PublicationId & | writer_id | ) |
DISPOSE message received for this instance.
| ACE_INLINE size_t OpenDDS::DCPS::InstanceState::disposed_generation_count | ( | ) | const |
Access disposed generation count.
| ACE_INLINE void OpenDDS::DCPS::InstanceState::empty | ( | bool | value | ) |
DataReader has become empty.
| ACE_INLINE DDS::InstanceStateKind OpenDDS::DCPS::InstanceState::instance_state | ( | ) | const |
Access instance state.
| ACE_INLINE void OpenDDS::DCPS::InstanceState::lively | ( | const PublicationId & | writer_id | ) |
LIVELINESS message received for this DataWriter.
| ACE_INLINE bool OpenDDS::DCPS::InstanceState::most_recent_generation | ( | ReceivedDataElement * | item | ) | const |
| ACE_INLINE size_t OpenDDS::DCPS::InstanceState::no_writers_generation_count | ( | ) | const |
Access no writers generation count.
| void OpenDDS::DCPS::InstanceState::release_if_empty | ( | ) |
Remove the instance if it's instance has no samples and no writers.
| ACE_INLINE void OpenDDS::DCPS::InstanceState::sample_info | ( | ::DDS::SampleInfo & | si, | |
| const ReceivedDataElement * | de | |||
| ) |
Populate the SampleInfo structure.
| void OpenDDS::DCPS::InstanceState::unregister_was_received | ( | const PublicationId & | writer_id | ) |
| ACE_INLINE DDS::ViewStateKind OpenDDS::DCPS::InstanceState::view_state | ( | ) | const |
Access view state.
| void OpenDDS::DCPS::InstanceState::writer_became_dead | ( | const PublicationId & | writer_id, | |
| int | num_alive_writers, | |||
| const ACE_Time_Value & | when | |||
| ) |
tell this instance when a DataWriter transitions to NOT_ALIVE
size_t OpenDDS::DCPS::InstanceState::disposed_generation_count_ [private] |
Number of times the instance state changes from NOT_ALIVE_DISPOSED to ALIVE.
bool OpenDDS::DCPS::InstanceState::empty_ [private] |
Keep track of whether the DataReader is empty or not.
Current instance state.
Can have values defined as:
DDS::ALIVE_INSTANCE_STATE DDS::NOT_ALIVE_DISPOSED_INSTANCE_STATE DDS::NOT_ALIVE_NO_WRITERS_INSTANCE_STATE
and can be checked with the masks:
bool OpenDDS::DCPS::InstanceState::no_writers_ [private] |
Keep track of the existence of a live writer since we need to discern this difference while in the DISPOSED state.
size_t OpenDDS::DCPS::InstanceState::no_writers_generation_count_ [private] |
Number of times the instance state changes from NOT_ALIVE_NO_WRITERS to ALIVE.
Reference to our containing reader. This is used to call back and notify the reader that liveliness has been lost on this instance. It is also queried to determine if the DataReader is empty -- that it contains no more sample data.
Current instance view state.
Can have values defined as:
DDS::NEW_VIEW_STATE DDS::NOT_NEW_VIEW_STATE
and can be checked with the mask:
1.4.7