OpenDDS
Snapshot(2023/04/07-19:43)
|
#include <SubscriberImpl.h>
Private Member Functions | |
typedef | OPENDDS_MULTIMAP (OPENDDS_STRING, DataReaderImpl_rch) DataReaderMap |
typedef | OPENDDS_SET (DataReaderImpl_rch) DataReaderSet |
typedef | OPENDDS_MAP_CMP (GUID_t, DDS::DataReaderQos, GUID_tKeyLessThan) DrIdToQosMap |
DataReader id to qos map. More... | |
typedef | OPENDDS_MAP (String, DDS::DataReader_var) MultitopicReaderMap |
Private Attributes | |
DDS::InstanceHandle_t | handle_ |
DDS::SubscriberQos | qos_ |
DDS::DataReaderQos | default_datareader_qos_ |
ACE_Thread_Mutex | listener_mutex_ |
DDS::StatusMask | listener_mask_ |
DDS::SubscriberListener_var | listener_ |
DataReaderSet | readers_not_enabled_ |
DataReaderMap | datareader_map_ |
DataReaderSet | datareader_set_ |
MultitopicReaderMap | multitopic_reader_map_ |
WeakRcHandle< DomainParticipantImpl > | participant_ |
DDS::DomainId_t | domain_id_ |
GUID_t | dp_id_ |
unsigned int | raw_latency_buffer_size_ |
Bound (or initial reservation) of raw latency buffers. More... | |
DataCollector< double >::OnFull | raw_latency_buffer_type_ |
Type of raw latency data buffers. More... | |
ACE_Recursive_Thread_Mutex | dr_set_lock_ |
ACE_Recursive_Thread_Mutex | si_lock_ |
unique_ptr< Monitor > | monitor_ |
Monitor object for this entity. More... | |
int | access_depth_ |
Definition at line 36 of file SubscriberImpl.h.
OpenDDS::DCPS::SubscriberImpl::SubscriberImpl | ( | DDS::InstanceHandle_t | handle, |
const DDS::SubscriberQos & | qos, | ||
DDS::SubscriberListener_ptr | a_listener, | ||
const DDS::StatusMask & | mask, | ||
DomainParticipantImpl * | participant | ||
) |
Definition at line 41 of file SubscriberImpl.cpp.
References listener_, monitor_, and TheServiceParticipant.
|
virtual |
Definition at line 62 of file SubscriberImpl.cpp.
References ACE_ERROR, handle_, is_clean(), LM_WARNING, OpenDDS::DCPS::log_level, participant_, and OpenDDS::DCPS::LogLevel::Warning.
|
virtual |
Implements DDS::Subscriber.
Definition at line 728 of file SubscriberImpl.cpp.
References access_depth_, DDS::PresentationQosPolicy::access_scope, ACE_ERROR, ACE_GUARD_RETURN, ACE_TEXT(), datareader_set_, OpenDDS::DCPS::DCPS_debug_level, dr_set_lock_, OpenDDS::DCPS::EntityImpl::enabled_, DDS::GROUP_PRESENTATION_QOS, LM_ERROR, DDS::SubscriberQos::presentation, qos_, DDS::RETCODE_ERROR, DDS::RETCODE_NOT_ENABLED, DDS::RETCODE_OK, and si_lock_.
void OpenDDS::DCPS::SubscriberImpl::coherent_change_received | ( | const GUID_t & | publisher_id, |
DataReaderImpl * | reader, | ||
Coherent_State & | group_state | ||
) |
Definition at line 1038 of file SubscriberImpl.cpp.
References ACE_GUARD, OpenDDS::DCPS::COMPLETED, datareader_set_, dr_set_lock_, OpenDDS::DCPS::GUID_UNKNOWN, OpenDDS::DCPS::NOT_COMPLETED_YET, OpenDDS::DCPS::REJECTED, and state.
bool OpenDDS::DCPS::SubscriberImpl::contains_reader | ( | DDS::InstanceHandle_t | a_handle | ) |
Definition at line 87 of file SubscriberImpl.cpp.
References ACE_GUARD_RETURN, datareader_map_, and si_lock_.
|
virtual |
Definition at line 846 of file SubscriberImpl.cpp.
References OpenDDS::DCPS::Qos_Helper::copy_from_topic_qos(), DDS::RETCODE_INCONSISTENT_POLICY, and DDS::RETCODE_OK.
|
virtual |
Definition at line 105 of file SubscriberImpl.cpp.
References ACE_ERROR, ACE_GUARD_RETURN, ACE_TEXT(), DDS::EntityFactoryQosPolicy::autoenable_created_entities, OpenDDS::DCPS::DCPS_debug_level, default_datareader_qos_, OpenDDS::DCPS::DataReaderImpl::enable(), OpenDDS::DCPS::DataReaderImpl::enable_filtering(), OpenDDS::DCPS::EntityImpl::enabled_, DDS::SubscriberQos::entity_factory, OpenDDS::DCPS::ContentFilteredTopicImpl::get_related_topic(), OpenDDS::DCPS::TopicDescriptionImpl::get_type_support(), TAO::String_var< charT >::in(), OpenDDS::DCPS::RcHandle< T >::in(), OpenDDS::DCPS::MultiTopicDataReaderBase::init(), OpenDDS::DCPS::DataReaderImpl::init(), CORBA::is_nil(), LM_ERROR, LM_WARNING, multitopic_reader_enabled(), name, participant_, qos_, OpenDDS::DCPS::DataReaderImpl::raw_latency_buffer_size(), raw_latency_buffer_size_, OpenDDS::DCPS::DataReaderImpl::raw_latency_buffer_type(), raw_latency_buffer_type_, OpenDDS::DCPS::rchandle_from(), readers_not_enabled_, DDS::RETCODE_OK, si_lock_, and validate_datareader_qos().
Referenced by OpenDDS::DCPS::MultiTopicDataReaderBase::init().
void OpenDDS::DCPS::SubscriberImpl::data_received | ( | DataReaderImpl * | reader | ) |
Definition at line 917 of file SubscriberImpl.cpp.
References ACE_GUARD, datareader_set_, dr_set_lock_, and OpenDDS::DCPS::rchandle_from().
|
virtual |
Implements DDS::Subscriber.
Definition at line 395 of file SubscriberImpl.cpp.
References ACE_ERROR, ACE_GUARD_RETURN, ACE_TEXT(), datareader_map_, OpenDDS::DCPS::DCPS_debug_level, delete_datareader(), LM_ERROR, multitopic_reader_map_, OPENDDS_VECTOR(), DDS::RETCODE_ERROR, DDS::RETCODE_OK, OpenDDS::DCPS::EntityImpl::set_deleted(), and si_lock_.
Referenced by OpenDDS::DCPS::DomainParticipantImpl::delete_subscriber().
|
virtual |
Definition at line 264 of file SubscriberImpl.cpp.
References ACE_ERROR, ACE_GUARD_RETURN, ACE_TEXT(), OpenDDS::DCPS::LogGuid::c_str(), OpenDDS::DCPS::MultiTopicDataReaderBase::cleanup(), datareader_map_, datareader_set_, DBG_ENTRY_LVL, OpenDDS::DCPS::DCPS_debug_level, domain_id_, dr_set_lock_, OpenDDS::DCPS::RcHandle< T >::get(), TAO::String_var< charT >::in(), LM_ERROR, LM_NOTICE, OpenDDS::DCPS::log_level, monitor_, multitopic_reader_map_, OpenDDS::DCPS::LogLevel::Notice, OpenDDS::DCPS::rchandle_from(), DDS::RETCODE_ERROR, DDS::RETCODE_OK, DDS::RETCODE_PRECONDITION_NOT_MET, OpenDDS::DCPS::retcode_to_string(), si_lock_, and TheServiceParticipant.
Referenced by delete_contained_entities().
|
virtual |
Implements DDS::Entity.
Definition at line 859 of file SubscriberImpl.cpp.
References ACE_GUARD_RETURN, DDS::EntityFactoryQosPolicy::autoenable_created_entities, dp_id_, DDS::SubscriberQos::entity_factory, OpenDDS::DCPS::EntityImpl::is_enabled(), monitor_, participant_, qos_, readers_not_enabled_, DDS::RETCODE_ERROR, DDS::RETCODE_OK, DDS::RETCODE_PRECONDITION_NOT_MET, OpenDDS::DCPS::EntityImpl::set_enabled(), and si_lock_.
Referenced by OpenDDS::DCPS::DomainParticipantImpl::create_subscriber().
|
virtual |
Implements DDS::Subscriber.
Definition at line 768 of file SubscriberImpl.cpp.
References access_depth_, DDS::PresentationQosPolicy::access_scope, ACE_ERROR, ACE_GUARD_RETURN, ACE_TEXT(), datareader_set_, OpenDDS::DCPS::DCPS_debug_level, dr_set_lock_, OpenDDS::DCPS::EntityImpl::enabled_, DDS::GROUP_PRESENTATION_QOS, LM_ERROR, DDS::SubscriberQos::presentation, qos_, DDS::RETCODE_ERROR, DDS::RETCODE_NOT_ENABLED, DDS::RETCODE_OK, DDS::RETCODE_PRECONDITION_NOT_MET, and si_lock_.
|
virtual |
Definition at line 504 of file SubscriberImpl.cpp.
References access_depth_, DDS::PresentationQosPolicy::access_scope, ACE_GUARD_RETURN, DDS::PresentationQosPolicy::coherent_access, datareader_set_, dr_set_lock_, OpenDDS::DCPS::GroupRakeData::get_datareaders(), DDS::GROUP_PRESENTATION_QOS, DDS::PresentationQosPolicy::ordered_access, DDS::SubscriberQos::presentation, OpenDDS::DCPS::push_back(), qos_, DDS::RETCODE_ERROR, DDS::RETCODE_OK, and DDS::RETCODE_PRECONDITION_NOT_MET.
|
virtual |
Definition at line 838 of file SubscriberImpl.cpp.
References default_datareader_qos_, and DDS::RETCODE_OK.
Referenced by OpenDDS::RTPS::RtpsDiscovery::init_bit(), and OpenDDS::DCPS::StaticDiscovery::init_bit().
|
virtual |
Implements OpenDDS::DCPS::EntityImpl.
Definition at line 81 of file SubscriberImpl.cpp.
References handle_.
Referenced by OpenDDS::DCPS::SubscriberMonitorImpl::report().
|
virtual |
Implements DDS::Subscriber.
Definition at line 719 of file SubscriberImpl.cpp.
References listener_, and listener_mutex_.
|
virtual |
Implements DDS::Subscriber.
Definition at line 819 of file SubscriberImpl.cpp.
References participant_.
Referenced by OpenDDS::RTPS::RtpsDiscovery::create_bit_dr(), OpenDDS::DCPS::StaticDiscovery::create_bit_dr(), OpenDDS::DCPS::MultiTopicDataReaderBase::init(), and OpenDDS::DCPS::SubscriberMonitorImpl::report().
|
virtual |
Definition at line 699 of file SubscriberImpl.cpp.
References qos_, and DDS::RETCODE_OK.
Referenced by OpenDDS::DCPS::DataReaderImpl::init().
void OpenDDS::DCPS::SubscriberImpl::get_subscription_ids | ( | SubscriptionIdVec & | subs | ) |
Populates a std::vector with the SubscriptionIds (GUIDs) of this Subscriber's Data Readers
Definition at line 1000 of file SubscriberImpl.cpp.
References ACE_GUARD_RETURN, datareader_map_, and si_lock_.
Referenced by OpenDDS::DCPS::SubscriberMonitorImpl::report().
bool OpenDDS::DCPS::SubscriberImpl::is_clean | ( | String * | leftover_entities = 0 | ) | const |
This method is not defined in the IDL and is defined for internal use. Check if there is any datareader associated with it.
Definition at line 898 of file SubscriberImpl.cpp.
References datareader_map_, OpenDDS::DCPS::NUMBER_OF_BUILT_IN_TOPICS, TheTransientKludge, and OpenDDS::DCPS::to_dds_string().
Referenced by OpenDDS::DCPS::DomainParticipantImpl::delete_subscriber(), and ~SubscriberImpl().
DDS::SubscriberListener_ptr OpenDDS::DCPS::SubscriberImpl::listener_for | ( | DDS::StatusKind | kind | ) |
Definition at line 968 of file SubscriberImpl.cpp.
References CORBA::is_nil(), listener_, listener_mask_, listener_mutex_, participant_, and ACE_Guard< ACE_LOCK >::release().
Referenced by OpenDDS::DCPS::DataReaderImpl_T< DynamicSample >::finish_store_instance_data().
|
virtual |
Definition at line 468 of file SubscriberImpl.cpp.
References ACE_DEBUG, ACE_GUARD_RETURN, ACE_TEXT(), datareader_map_, OpenDDS::DCPS::DCPS_debug_level, LM_DEBUG, multitopic_reader_map_, and si_lock_.
DDS::ReturnCode_t OpenDDS::DCPS::SubscriberImpl::multitopic_reader_enabled | ( | DDS::DataReader_ptr | reader | ) |
Definition at line 951 of file SubscriberImpl.cpp.
References TAO::String_var< charT >::in(), multitopic_reader_map_, and DDS::RETCODE_OK.
Referenced by create_datareader().
|
virtual |
Implements DDS::Subscriber.
Definition at line 558 of file SubscriberImpl.cpp.
References ACE_ERROR, ACE_GUARD_RETURN, ACE_TEXT(), DDS::DATA_AVAILABLE_STATUS, datareader_map_, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::MultiTopicDataReaderBase::get_listener(), OpenDDS::DCPS::MultiTopicDataReaderBase::have_sample_states(), CORBA::is_nil(), LM_ERROR, multitopic_reader_map_, DDS::NOT_READ_SAMPLE_STATE, DDS::RETCODE_ERROR, DDS::RETCODE_OK, OpenDDS::DCPS::MultiTopicDataReaderBase::set_status_changed_flag(), si_lock_, and TheServiceParticipant.
|
private |
|
private |
DataReader id to qos map.
|
private |
Keep track of all the DataReaders attached to this Subscriber: key is the topic_name
|
private |
Keep track of DataReaders with data std::set for now, want to encapsulate this so we can switch between a set or list depending on Presentation QoS.
typedef OpenDDS::DCPS::SubscriberImpl::OPENDDS_VECTOR | ( | GUID_t | ) |
Referenced by delete_contained_entities().
|
virtual |
Reimplemented from OpenDDS::DCPS::EntityImpl.
Definition at line 1088 of file SubscriberImpl.cpp.
References participant_.
unsigned int & OpenDDS::DCPS::SubscriberImpl::raw_latency_buffer_size | ( | ) |
Configure the size of the raw data collection buffer.
Definition at line 988 of file SubscriberImpl.cpp.
References raw_latency_buffer_size_.
Referenced by OpenDDS::DCPS::MultiTopicDataReaderBase::init().
DataCollector< double >::OnFull & OpenDDS::DCPS::SubscriberImpl::raw_latency_buffer_type | ( | ) |
Configure the type of the raw data collection buffer.
Definition at line 994 of file SubscriberImpl.cpp.
References raw_latency_buffer_type_.
Referenced by OpenDDS::DCPS::MultiTopicDataReaderBase::init().
DDS::ReturnCode_t OpenDDS::DCPS::SubscriberImpl::reader_enabled | ( | const char * | topic_name, |
DataReaderImpl * | reader | ||
) |
Definition at line 926 of file SubscriberImpl.cpp.
References ACE_DEBUG, ACE_GUARD_RETURN, ACE_TEXT(), datareader_map_, OpenDDS::DCPS::DCPS_debug_level, LM_DEBUG, monitor_, OpenDDS::DCPS::rchandle_from(), readers_not_enabled_, DDS::RETCODE_ERROR, DDS::RETCODE_OK, and si_lock_.
void OpenDDS::DCPS::SubscriberImpl::remove_from_datareader_set | ( | DataReaderImpl * | reader | ) |
Definition at line 960 of file SubscriberImpl.cpp.
References ACE_GUARD, datareader_set_, dr_set_lock_, and OpenDDS::DCPS::rchandle_from().
Referenced by OpenDDS::DCPS::MultiTopicDataReaderBase::cleanup().
|
virtual |
Definition at line 825 of file SubscriberImpl.cpp.
References OpenDDS::DCPS::Qos_Helper::consistent(), default_datareader_qos_, DDS::RETCODE_INCONSISTENT_POLICY, DDS::RETCODE_OK, and OpenDDS::DCPS::Qos_Helper::valid().
|
virtual |
Definition at line 707 of file SubscriberImpl.cpp.
References listener_, listener_mask_, listener_mutex_, and DDS::RETCODE_OK.
|
virtual |
Definition at line 620 of file SubscriberImpl.cpp.
References ACE_ERROR, ACE_GUARD_RETURN, ACE_TEXT(), OpenDDS::DCPS::Qos_Helper::changeable(), OpenDDS::DCPS::Qos_Helper::consistent(), datareader_map_, OpenDDS::DCPS::DCPS_debug_level, domain_id_, dp_id_, OpenDDS::DCPS::EntityImpl::enabled_, LM_ERROR, OPENDDS_NO_OBJECT_MODEL_PROFILE_COMPATIBILITY_CHECK, qos_, DDS::RETCODE_ERROR, DDS::RETCODE_IMMUTABLE_POLICY, DDS::RETCODE_INCONSISTENT_POLICY, DDS::RETCODE_OK, DDS::RETCODE_UNSUPPORTED, si_lock_, TheServiceParticipant, and OpenDDS::DCPS::Qos_Helper::valid().
void OpenDDS::DCPS::SubscriberImpl::update_ownership_strength | ( | const GUID_t & | pub_id, |
const CORBA::Long & | ownership_strength | ||
) |
Definition at line 1017 of file SubscriberImpl.cpp.
References ACE_GUARD_RETURN, datareader_map_, and si_lock_.
|
static |
Definition at line 1094 of file SubscriberImpl.cpp.
References ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::Qos_Helper::consistent(), OpenDDS::DCPS::Qos_Helper::copy_from_topic_qos(), DATAREADER_QOS_DEFAULT, DATAREADER_QOS_USE_TOPIC_QOS, OpenDDS::DCPS::DCPS_debug_level, LM_ERROR, OPENDDS_END_VERSIONED_NAMESPACE_DECL, OPENDDS_NO_DURABILITY_KIND_TRANSIENT_PERSISTENT_COMPATIBILITY_CHECK, OPENDDS_NO_OWNERSHIP_KIND_EXCLUSIVE_COMPATIBILITY_CHECK, OPENDDS_NO_OWNERSHIP_PROFILE_COMPATIBILITY_CHECK, and OpenDDS::DCPS::Qos_Helper::valid().
Referenced by create_datareader(), and OpenDDS::DCPS::DomainParticipantImpl::create_recorder().
|
private |
Definition at line 219 of file SubscriberImpl.h.
Referenced by begin_access(), end_access(), and get_datareaders().
|
private |
Definition at line 188 of file SubscriberImpl.h.
Referenced by contains_reader(), delete_contained_entities(), delete_datareader(), get_subscription_ids(), is_clean(), lookup_datareader(), notify_datareaders(), reader_enabled(), set_qos(), and update_ownership_strength().
|
private |
Definition at line 189 of file SubscriberImpl.h.
Referenced by begin_access(), coherent_change_received(), data_received(), delete_datareader(), end_access(), get_datareaders(), and remove_from_datareader_set().
|
private |
Definition at line 181 of file SubscriberImpl.h.
Referenced by create_datareader(), get_default_datareader_qos(), and set_default_datareader_qos().
|
private |
Definition at line 198 of file SubscriberImpl.h.
Referenced by delete_datareader(), and set_qos().
|
private |
Definition at line 199 of file SubscriberImpl.h.
|
private |
This lock protects datareader_set_. Only this lock needs to be acquired if only datareader_set_ is accessed.
Definition at line 209 of file SubscriberImpl.h.
Referenced by begin_access(), coherent_change_received(), data_received(), delete_datareader(), end_access(), get_datareaders(), and remove_from_datareader_set().
|
private |
Definition at line 178 of file SubscriberImpl.h.
Referenced by get_instance_handle(), and ~SubscriberImpl().
|
private |
Definition at line 185 of file SubscriberImpl.h.
Referenced by get_listener(), listener_for(), set_listener(), and SubscriberImpl().
|
private |
Definition at line 184 of file SubscriberImpl.h.
Referenced by listener_for(), and set_listener().
|
private |
Definition at line 183 of file SubscriberImpl.h.
Referenced by get_listener(), listener_for(), and set_listener().
|
private |
Monitor object for this entity.
Definition at line 217 of file SubscriberImpl.h.
Referenced by delete_datareader(), enable(), reader_enabled(), and SubscriberImpl().
|
private |
Definition at line 193 of file SubscriberImpl.h.
Referenced by delete_contained_entities(), delete_datareader(), lookup_datareader(), multitopic_reader_enabled(), and notify_datareaders().
|
private |
Definition at line 196 of file SubscriberImpl.h.
Referenced by create_datareader(), enable(), get_participant(), listener_for(), parent(), and ~SubscriberImpl().
|
private |
Definition at line 180 of file SubscriberImpl.h.
Referenced by begin_access(), create_datareader(), enable(), end_access(), get_datareaders(), get_qos(), and set_qos().
|
private |
Bound (or initial reservation) of raw latency buffers.
Definition at line 202 of file SubscriberImpl.h.
Referenced by create_datareader(), and raw_latency_buffer_size().
|
private |
Type of raw latency data buffers.
Definition at line 205 of file SubscriberImpl.h.
Referenced by create_datareader(), and raw_latency_buffer_type().
|
private |
Definition at line 187 of file SubscriberImpl.h.
Referenced by create_datareader(), enable(), and reader_enabled().
|
private |
General lock protects the data structures in this class. If datareader_set_ is accessed together with other data members, acquire dr_set_lock_ in the scope of this lock.
Definition at line 214 of file SubscriberImpl.h.
Referenced by begin_access(), contains_reader(), create_datareader(), delete_contained_entities(), delete_datareader(), enable(), end_access(), get_subscription_ids(), lookup_datareader(), notify_datareaders(), reader_enabled(), set_qos(), and update_ownership_strength().