#include <DataSampleElement.h>
Inheritance diagram for OpenDDS::DCPS::DataSampleElement:
Internally there are next/previous pointers that used for lists InstanceDataSampleList, SendStateDataSampleList, and WriterDataSampleList. These pointers are kept in this single element rather than having multiple smaller lists in order to allow us to allocate once which will minimize locking. Note that because the list pointers are stored within the element, the element can simultaneously be in at most one InstanceDataSampleList list, one SendStateDataSampleList list, and one WriterDataSampleList list.
Definition at line 55 of file DataSampleElement.h.
ACE_INLINE OpenDDS::DCPS::DataSampleElement::DataSampleElement | ( | PublicationId | publication_id, | |
TransportSendListener * | send_listener, | |||
PublicationInstance * | handle, | |||
TransportSendElementAllocator * | tse_allocator, | |||
TransportCustomizedElementAllocator * | tce_allocator | |||
) |
Definition at line 14 of file DataSampleElement.inl.
References OpenDDS::DCPS::GUID_UNKNOWN, OpenDDS::DCPS::MAX_READERS_PER_ELEM, and subscription_ids_.
00020 : transaction_id_(0), 00021 sample_(0), 00022 publication_id_(publication_id), 00023 num_subs_(0), 00024 send_listener_(send_listener), 00025 handle_(handle), 00026 transport_send_element_allocator_(tse_allocator), 00027 transport_customized_element_allocator_(tce_allocator), 00028 previous_writer_sample_(0), 00029 next_writer_sample_(0), 00030 next_instance_sample_(0), 00031 next_send_sample_(0), 00032 previous_send_sample_(0) 00033 00034 { 00035 std::fill(subscription_ids_, 00036 subscription_ids_ + OpenDDS::DCPS::MAX_READERS_PER_ELEM, 00037 GUID_UNKNOWN); 00038 }
ACE_INLINE OpenDDS::DCPS::DataSampleElement::DataSampleElement | ( | const DataSampleElement & | elem | ) |
Definition at line 41 of file DataSampleElement.inl.
References num_subs_, and subscription_ids_.
00042 : transaction_id_(elem.transaction_id_) 00043 , header_(elem.header_) 00044 , sample_(elem.sample_->duplicate()) 00045 , publication_id_(elem.publication_id_) 00046 , num_subs_(elem.num_subs_) 00047 , send_listener_(elem.send_listener_) 00048 , handle_(elem.handle_) 00049 , transport_send_element_allocator_( 00050 elem.transport_send_element_allocator_) 00051 , transport_customized_element_allocator_( 00052 elem.transport_customized_element_allocator_) 00053 , filter_out_(elem.filter_out_) 00054 , filter_per_link_(elem.filter_per_link_) 00055 , previous_writer_sample_(elem.previous_writer_sample_) 00056 , next_writer_sample_(elem.next_writer_sample_) 00057 , next_instance_sample_(elem.next_instance_sample_) 00058 , next_send_sample_(elem.next_send_sample_) 00059 , previous_send_sample_(elem.previous_send_sample_) 00060 00061 { 00062 std::copy(elem.subscription_ids_, 00063 elem.subscription_ids_ + num_subs_, 00064 subscription_ids_); 00065 }
ACE_INLINE OpenDDS::DCPS::DataSampleElement::~DataSampleElement | ( | ) |
ACE_INLINE DataSampleElement::DataLinkIdTypeGUIDMap & OpenDDS::DCPS::DataSampleElement::get_filter_per_link | ( | ) |
Definition at line 233 of file DataSampleElement.inl.
References filter_per_link_.
Referenced by OpenDDS::DCPS::DataLinkSet::send().
00234 { 00235 return filter_per_link_; 00236 }
ACE_INLINE PublicationInstance * OpenDDS::DCPS::DataSampleElement::get_handle | ( | ) | const |
Definition at line 212 of file DataSampleElement.inl.
References handle_.
00213 { 00214 return handle_; 00215 }
ACE_INLINE DataSampleHeader & OpenDDS::DCPS::DataSampleElement::get_header | ( | ) |
Definition at line 128 of file DataSampleElement.inl.
00129 { 00130 return const_cast<DataSampleHeader&>(static_cast<const DataSampleElement &>(*this).get_header()); 00131 }
ACE_INLINE const DataSampleHeader & OpenDDS::DCPS::DataSampleElement::get_header | ( | ) | const |
Definition at line 121 of file DataSampleElement.inl.
References header_.
Referenced by OpenDDS::DCPS::RtpsUdpDataLink::customize_queue_element(), OpenDDS::DCPS::WriteDataContainer::data_delivered(), OpenDDS::DCPS::WriteDataContainer::data_dropped(), OpenDDS::DCPS::DataWriterImpl::dispose(), OpenDDS::DCPS::DataWriterImpl::dispose_and_unregister(), OpenDDS::DCPS::DataWriterImpl::filter_out(), OpenDDS::DCPS::RtpsSampleHeader::populate_data_sample_submessages(), OpenDDS::DCPS::DataWriterImpl::register_instance_i(), OpenDDS::DCPS::WriteDataContainer::release_buffer(), OpenDDS::DCPS::resend_data_expired(), OpenDDS::DCPS::DataDurabilityCache::sample_data_type::sample_data_type(), OpenDDS::DCPS::TransportClient::send_i(), OpenDDS::DCPS::TransportSendElement::sequence(), OpenDDS::DCPS::DataWriterImpl::unregister_instance_i(), OpenDDS::DCPS::DataWriterImpl::write(), and OpenDDS::RTPS::Sedp::Writer::write_sample().
00122 { 00123 return header_; 00124 }
ACE_INLINE DataSampleElement * OpenDDS::DCPS::DataSampleElement::get_next_send_sample | ( | ) | const [private] |
Definition at line 107 of file DataSampleElement.inl.
References next_send_sample_.
Referenced by OpenDDS::DCPS::TransportClient::send_i().
00108 { 00109 return next_send_sample_; 00110 };
ACE_INLINE CORBA::ULong OpenDDS::DCPS::DataSampleElement::get_num_subs | ( | ) | const |
Definition at line 163 of file DataSampleElement.inl.
References num_subs_.
Referenced by OpenDDS::DCPS::RtpsSampleHeader::populate_data_sample_submessages(), and OpenDDS::DCPS::TransportClient::send_i().
00164 { 00165 return num_subs_; 00166 }
ACE_INLINE PublicationId OpenDDS::DCPS::DataSampleElement::get_pub_id | ( | ) | const |
Definition at line 156 of file DataSampleElement.inl.
References publication_id_.
Referenced by OpenDDS::DCPS::ReplayerImpl::data_delivered(), OpenDDS::DCPS::DataWriterImpl::data_delivered(), OpenDDS::DCPS::RtpsSampleHeader::populate_data_sample_submessages(), OpenDDS::DCPS::TransportSendElement::publication_id(), OpenDDS::DCPS::TransportSendStrategy::remove_sample(), and OpenDDS::DCPS::TransportClient::send_i().
00157 { 00158 return publication_id_; 00159 }
ACE_INLINE DataSample * OpenDDS::DCPS::DataSampleElement::get_sample | ( | ) |
Definition at line 142 of file DataSampleElement.inl.
References sample_.
00143 { 00144 return sample_; 00145 }
ACE_INLINE DataSample * OpenDDS::DCPS::DataSampleElement::get_sample | ( | ) | const |
Definition at line 135 of file DataSampleElement.inl.
References sample_.
Referenced by OpenDDS::DCPS::WriteDataContainer::data_delivered(), OpenDDS::DCPS::DataWriterImpl::filter_out(), OpenDDS::DCPS::TransportSendElement::msg(), OpenDDS::DCPS::TransportSendElement::msg_payload(), OpenDDS::DCPS::TransportSendStrategy::remove_sample(), OpenDDS::DCPS::ThreadPerConnectionSendTask::remove_sample(), OpenDDS::DCPS::DataDurabilityCache::sample_data_type::sample_data_type(), OpenDDS::DCPS::DataLinkSet::send(), and OpenDDS::RTPS::Sedp::Writer::write_sample().
00136 { 00137 return sample_; 00138 }
ACE_INLINE TransportSendListener * OpenDDS::DCPS::DataSampleElement::get_send_listener | ( | ) |
Definition at line 205 of file DataSampleElement.inl.
References send_listener_.
00206 { 00207 return send_listener_; 00208 }
ACE_INLINE TransportSendListener * OpenDDS::DCPS::DataSampleElement::get_send_listener | ( | ) | const |
Definition at line 198 of file DataSampleElement.inl.
References send_listener_.
Referenced by OpenDDS::DCPS::handle_message(), OpenDDS::DCPS::RtpsSampleHeader::populate_data_sample_submessages(), OpenDDS::DCPS::TransportSendElement::release_element(), and OpenDDS::DCPS::TransportClient::send_i().
00199 { 00200 return send_listener_; 00201 }
ACE_INLINE OpenDDS::DCPS::RepoId OpenDDS::DCPS::DataSampleElement::get_sub_id | ( | int | index | ) | const |
Definition at line 184 of file DataSampleElement.inl.
References subscription_ids_.
Referenced by OpenDDS::DCPS::RtpsSampleHeader::populate_data_sample_submessages().
00185 { 00186 return subscription_ids_[index]; 00187 }
ACE_INLINE const OpenDDS::DCPS::RepoId * OpenDDS::DCPS::DataSampleElement::get_sub_ids | ( | ) | const |
Definition at line 177 of file DataSampleElement.inl.
References subscription_ids_.
Referenced by OpenDDS::DCPS::TransportClient::send_i().
00178 { 00179 return subscription_ids_; 00180 }
ACE_INLINE TransportCustomizedElementAllocator * OpenDDS::DCPS::DataSampleElement::get_transport_customized_element_allocator | ( | ) | const |
Definition at line 226 of file DataSampleElement.inl.
References transport_customized_element_allocator_.
Referenced by OpenDDS::DCPS::DataLinkSet::send().
00227 { 00228 return transport_customized_element_allocator_; 00229 }
ACE_INLINE TransportSendElementAllocator * OpenDDS::DCPS::DataSampleElement::get_transport_send_element_allocator | ( | ) | const |
Definition at line 219 of file DataSampleElement.inl.
References transport_send_element_allocator_.
Referenced by OpenDDS::DCPS::TransportSendElement::alloc().
00220 { 00221 return transport_send_element_allocator_; 00222 }
typedef OpenDDS::DCPS::DataSampleElement::OPENDDS_MAP | ( | DataLinkIdType | , | |
GUIDSeq_var | ||||
) |
ACE_INLINE DataSampleElement & OpenDDS::DCPS::DataSampleElement::operator= | ( | const DataSampleElement & | elem | ) |
Definition at line 77 of file DataSampleElement.inl.
References filter_out_, filter_per_link_, handle_, header_, next_instance_sample_, next_send_sample_, next_writer_sample_, num_subs_, previous_send_sample_, previous_writer_sample_, publication_id_, sample_, send_listener_, subscription_ids_, transaction_id_, transport_customized_element_allocator_, and transport_send_element_allocator_.
00078 { 00079 transaction_id_ = rhs.transaction_id_; 00080 header_ = rhs.header_; 00081 sample_ = rhs.sample_->duplicate(); 00082 publication_id_ = rhs.publication_id_; 00083 num_subs_ = rhs.num_subs_; 00084 00085 std::copy(rhs.subscription_ids_, 00086 rhs.subscription_ids_ + num_subs_, 00087 subscription_ids_); 00088 00089 previous_writer_sample_ = rhs.previous_writer_sample_; 00090 next_writer_sample_ = rhs.next_writer_sample_; 00091 next_instance_sample_ = rhs.next_instance_sample_; 00092 next_send_sample_ = rhs.next_send_sample_; 00093 previous_send_sample_ = rhs.previous_send_sample_; 00094 send_listener_ = rhs.send_listener_; 00095 handle_ = rhs.handle_; 00096 transport_send_element_allocator_ = rhs.transport_send_element_allocator_; 00097 transport_customized_element_allocator_ = 00098 rhs.transport_customized_element_allocator_; 00099 filter_out_ = rhs.filter_out_; 00100 filter_per_link_ = rhs.filter_per_link_; 00101 00102 return *this; 00103 }
ACE_INLINE void OpenDDS::DCPS::DataSampleElement::set_filter_out | ( | GUIDSeq * | filter_out | ) |
Definition at line 240 of file DataSampleElement.inl.
References filter_out_.
Referenced by OpenDDS::DCPS::DataWriterImpl::write().
00241 { 00242 filter_out_ = filter_out; 00243 }
ACE_INLINE void OpenDDS::DCPS::DataSampleElement::set_next_send_sample | ( | DataSampleElement * | next_send_sample | ) | [private] |
Definition at line 114 of file DataSampleElement.inl.
References next_send_sample_.
00115 { 00116 this->next_send_sample_ = next_send_sample; 00117 };
ACE_INLINE void OpenDDS::DCPS::DataSampleElement::set_num_subs | ( | int | num_subs | ) |
Definition at line 170 of file DataSampleElement.inl.
References num_subs_.
Referenced by OpenDDS::DCPS::WriteDataContainer::copy_and_append(), and OpenDDS::RTPS::Sedp::Writer::write_sample().
00171 { 00172 this->num_subs_ = num_subs; 00173 }
ACE_INLINE void OpenDDS::DCPS::DataSampleElement::set_sample | ( | DataSample * | sample | ) |
Definition at line 149 of file DataSampleElement.inl.
References sample_.
Referenced by OpenDDS::DCPS::DataWriterImpl::dispose(), OpenDDS::DCPS::DataWriterImpl::dispose_and_unregister(), OpenDDS::DCPS::DataWriterImpl::register_instance_i(), OpenDDS::DCPS::DataWriterImpl::unregister_instance_i(), OpenDDS::DCPS::DataWriterImpl::write(), and OpenDDS::RTPS::Sedp::Writer::write_sample().
00150 { 00151 this->sample_ = sample; 00152 }
ACE_INLINE void OpenDDS::DCPS::DataSampleElement::set_sub_id | ( | int | index, | |
OpenDDS::DCPS::RepoId | id | |||
) |
Definition at line 191 of file DataSampleElement.inl.
References subscription_ids_.
Referenced by OpenDDS::DCPS::WriteDataContainer::copy_and_append(), and OpenDDS::RTPS::Sedp::Writer::write_sample().
00192 { 00193 this->subscription_ids_[index] = id; 00194 }
ACE_INLINE void OpenDDS::DCPS::DataSampleElement::set_transaction_id | ( | ACE_UINT64 | transaction_id | ) |
Definition at line 247 of file DataSampleElement.inl.
References transaction_id_.
00248 { 00249 transaction_id_ = transaction_id; 00250 }
ACE_INLINE ACE_UINT64 OpenDDS::DCPS::DataSampleElement::transaction_id | ( | ) | const |
Definition at line 254 of file DataSampleElement.inl.
References transaction_id_.
Referenced by OpenDDS::DCPS::TransportClient::send_i().
00255 { 00256 return transaction_id_; 00257 }
friend class ::DDS_TEST [friend] |
Definition at line 157 of file DataSampleElement.h.
friend class InstanceDataSampleList [friend] |
Definition at line 155 of file DataSampleElement.h.
friend class SendStateDataSampleList [friend] |
*DataSampleList(s) is in charge of managing list placement therefore needs access to pointers
Definition at line 153 of file DataSampleElement.h.
friend class SendStateDataSampleListConstIterator [friend] |
Definition at line 160 of file DataSampleElement.h.
friend class SendStateDataSampleListIterator [friend] |
Iterators needs access to prev/next pointers for iteration.
Definition at line 159 of file DataSampleElement.h.
friend class TransportClient [friend] |
Definition at line 156 of file DataSampleElement.h.
friend class WriterDataSampleList [friend] |
Definition at line 154 of file DataSampleElement.h.
GUIDSeq_var OpenDDS::DCPS::DataSampleElement::filter_out_ [private] |
tracking for Content-Filtering data
Definition at line 143 of file DataSampleElement.h.
Referenced by operator=(), OpenDDS::DCPS::TransportClient::send_i(), and set_filter_out().
DataLinkIdTypeGUIDMap OpenDDS::DCPS::DataSampleElement::filter_per_link_ [private] |
Definition at line 144 of file DataSampleElement.h.
Referenced by get_filter_per_link(), operator=(), and OpenDDS::DCPS::TransportClient::send_i().
The pointer to the object that contains the instance information and data sample list. The client holds this as an InstanceHandle_t.
Definition at line 133 of file DataSampleElement.h.
Referenced by get_handle(), and operator=().
The OpenDDS DCPS header for this sample.
Definition at line 112 of file DataSampleElement.h.
Referenced by get_header(), and operator=().
DataSampleElement* OpenDDS::DCPS::DataSampleElement::next_instance_sample_ [mutable, private] |
Thread of data within the instance.
Definition at line 171 of file DataSampleElement.h.
Referenced by OpenDDS::DCPS::InstanceDataSampleList::dequeue(), OpenDDS::DCPS::InstanceDataSampleList::dequeue_head(), OpenDDS::DCPS::InstanceDataSampleList::enqueue_tail(), and operator=().
DataSampleElement* OpenDDS::DCPS::DataSampleElement::next_send_sample_ [mutable, private] |
Thread of data being unsent/sending/sent/released.
Definition at line 174 of file DataSampleElement.h.
Referenced by OpenDDS::DCPS::SendStateDataSampleList::dequeue(), OpenDDS::DCPS::SendStateDataSampleList::dequeue_head(), OpenDDS::DCPS::SendStateDataSampleList::enqueue_tail(), get_next_send_sample(), OpenDDS::DCPS::SendStateDataSampleListConstIterator::operator++(), OpenDDS::DCPS::SendStateDataSampleListIterator::operator++(), operator=(), and set_next_send_sample().
DataSampleElement* OpenDDS::DCPS::DataSampleElement::next_writer_sample_ [mutable, private] |
Definition at line 168 of file DataSampleElement.h.
Referenced by OpenDDS::DCPS::WriterDataSampleList::dequeue(), OpenDDS::DCPS::WriterDataSampleList::dequeue_head(), OpenDDS::DCPS::WriterDataSampleList::enqueue_tail(), and operator=().
CORBA::ULong OpenDDS::DCPS::DataSampleElement::num_subs_ [private] |
Definition at line 121 of file DataSampleElement.h.
Referenced by DataSampleElement(), get_num_subs(), operator=(), and set_num_subs().
DataSampleElement* OpenDDS::DCPS::DataSampleElement::previous_send_sample_ [mutable, private] |
Definition at line 175 of file DataSampleElement.h.
Referenced by OpenDDS::DCPS::SendStateDataSampleList::dequeue(), OpenDDS::DCPS::SendStateDataSampleList::dequeue_head(), OpenDDS::DCPS::SendStateDataSampleList::enqueue_tail(), OpenDDS::DCPS::SendStateDataSampleListConstIterator::operator--(), OpenDDS::DCPS::SendStateDataSampleListIterator::operator--(), operator=(), and OpenDDS::DCPS::SendStateDataSampleList::send_list_containing_element().
DataSampleElement* OpenDDS::DCPS::DataSampleElement::previous_writer_sample_ [mutable, private] |
Thread of all data within a DataWriter.
Used to make removal from the container _much_ more efficient.
Definition at line 167 of file DataSampleElement.h.
Referenced by OpenDDS::DCPS::WriterDataSampleList::dequeue(), OpenDDS::DCPS::WriterDataSampleList::dequeue_head(), OpenDDS::DCPS::WriterDataSampleList::enqueue_tail(), and operator=().
Publication Id used downstream.
Definition at line 119 of file DataSampleElement.h.
Referenced by get_pub_id(), and operator=().
Message being sent which includes the DataSampleHeader message block and DataSample message block.
Definition at line 116 of file DataSampleElement.h.
Referenced by get_sample(), operator=(), set_sample(), and ~DataSampleElement().
Pointer to object that will be informed when the data has been delivered. This needs to be set prior to using the TransportClient to send().
Definition at line 128 of file DataSampleElement.h.
Referenced by get_send_listener(), and operator=().
OpenDDS::DCPS::RepoId OpenDDS::DCPS::DataSampleElement::subscription_ids_[OpenDDS::DCPS::MAX_READERS_PER_ELEM] [private] |
Definition at line 123 of file DataSampleElement.h.
Referenced by DataSampleElement(), get_sub_id(), get_sub_ids(), operator=(), and set_sub_id().
ACE_UINT64 OpenDDS::DCPS::DataSampleElement::transaction_id_ [private] |
Definition at line 109 of file DataSampleElement.h.
Referenced by operator=(), set_transaction_id(), and transaction_id().
TransportCustomizedElementAllocator* OpenDDS::DCPS::DataSampleElement::transport_customized_element_allocator_ [private] |
Allocator for TransportCustomizedElement.
Definition at line 139 of file DataSampleElement.h.
Referenced by get_transport_customized_element_allocator(), and operator=().
TransportSendElementAllocator* OpenDDS::DCPS::DataSampleElement::transport_send_element_allocator_ [private] |
Allocator for the TransportSendElement.
Definition at line 136 of file DataSampleElement.h.
Referenced by get_transport_send_element_allocator(), and operator=().