#include <TransportCustomizedElement.h>
Public Member Functions | |
TransportCustomizedElement (TransportQueueElement *orig, bool fragment) | |
virtual RepoId | publication_id () const |
Accessor for the publication id that sent the sample. | |
void | set_publication_id (const RepoId &id) |
virtual const ACE_Message_Block * | msg () const |
The marshalled sample (sample header + sample data). | |
void | set_msg (Message_Block_Ptr m) |
virtual const ACE_Message_Block * | msg_payload () const |
The marshalled payload only (sample data). | |
virtual SequenceNumber | sequence () const |
virtual bool | owned_by_transport () |
Is the sample created by the transport? | |
virtual bool | is_fragment () const |
Is this QueueElement the result of fragmentation? | |
const TransportSendElement * | original_send_element () const |
Protected Member Functions | |
virtual void | release_element (bool dropped_by_transport) |
Invoked when the counter reaches 0. | |
virtual bool | requires_exclusive_packet () const |
Does the sample require an exclusive transport packet? | |
void | set_requires_exclusive () |
void | set_fragment () |
virtual | ~TransportCustomizedElement () |
Private Member Functions | |
RepoId | subscription_id () const |
Accessor for the subscription id, if sent the sample is sent to 1 sub. | |
Private Attributes | |
TransportQueueElement * | orig_ |
Message_Block_Ptr | msg_ |
RepoId | publication_id_ |
bool | fragment_ |
bool | exclusive_ |
Definition at line 22 of file TransportCustomizedElement.h.
ACE_INLINE OpenDDS::DCPS::TransportCustomizedElement::TransportCustomizedElement | ( | TransportQueueElement * | orig, | |
bool | fragment | |||
) |
Definition at line 16 of file TransportCustomizedElement.inl.
References DBG_ENTRY_LVL.
00018 : TransportQueueElement(1), 00019 orig_(orig), 00020 publication_id_(orig ? orig->publication_id() : GUID_UNKNOWN), 00021 fragment_(fragment), 00022 exclusive_(false) 00023 { 00024 DBG_ENTRY_LVL("TransportCustomizedElement", "TransportCustomizedElement", 6); 00025 }
OpenDDS::DCPS::TransportCustomizedElement::~TransportCustomizedElement | ( | ) | [protected, virtual] |
Definition at line 22 of file TransportCustomizedElement.cpp.
References DBG_ENTRY_LVL.
00023 { 00024 DBG_ENTRY_LVL("TransportCustomizedElement", "~TransportCustomizedElement", 6); 00025 }
virtual bool OpenDDS::DCPS::TransportCustomizedElement::is_fragment | ( | ) | const [inline, virtual] |
Is this QueueElement the result of fragmentation?
Reimplemented from OpenDDS::DCPS::TransportQueueElement.
Definition at line 41 of file TransportCustomizedElement.h.
00041 { return fragment_; }
const ACE_Message_Block * OpenDDS::DCPS::TransportCustomizedElement::msg | ( | ) | const [virtual] |
The marshalled sample (sample header + sample data).
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 66 of file TransportCustomizedElement.cpp.
References DBG_ENTRY_LVL, OpenDDS::DCPS::unique_ptr< T, Deleter >::get(), and msg_.
Referenced by OpenDDS::DCPS::RtpsCustomizedElement::fragment(), and OpenDDS::DCPS::RtpsCustomizedElement::msg_payload().
00067 { 00068 DBG_ENTRY_LVL("TransportCustomizedElement", "msg", 6); 00069 return msg_.get(); 00070 }
const ACE_Message_Block * OpenDDS::DCPS::TransportCustomizedElement::msg_payload | ( | ) | const [virtual] |
The marshalled payload only (sample data).
Implements OpenDDS::DCPS::TransportQueueElement.
Reimplemented in OpenDDS::DCPS::RtpsCustomizedElement.
Definition at line 80 of file TransportCustomizedElement.cpp.
References DBG_ENTRY_LVL, OpenDDS::DCPS::TransportQueueElement::msg_payload(), and orig_.
00081 { 00082 DBG_ENTRY_LVL("TransportCustomizedElement", "msg_payload", 6); 00083 return orig_ ? orig_->msg_payload() : 0; 00084 }
const TransportSendElement * OpenDDS::DCPS::TransportCustomizedElement::original_send_element | ( | ) | const |
Definition at line 87 of file TransportCustomizedElement.cpp.
References orig_, and original_send_element().
Referenced by OpenDDS::DCPS::RtpsUdpDataLink::customize_queue_element(), original_send_element(), and subscription_id().
00088 { 00089 const TransportSendElement* ose = 00090 dynamic_cast<const TransportSendElement*>(orig_); 00091 if (!ose) { 00092 const TransportCustomizedElement* tce = 00093 dynamic_cast<const TransportCustomizedElement*>(orig_); 00094 return tce ? tce->original_send_element() : 0; 00095 } 00096 return ose; 00097 }
virtual bool OpenDDS::DCPS::TransportCustomizedElement::owned_by_transport | ( | ) | [inline, virtual] |
Is the sample created by the transport?
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 39 of file TransportCustomizedElement.h.
RepoId OpenDDS::DCPS::TransportCustomizedElement::publication_id | ( | ) | const [virtual] |
Accessor for the publication id that sent the sample.
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 44 of file TransportCustomizedElement.cpp.
References DBG_ENTRY_LVL, and publication_id_.
Referenced by OpenDDS::DCPS::RtpsCustomizedElement::fragment().
00045 { 00046 DBG_ENTRY_LVL("TransportCustomizedElement", "publication_id", 6); 00047 return publication_id_; 00048 }
void OpenDDS::DCPS::TransportCustomizedElement::release_element | ( | bool | dropped_by_transport | ) | [protected, virtual] |
Invoked when the counter reaches 0.
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 28 of file TransportCustomizedElement.cpp.
References DBG_ENTRY_LVL, OpenDDS::DCPS::TransportQueueElement::decision_made(), and orig_.
00029 { 00030 DBG_ENTRY_LVL("TransportCustomizedElement", "release_element", 6); 00031 TransportQueueElement* decided = 0; 00032 if (orig_) { 00033 decided = orig_; 00034 } 00035 00036 delete this; 00037 00038 if (decided) { 00039 decided->decision_made(dropped_by_transport); 00040 } 00041 }
virtual bool OpenDDS::DCPS::TransportCustomizedElement::requires_exclusive_packet | ( | ) | const [inline, protected, virtual] |
Does the sample require an exclusive transport packet?
Reimplemented from OpenDDS::DCPS::TransportQueueElement.
Definition at line 48 of file TransportCustomizedElement.h.
00048 { return exclusive_; }
ACE_INLINE SequenceNumber OpenDDS::DCPS::TransportCustomizedElement::sequence | ( | ) | const [virtual] |
Reimplemented from OpenDDS::DCPS::TransportQueueElement.
Reimplemented in OpenDDS::DCPS::RtpsCustomizedElement.
Definition at line 30 of file TransportCustomizedElement.inl.
References orig_, OpenDDS::DCPS::TransportQueueElement::sequence(), and OpenDDS::RTPS::SEQUENCENUMBER_UNKNOWN.
00031 { 00032 return this->orig_ ? this->orig_->sequence() 00033 : SequenceNumber::SEQUENCENUMBER_UNKNOWN(); 00034 }
void OpenDDS::DCPS::TransportCustomizedElement::set_fragment | ( | ) | [inline, protected] |
Definition at line 51 of file TransportCustomizedElement.h.
Referenced by OpenDDS::DCPS::RtpsCustomizedElement::fragment().
00051 { fragment_ = true; }
void OpenDDS::DCPS::TransportCustomizedElement::set_msg | ( | Message_Block_Ptr | m | ) |
Definition at line 73 of file TransportCustomizedElement.cpp.
References DBG_ENTRY_LVL, msg_, OpenDDS::DCPS::unique_ptr< T, Deleter >::release(), and OpenDDS::DCPS::unique_ptr< T, Deleter >::reset().
Referenced by OpenDDS::DCPS::TransportQueueElement::fragment(), and OpenDDS::DCPS::RtpsCustomizedElement::RtpsCustomizedElement().
00074 { 00075 DBG_ENTRY_LVL("TransportCustomizedElement", "set_msg", 6); 00076 msg_.reset(m.release()); 00077 }
void OpenDDS::DCPS::TransportCustomizedElement::set_publication_id | ( | const RepoId & | id | ) |
Definition at line 59 of file TransportCustomizedElement.cpp.
References DBG_ENTRY_LVL, and publication_id_.
Referenced by OpenDDS::DCPS::TransportQueueElement::fragment(), and OpenDDS::DCPS::RtpsCustomizedElement::fragment().
00060 { 00061 DBG_ENTRY_LVL("TransportCustomizedElement", "set_msg", 6); 00062 publication_id_ = id; 00063 }
void OpenDDS::DCPS::TransportCustomizedElement::set_requires_exclusive | ( | ) | [inline, protected] |
Definition at line 49 of file TransportCustomizedElement.h.
Referenced by OpenDDS::DCPS::RtpsCustomizedElement::RtpsCustomizedElement().
00049 { exclusive_ = true; }
RepoId OpenDDS::DCPS::TransportCustomizedElement::subscription_id | ( | ) | const [private, virtual] |
Accessor for the subscription id, if sent the sample is sent to 1 sub.
Reimplemented from OpenDDS::DCPS::TransportQueueElement.
Definition at line 51 of file TransportCustomizedElement.cpp.
References DBG_ENTRY_LVL, OpenDDS::DCPS::GUID_UNKNOWN, original_send_element(), and OpenDDS::DCPS::TransportSendElement::subscription_id().
00052 { 00053 DBG_ENTRY_LVL("TransportCustomizedElement", "subscription_id", 6); 00054 const TransportSendElement* ose = original_send_element(); 00055 return ose ? ose->subscription_id() : GUID_UNKNOWN; 00056 }
bool OpenDDS::DCPS::TransportCustomizedElement::exclusive_ [private] |
Definition at line 63 of file TransportCustomizedElement.h.
bool OpenDDS::DCPS::TransportCustomizedElement::fragment_ [private] |
Definition at line 63 of file TransportCustomizedElement.h.
Definition at line 61 of file TransportCustomizedElement.h.
Definition at line 60 of file TransportCustomizedElement.h.
Referenced by msg_payload(), original_send_element(), release_element(), and sequence().
Definition at line 62 of file TransportCustomizedElement.h.
Referenced by publication_id(), and set_publication_id().