OpenDDS
Snapshot(2023/04/07-19:43)
|
Implementation of Recorder functionality. More...
#include <RecorderImpl.h>
Protected Member Functions | |
virtual void | remove_associations_i (const WriterIdSeq &writers, bool callback) |
![]() | |
void | cdr_encapsulation (bool encap) |
![]() | |
RcObject () | |
![]() | |
TransportReceiveListener () | |
![]() | |
LocalObject (void) | |
![]() | |
Object (int dummy=0) | |
TAO::Object_Proxy_Broker * | proxy_broker () const |
![]() | |
DDS::ReturnCode_t | set_enabled () |
void | set_deleted (bool state) |
bool | get_deleted () const |
DDS::InstanceHandle_t | get_entity_instance_handle (const GUID_t &id, const RcHandle< DomainParticipantImpl > &participant) |
Private Member Functions | |
void | notify_subscription_lost (const DDS::InstanceHandleSeq &handles) |
void | lookup_instance_handles (const WriterIdSeq &ids, DDS::InstanceHandleSeq &hdls) |
Lookup the instance handles by the publication repo ids. More... | |
DDS::DynamicData_ptr | get_dynamic_data (const RawDataSample &sample) |
void | check_encap (bool b) |
bool | check_encap () const |
typedef | OPENDDS_MAP_CMP (GUID_t, DDS::InstanceHandle_t, GUID_tKeyLessThan) RepoIdToHandleMap |
typedef | OPENDDS_MAP_CMP (GUID_t, RcHandle< WriterInfo >, GUID_tKeyLessThan) WriterMapType |
publications writing to this reader. More... | |
typedef | OPENDDS_MAP (GUID_t, DDS::DynamicType_var) DynamicTypeByPubId |
![]() | |
WriterInfoListener () | |
virtual | ~WriterInfoListener () |
virtual void | writer_became_alive (WriterInfo &info, const MonotonicTimePoint &when) |
virtual void | writer_became_dead (WriterInfo &info) |
virtual void | writer_removed (WriterInfo &info) |
![]() | |
virtual | ~RcObject () |
long | ref_count () const |
WeakObject * | _get_weak_object () const |
RcObject () | |
Friends | |
class | ::DDS_TEST |
Implementation of Recorder functionality.
This class is the implementation of the Recorder. Inheritance is used to limit the applications access to underlying system methods.
Definition at line 45 of file RecorderImpl.h.
OpenDDS::DCPS::RecorderImpl::RecorderImpl | ( | ) |
Definition at line 52 of file RecorderImpl.cpp.
References DDS::SubscriptionMatchedStatus::current_count, DDS::SubscriptionMatchedStatus::current_count_change, DDS::HANDLE_NIL, DDS::RequestedIncompatibleQosStatus::last_policy_id, DDS::SubscriptionMatchedStatus::last_publication_handle, DDS::RequestedIncompatibleQosStatus::policies, requested_incompatible_qos_status_, subscription_match_status_, DDS::RequestedIncompatibleQosStatus::total_count, DDS::SubscriptionMatchedStatus::total_count, DDS::RequestedIncompatibleQosStatus::total_count_change, and DDS::SubscriptionMatchedStatus::total_count_change.
|
virtual |
|
virtual |
Implements OpenDDS::DCPS::DataReaderCallbacks.
Definition at line 248 of file RecorderImpl.cpp.
References ACE_DEBUG, ACE_ERROR, ACE_GUARD, ACE_TEXT(), ACE_WRITE_GUARD, OpenDDS::DCPS::DomainParticipantImpl::assign_handle(), OpenDDS::DCPS::TransportClient::associate(), OpenDDS::DCPS::LogGuid::c_str(), DDS::SubscriptionMatchedStatus::current_count, DDS::SubscriptionMatchedStatus::current_count_change, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::AssociationData::discovery_locator_, DDS::DataWriterQos::durability, OpenDDS::DCPS::GUID_UNKNOWN, id_to_handle_map_, OpenDDS::DCPS::RcHandle< T >::in(), is_bit_, DDS::DurabilityQosPolicy::kind, DDS::ReliabilityQosPolicy::kind, DDS::SubscriptionMatchedStatus::last_publication_handle, listener_, LM_DEBUG, LM_WARNING, OpenDDS::DCPS::log_level, OpenDDS::DCPS::RecorderListener::on_recorder_matched(), participant_servant_, publication_handle_lock_, OpenDDS::DCPS::AssociationData::publication_transport_priority_, DDS::DataWriterQos::reliability, DDS::RELIABLE_RELIABILITY_QOS, OpenDDS::DCPS::AssociationData::remote_data_, OpenDDS::DCPS::AssociationData::remote_durable_, OpenDDS::DCPS::AssociationData::remote_id_, OpenDDS::DCPS::AssociationData::remote_reliable_, OpenDDS::DCPS::AssociationData::remote_transport_context_, sample_lock_, OpenDDS::DCPS::WriterInfoListener::subscription_id_, subscription_match_status_, DDS::SubscriptionMatchedStatus::total_count, DDS::SubscriptionMatchedStatus::total_count_change, DDS::DataWriterQos::transport_priority, OpenDDS::DCPS::WriterAssociation::transportContext, DDS::TransportPriorityQosPolicy::value, DDS::VOLATILE_DURABILITY_QOS, OpenDDS::DCPS::LogLevel::Warning, OpenDDS::DCPS::WriterAssociation::writerDiscInfo, OpenDDS::DCPS::WriterAssociation::writerId, OpenDDS::DCPS::WriterAssociation::writerQos, writers_, writers_lock_, and OpenDDS::DCPS::WriterAssociation::writerTransInfo.
void OpenDDS::DCPS::RecorderImpl::add_to_dynamic_type_map | ( | const GUID_t & | pub_id, |
const XTypes::TypeIdentifier & | ti | ||
) |
Definition at line 234 of file RecorderImpl.cpp.
References ACE_DEBUG, OpenDDS::DCPS::DCPS_debug_level, dt_map_, OpenDDS::DCPS::DomainParticipantImpl::get_type_lookup_service(), LM_DEBUG, and participant_servant_.
Referenced by OpenDDS::RTPS::Sedp::match_continue().
|
inlineprivatevirtual |
|
inlineprivatevirtual |
|
virtual |
Implements OpenDDS::DCPS::TransportClient.
Definition at line 156 of file RecorderImpl.cpp.
References OpenDDS::DCPS::TransportInst::is_reliable(), DDS::ReliabilityQosPolicy::kind, qos_, DDS::DataReaderQos::reliability, and DDS::RELIABLE_RELIABILITY_QOS.
DDS::ReturnCode_t OpenDDS::DCPS::RecorderImpl::cleanup | ( | void | ) |
cleanup the DataWriter.
Definition at line 91 of file RecorderImpl.cpp.
References ACE_ERROR, domain_id_, OpenDDS::DCPS::DomainParticipantImpl::get_id(), LM_NOTICE, OpenDDS::DCPS::log_level, OpenDDS::DCPS::LogLevel::Notice, participant_servant_, remove_all_associations(), DDS::RETCODE_ERROR, DDS::RETCODE_OK, OpenDDS::DCPS::WriterInfoListener::subscription_id_, and TheServiceParticipant.
Referenced by OpenDDS::DCPS::Service_Participant::delete_recorder(), and OpenDDS::DCPS::DomainParticipantImpl::handle_exception().
|
virtual |
Implements OpenDDS::DCPS::TransportReceiveListener.
Definition at line 175 of file RecorderImpl.cpp.
References ACE_DEBUG, ACE_GUARD, OpenDDS::DCPS::DataSampleHeader::byte_order_, OpenDDS::DCPS::DataSampleHeader::cdr_encapsulation_, check_encap_, OpenDDS::DCPS::ReceivedDataSample::data(), DBG_ENTRY_LVL, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::ReceivedDataSample::header_, OpenDDS::DCPS::RcHandle< T >::in(), OpenDDS::DCPS::Encoding::kind(), OpenDDS::DCPS::Encoding::KIND_UNALIGNED_CDR, listener_, LM_DEBUG, mb_alloc_, OpenDDS::DCPS::DataSampleHeader::message_id_, OpenDDS::DCPS::RecorderListener::on_sample_data_received(), OpenDDS::DCPS::DataSampleHeader::publication_id_, OpenDDS::DCPS::SAMPLE_DATA, sample_lock_, OpenDDS::DCPS::DataSampleHeader::source_timestamp_nanosec_, OpenDDS::DCPS::DataSampleHeader::source_timestamp_sec_, OpenDDS::DCPS::WriterInfoListener::subscription_id_, and OpenDDS::DCPS::to_string().
|
inlinevirtual |
DDS::ReturnCode_t OpenDDS::DCPS::RecorderImpl::enable | ( | ) |
Implements DDS::Entity.
Definition at line 870 of file RecorderImpl.cpp.
References ACE_DEBUG, ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::TransportClient::connection_info(), OpenDDS::DCPS::DCPS_debug_level, domain_id_, DDS::DataReaderQos::durability, OpenDDS::DCPS::TransportClient::enable_transport(), OpenDDS::DCPS::DomainParticipantImpl::get_id(), OpenDDS::DCPS::GUID_UNKNOWN, OpenDDS::DCPS::EntityImpl::is_enabled(), DDS::DurabilityQosPolicy::kind, DDS::ReliabilityQosPolicy::kind, LM_DEBUG, LM_WARNING, OpenDDS::DCPS::log_level, participant_servant_, qos_, OpenDDS::DCPS::rchandle_from(), DDS::DataReaderQos::reliability, DDS::RELIABLE_RELIABILITY_QOS, DDS::DataReaderQos::representation, DDS::RETCODE_ERROR, DDS::RETCODE_OK, OpenDDS::DCPS::EntityImpl::set_enabled(), OpenDDS::DCPS::set_reader_effective_data_rep_qos(), subqos_, OpenDDS::DCPS::WriterInfoListener::subscription_id_, TheServiceParticipant, topic_servant_, DDS::DataRepresentationQosPolicy::value, DDS::VOLATILE_DURABILITY_QOS, and OpenDDS::DCPS::LogLevel::Warning.
Referenced by OpenDDS::DCPS::DomainParticipantImpl::create_recorder().
|
privatevirtual |
Implements OpenDDS::DCPS::Recorder.
Definition at line 1002 of file RecorderImpl.cpp.
References ACE_ERROR, OpenDDS::DCPS::DataSampleHeader::byte_order_, OpenDDS::DCPS::LogGuid::c_str(), OpenDDS::XTypes::DynamicDataXcdrReadImpl::check_xcdr1_mutable(), dt_map_, OpenDDS::DCPS::RawDataSample::encoding_kind_, OpenDDS::DCPS::ENDIAN_BIG, OpenDDS::DCPS::ENDIAN_LITTLE, OpenDDS::DCPS::LogLevel::Error, OpenDDS::DCPS::unique_ptr< T, Deleter >::get(), OpenDDS::DCPS::RawDataSample::header_, LM_ERROR, LM_NOTICE, OpenDDS::DCPS::log_level, OpenDDS::DCPS::LogLevel::Notice, OPENDDS_END_VERSIONED_NAMESPACE_DECL, OpenDDS::DCPS::RawDataSample::publication_id_, and OpenDDS::DCPS::RawDataSample::sample_.
|
virtual |
Implements OpenDDS::DCPS::TransportClient.
Definition at line 164 of file RecorderImpl.cpp.
References OpenDDS::DCPS::WriterInfoListener::subscription_id_.
|
inlinevirtual |
Implements OpenDDS::DCPS::DataReaderCallbacks.
Definition at line 145 of file RecorderImpl.h.
|
virtual |
Implements OpenDDS::DCPS::EntityImpl.
Definition at line 950 of file RecorderImpl.cpp.
References OpenDDS::DCPS::EntityImpl::get_entity_instance_handle(), participant_servant_, OpenDDS::DCPS::rchandle_from(), and OpenDDS::DCPS::WriterInfoListener::subscription_id_.
|
virtual |
Get the listener for this Recorder.
Implements OpenDDS::DCPS::Recorder.
Definition at line 836 of file RecorderImpl.cpp.
References listener_.
|
virtual |
Implements OpenDDS::DCPS::TransportClient.
Definition at line 169 of file RecorderImpl.cpp.
References OpenDDS::DCPS::AssociationData::publication_transport_priority_.
|
virtual |
Get the Quality of Service settings for the Recorder.
Implements OpenDDS::DCPS::Recorder.
Definition at line 816 of file RecorderImpl.cpp.
References passed_qos_, DDS::RETCODE_OK, and subqos_.
void OpenDDS::DCPS::RecorderImpl::init | ( | TopicDescriptionImpl * | a_topic_desc, |
const DDS::DataReaderQos & | qos, | ||
RecorderListener_rch | a_listener, | ||
const DDS::StatusMask & | mask, | ||
DomainParticipantImpl * | participant, | ||
DDS::SubscriberQos | subqos | ||
) |
Definition at line 113 of file RecorderImpl.cpp.
References ACE_DEBUG, OpenDDS::DCPS::DCPS_debug_level, domain_id_, DDS::EXCLUSIVE_OWNERSHIP_QOS, OpenDDS::DCPS::DomainParticipantImpl::get_domain_id(), OpenDDS::DCPS::TopicDescriptionImpl::get_name(), is_exclusive_ownership_, DDS::OwnershipQosPolicy::kind, listener_, listener_mask_, LM_DEBUG, owner_manager_, DDS::DataReaderQos::ownership, OpenDDS::DCPS::DomainParticipantImpl::ownership_manager(), participant(), participant_servant_, passed_qos_, qos_, subqos_, topic_desc_, and topic_servant_.
Referenced by OpenDDS::DCPS::DomainParticipantImpl::create_recorder().
|
private |
Lookup the instance handles by the publication repo ids.
Definition at line 842 of file RecorderImpl.cpp.
References ACE_DEBUG, ACE_TEXT(), OpenDDS::DCPS::LogGuid::conv_, OpenDDS::DCPS::DCPS_debug_level, LM_DEBUG, OpenDDS::DCPS::DomainParticipantImpl::lookup_handle(), OPENDDS_STRING, and participant_servant_.
Referenced by remove_associations_i().
|
virtual |
Implements OpenDDS::DCPS::TransportReceiveListener.
Definition at line 215 of file RecorderImpl.cpp.
|
virtual |
Implements OpenDDS::DCPS::TransportReceiveListener.
Definition at line 228 of file RecorderImpl.cpp.
Referenced by remove_associations_i().
|
private |
Definition at line 224 of file RecorderImpl.cpp.
|
virtual |
Implements OpenDDS::DCPS::TransportReceiveListener.
Definition at line 219 of file RecorderImpl.cpp.
|
private |
|
private |
|
private |
publications writing to this reader.
|
inline |
Definition at line 129 of file RecorderImpl.h.
Referenced by OpenDDS::DCPS::Service_Participant::delete_recorder(), and init().
|
virtual |
Reimplemented from OpenDDS::DCPS::DataReaderCallbacks.
Definition at line 956 of file RecorderImpl.cpp.
References OpenDDS::DCPS::TransportClient::register_for_writer().
void OpenDDS::DCPS::RecorderImpl::remove_all_associations | ( | ) |
Definition at line 650 of file RecorderImpl.cpp.
References ACE_GUARD, ACE_READ_GUARD, DBG_ENTRY_LVL, publication_handle_lock_, remove_associations(), OpenDDS::DCPS::TransportClient::transport_stop(), writers_, and writers_lock_.
Referenced by cleanup().
|
virtual |
Implements OpenDDS::DCPS::DataReaderCallbacks.
Definition at line 483 of file RecorderImpl.cpp.
References ACE_DEBUG, ACE_TEXT(), DBG_ENTRY_LVL, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::EntityImpl::get_deleted(), is_bit_, LM_DEBUG, remove_associations_i(), OpenDDS::DCPS::TransportClient::stop_associating(), and OpenDDS::DCPS::WriterInfoListener::subscription_id_.
Referenced by remove_all_associations().
|
protectedvirtual |
Section 7.1.4.1: total_count will not decrement.
: Reconcile this with the verbiage in section 7.1.4.1
Definition at line 509 of file RecorderImpl.cpp.
References ACE_DEBUG, ACE_GUARD, ACE_TEXT(), ACE_WRITE_GUARD, DDS::SubscriptionMatchedStatus::current_count, DDS::SubscriptionMatchedStatus::current_count_change, DBG_ENTRY_LVL, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::TransportClient::disassociate(), dt_map_, id_to_handle_map_, OpenDDS::DCPS::RcHandle< T >::in(), is_bit_, DDS::SubscriptionMatchedStatus::last_publication_handle, listener_, LM_DEBUG, lookup_instance_handles(), notify_subscription_lost(), OpenDDS::DCPS::RecorderListener::on_recorder_matched(), participant_servant_, publication_handle_lock_, OpenDDS::DCPS::push_back(), OpenDDS::DCPS::DomainParticipantImpl::return_handle(), OpenDDS::DCPS::WriterInfoListener::subscription_id_, subscription_match_status_, DDS::SubscriptionMatchedStatus::total_count_change, writers_, and writers_lock_.
Referenced by remove_associations().
|
virtual |
Find the bit key for a given repo id.
Implements OpenDDS::DCPS::Recorder.
Definition at line 975 of file RecorderImpl.cpp.
References ACE_GUARD_RETURN, OpenDDS::DCPS::BUILT_IN_PUBLICATION_TOPIC, OpenDDS::DCPS::DomainParticipantImpl::lookup_handle(), participant_servant_, publication_handle_lock_, DDS::RETCODE_ERROR, and DDS::RETCODE_OK.
|
virtual |
Change the listener for this Recorder.
Implements OpenDDS::DCPS::Recorder.
Definition at line 826 of file RecorderImpl.cpp.
References listener_, listener_mask_, and DDS::RETCODE_OK.
|
virtual |
Set the Quality of Service settings for the Recorder.
Implements OpenDDS::DCPS::Recorder.
Definition at line 757 of file RecorderImpl.cpp.
References ACE_ERROR, OpenDDS::DCPS::Qos_Helper::changeable(), OpenDDS::DCPS::Qos_Helper::consistent(), domain_id_, OpenDDS::DCPS::EntityImpl::enabled_, OpenDDS::DCPS::DomainParticipantImpl::get_domain_id(), OpenDDS::DCPS::DomainParticipantImpl::get_id(), OpenDDS::DCPS::EntityImpl::is_enabled(), LM_NOTICE, OpenDDS::DCPS::log_level, OpenDDS::DCPS::LogLevel::Notice, OPENDDS_NO_DURABILITY_KIND_TRANSIENT_PERSISTENT_COMPATIBILITY_CHECK, OPENDDS_NO_OBJECT_MODEL_PROFILE_COMPATIBILITY_CHECK, OPENDDS_NO_OWNERSHIP_KIND_EXCLUSIVE_COMPATIBILITY_CHECK, OPENDDS_NO_OWNERSHIP_PROFILE_COMPATIBILITY_CHECK, participant_servant_, qos_, DDS::RETCODE_ERROR, DDS::RETCODE_IMMUTABLE_POLICY, DDS::RETCODE_INCONSISTENT_POLICY, DDS::RETCODE_OK, DDS::RETCODE_UNSUPPORTED, subqos_, OpenDDS::DCPS::WriterInfoListener::subscription_id_, TheServiceParticipant, and OpenDDS::DCPS::Qos_Helper::valid().
|
virtual |
Implements OpenDDS::DCPS::DataReaderCallbacks.
Definition at line 728 of file RecorderImpl.cpp.
References ACE_GUARD, ACE_READ_GUARD, OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::equal_guid_prefixes(), OpenDDS::DCPS::TimePoint_T< MonotonicClock >::now(), OpenDDS::DCPS::TransportClient::OPENDDS_VECTOR(), sample_lock_, writers_, and writers_lock_.
|
virtual |
Reimplemented from OpenDDS::DCPS::DataReaderCallbacks.
Definition at line 966 of file RecorderImpl.cpp.
References OpenDDS::DCPS::TransportClient::unregister_for_writer().
|
virtual |
Implements OpenDDS::DCPS::DataReaderCallbacks.
Definition at line 690 of file RecorderImpl.cpp.
References ACE_GUARD, OpenDDS::DCPS::IncompatibleQosStatus::count_since_last_send, OpenDDS::DCPS::IncompatibleQosStatus::last_policy_id, DDS::RequestedIncompatibleQosStatus::last_policy_id, OpenDDS::DCPS::IncompatibleQosStatus::policies, DDS::RequestedIncompatibleQosStatus::policies, publication_handle_lock_, requested_incompatible_qos_status_, OpenDDS::DCPS::IncompatibleQosStatus::total_count, DDS::RequestedIncompatibleQosStatus::total_count, and DDS::RequestedIncompatibleQosStatus::total_count_change.
|
friend |
Definition at line 181 of file RecorderImpl.h.
|
private |
Definition at line 212 of file RecorderImpl.h.
Referenced by data_received().
|
private |
|
private |
Definition at line 210 of file RecorderImpl.h.
Referenced by add_to_dynamic_type_map(), get_dynamic_data(), and remove_associations_i().
|
private |
Definition at line 191 of file RecorderImpl.h.
Referenced by add_association(), and remove_associations_i().
|
private |
Flag indicates that this datareader is a builtin topic datareader.
Definition at line 198 of file RecorderImpl.h.
Referenced by add_association(), remove_associations(), and remove_associations_i().
|
private |
Definition at line 174 of file RecorderImpl.h.
Referenced by init().
|
private |
Definition at line 185 of file RecorderImpl.h.
Referenced by add_association(), data_received(), get_listener(), init(), remove_associations_i(), and set_listener().
|
private |
Definition at line 184 of file RecorderImpl.h.
Referenced by init(), and set_listener().
|
private |
Definition at line 214 of file RecorderImpl.h.
Referenced by data_received().
|
private |
Definition at line 176 of file RecorderImpl.h.
Referenced by init().
|
private |
Definition at line 170 of file RecorderImpl.h.
Referenced by add_association(), add_to_dynamic_type_map(), cleanup(), enable(), get_instance_handle(), init(), lookup_instance_handles(), remove_associations_i(), repoid_to_bit_key(), and set_qos().
|
private |
Definition at line 165 of file RecorderImpl.h.
|
private |
Definition at line 188 of file RecorderImpl.h.
Referenced by add_association(), remove_all_associations(), remove_associations_i(), repoid_to_bit_key(), and update_incompatible_qos().
|
private |
Definition at line 164 of file RecorderImpl.h.
Referenced by check_transport_qos(), enable(), init(), and set_qos().
|
private |
Definition at line 193 of file RecorderImpl.h.
Referenced by RecorderImpl(), and update_incompatible_qos().
|
private |
lock protecting sample container as well as statuses.
Definition at line 168 of file RecorderImpl.h.
Referenced by add_association(), data_received(), and signal_liveliness().
|
private |
|
private |
Definition at line 194 of file RecorderImpl.h.
Referenced by add_association(), RecorderImpl(), and remove_associations_i().
|
private |
Definition at line 183 of file RecorderImpl.h.
Referenced by init().
|
private |
Definition at line 171 of file RecorderImpl.h.
|
private |
Definition at line 203 of file RecorderImpl.h.
Referenced by add_association(), remove_all_associations(), remove_associations_i(), and signal_liveliness().
|
private |
RW lock for reading/writing publications.
Definition at line 206 of file RecorderImpl.h.
Referenced by add_association(), remove_all_associations(), remove_associations_i(), and signal_liveliness().