#include <TransportCustomizedElement.h>
Inheritance diagram for OpenDDS::DCPS::TransportCustomizedElement:
Public Member Functions | |
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 (ACE_Message_Block *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 |
Static Public Member Functions | |
static TransportCustomizedElement * | alloc (TransportQueueElement *orig, bool fragment=false, ACE_Allocator *allocator=0) |
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 () |
TransportCustomizedElement (TransportQueueElement *orig, bool fragment, ACE_Allocator *allocator) | |
virtual | ~TransportCustomizedElement () |
ACE_Allocator * | allocator () |
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_ |
ACE_Message_Block * | msg_ |
ACE_Allocator * | allocator_ |
RepoId | publication_id_ |
bool | fragment_ |
bool | exclusive_ |
Definition at line 19 of file TransportCustomizedElement.h.
ACE_INLINE OpenDDS::DCPS::TransportCustomizedElement::TransportCustomizedElement | ( | TransportQueueElement * | orig, | |
bool | fragment, | |||
ACE_Allocator * | allocator | |||
) | [protected] |
Definition at line 14 of file TransportCustomizedElement.inl.
References DBG_ENTRY_LVL.
Referenced by alloc().
00016 : TransportQueueElement(1), 00017 orig_(orig), 00018 msg_(0), 00019 allocator_(allocator), 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 20 of file TransportCustomizedElement.cpp.
References DBG_ENTRY_LVL, and msg_.
00021 { 00022 DBG_ENTRY_LVL("TransportCustomizedElement", "~TransportCustomizedElement", 6); 00023 if (msg_) { 00024 msg_->release(); 00025 } 00026 }
ACE_INLINE TransportCustomizedElement * OpenDDS::DCPS::TransportCustomizedElement::alloc | ( | TransportQueueElement * | orig, | |
bool | fragment = false , |
|||
ACE_Allocator * | allocator = 0 | |||
) | [static] |
Definition at line 29 of file TransportCustomizedElement.inl.
References allocator(), and TransportCustomizedElement().
Referenced by OpenDDS::DCPS::TransportQueueElement::fragment(), and OpenDDS::DCPS::DataLinkSet::send().
00032 { 00033 if (allocator) { 00034 TransportCustomizedElement* ret; 00035 ACE_NEW_MALLOC_RETURN(ret, 00036 static_cast<TransportCustomizedElement*>(allocator->malloc(0)), 00037 TransportCustomizedElement(orig, fragment, allocator), 00038 0); 00039 return ret; 00040 } else { 00041 return new TransportCustomizedElement(orig, fragment, 0); 00042 } 00043 }
ACE_Allocator* OpenDDS::DCPS::TransportCustomizedElement::allocator | ( | ) | [inline, protected] |
Definition at line 56 of file TransportCustomizedElement.h.
References allocator_.
Referenced by alloc(), OpenDDS::DCPS::RtpsCustomizedElement::alloc(), and OpenDDS::DCPS::RtpsCustomizedElement::fragment().
00056 { return allocator_; }
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 39 of file TransportCustomizedElement.h.
00039 { 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 70 of file TransportCustomizedElement.cpp.
References DBG_ENTRY_LVL, and msg_.
Referenced by OpenDDS::DCPS::RtpsCustomizedElement::fragment(), and OpenDDS::DCPS::RtpsCustomizedElement::msg_payload().
00071 { 00072 DBG_ENTRY_LVL("TransportCustomizedElement", "msg", 6); 00073 return msg_; 00074 }
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 84 of file TransportCustomizedElement.cpp.
References DBG_ENTRY_LVL, OpenDDS::DCPS::TransportQueueElement::msg_payload(), and orig_.
00085 { 00086 DBG_ENTRY_LVL("TransportCustomizedElement", "msg_payload", 6); 00087 return orig_ ? orig_->msg_payload() : 0; 00088 }
const TransportSendElement * OpenDDS::DCPS::TransportCustomizedElement::original_send_element | ( | ) | const |
Definition at line 91 of file TransportCustomizedElement.cpp.
References orig_, and original_send_element().
Referenced by original_send_element(), and subscription_id().
00092 { 00093 const TransportSendElement* ose = 00094 dynamic_cast<const TransportSendElement*>(orig_); 00095 if (!ose) { 00096 const TransportCustomizedElement* tce = 00097 dynamic_cast<const TransportCustomizedElement*>(orig_); 00098 return tce ? tce->original_send_element() : 0; 00099 } 00100 return ose; 00101 }
virtual bool OpenDDS::DCPS::TransportCustomizedElement::owned_by_transport | ( | ) | [inline, virtual] |
Is the sample created by the transport?
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 37 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 48 of file TransportCustomizedElement.cpp.
References DBG_ENTRY_LVL, and publication_id_.
Referenced by OpenDDS::DCPS::RtpsCustomizedElement::fragment().
00049 { 00050 DBG_ENTRY_LVL("TransportCustomizedElement", "publication_id", 6); 00051 return publication_id_; 00052 }
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 29 of file TransportCustomizedElement.cpp.
References allocator_, DBG_ENTRY_LVL, OpenDDS::DCPS::TransportQueueElement::decision_made(), and orig_.
00030 { 00031 DBG_ENTRY_LVL("TransportCustomizedElement", "release_element", 6); 00032 TransportQueueElement* decided = 0; 00033 if (orig_) { 00034 decided = orig_; 00035 } 00036 00037 if (allocator_) { 00038 ACE_DES_FREE(this, allocator_->free, TransportCustomizedElement); 00039 } else { 00040 delete this; 00041 } 00042 if (decided) { 00043 decided->decision_made(dropped_by_transport); 00044 } 00045 }
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 46 of file TransportCustomizedElement.h.
00046 { return exclusive_; }
ACE_INLINE SequenceNumber OpenDDS::DCPS::TransportCustomizedElement::sequence | ( | ) | const [virtual] |
Reimplemented from OpenDDS::DCPS::TransportQueueElement.
Reimplemented in OpenDDS::DCPS::RtpsCustomizedElement.
Definition at line 47 of file TransportCustomizedElement.inl.
References orig_, OpenDDS::DCPS::TransportQueueElement::sequence(), and OpenDDS::RTPS::SEQUENCENUMBER_UNKNOWN.
Referenced by OpenDDS::DCPS::RtpsCustomizedElement::sequence().
00048 { 00049 return this->orig_ ? this->orig_->sequence() 00050 : SequenceNumber::SEQUENCENUMBER_UNKNOWN(); 00051 }
void OpenDDS::DCPS::TransportCustomizedElement::set_fragment | ( | ) | [inline, protected] |
Definition at line 49 of file TransportCustomizedElement.h.
Referenced by OpenDDS::DCPS::RtpsCustomizedElement::fragment().
00049 { fragment_ = true; }
void OpenDDS::DCPS::TransportCustomizedElement::set_msg | ( | ACE_Message_Block * | m | ) |
Definition at line 77 of file TransportCustomizedElement.cpp.
References DBG_ENTRY_LVL, and msg_.
Referenced by OpenDDS::DCPS::TransportQueueElement::fragment(), OpenDDS::DCPS::RtpsCustomizedElement::RtpsCustomizedElement(), and OpenDDS::DCPS::DataLinkSet::send().
00078 { 00079 DBG_ENTRY_LVL("TransportCustomizedElement", "set_msg", 6); 00080 msg_ = m; 00081 }
void OpenDDS::DCPS::TransportCustomizedElement::set_publication_id | ( | const RepoId & | id | ) |
Definition at line 63 of file TransportCustomizedElement.cpp.
References DBG_ENTRY_LVL, and publication_id_.
Referenced by OpenDDS::DCPS::TransportQueueElement::fragment(), and OpenDDS::DCPS::RtpsCustomizedElement::fragment().
00064 { 00065 DBG_ENTRY_LVL("TransportCustomizedElement", "set_msg", 6); 00066 publication_id_ = id; 00067 }
void OpenDDS::DCPS::TransportCustomizedElement::set_requires_exclusive | ( | ) | [inline, protected] |
Definition at line 47 of file TransportCustomizedElement.h.
Referenced by OpenDDS::DCPS::RtpsCustomizedElement::RtpsCustomizedElement().
00047 { 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 55 of file TransportCustomizedElement.cpp.
References DBG_ENTRY_LVL, OpenDDS::DCPS::GUID_UNKNOWN, original_send_element(), and OpenDDS::DCPS::TransportSendElement::subscription_id().
00056 { 00057 DBG_ENTRY_LVL("TransportCustomizedElement", "subscription_id", 6); 00058 const TransportSendElement* ose = original_send_element(); 00059 return ose ? ose->subscription_id() : GUID_UNKNOWN; 00060 }
bool OpenDDS::DCPS::TransportCustomizedElement::exclusive_ [private] |
Definition at line 65 of file TransportCustomizedElement.h.
bool OpenDDS::DCPS::TransportCustomizedElement::fragment_ [private] |
Definition at line 65 of file TransportCustomizedElement.h.
ACE_Message_Block* OpenDDS::DCPS::TransportCustomizedElement::msg_ [private] |
Definition at line 62 of file TransportCustomizedElement.h.
Referenced by msg(), set_msg(), and ~TransportCustomizedElement().
Definition at line 61 of file TransportCustomizedElement.h.
Referenced by msg_payload(), original_send_element(), release_element(), and sequence().
Definition at line 64 of file TransportCustomizedElement.h.
Referenced by publication_id(), and set_publication_id().