#include <TransportControlElement.h>
Inheritance diagram for OpenDDS::DCPS::TransportControlElement:
Public Member Functions | |
TransportControlElement (const ACE_Message_Block *msg_block, const RepoId &pub_id=GUID_UNKNOWN, bool owner=true) | |
virtual | ~TransportControlElement () |
virtual bool | owned_by_transport () |
Is the sample created by the transport? | |
Protected Member Functions | |
virtual bool | requires_exclusive_packet () const |
Does the sample require an exclusive transport packet? | |
virtual RepoId | publication_id () const |
Accessor for the publication id that sent the sample. | |
virtual const ACE_Message_Block * | msg () const |
The marshalled sample (sample header + sample data). | |
virtual const ACE_Message_Block * | msg_payload () const |
The marshalled payload only (sample data). | |
virtual void | release_element (bool dropped_by_transport) |
Invoked when the counter reaches 0. | |
virtual void | data_delivered () |
Private Attributes | |
ACE_Message_Block * | msg_ |
The control message. | |
bool | owner_ |
Ownership flag. |
Definition at line 23 of file TransportControlElement.h.
OpenDDS::DCPS::TransportControlElement::TransportControlElement | ( | const ACE_Message_Block * | msg_block, | |
const RepoId & | pub_id = GUID_UNKNOWN , |
|||
bool | owner = true | |||
) |
msg_block - chain of ACE_Message_Blocks containing the control sample held by this queue element, if any. pub_id - publication Id value of the originating publication, if any. owner - indicates that this element has been obtained from the heap and can be discarded to it. If an object of this type is created on the stack, this *must* be set to false.
Definition at line 16 of file TransportControlElement.cpp.
References DBG_ENTRY_LVL.
00020 : TransportQueueElement(1), 00021 msg_( ACE_Message_Block::duplicate(msg_block)), 00022 owner_( owner) 00023 { 00024 DBG_ENTRY_LVL("TransportControlElement","TransportControlElement",6); 00025 }
OpenDDS::DCPS::TransportControlElement::~TransportControlElement | ( | ) | [virtual] |
Definition at line 27 of file TransportControlElement.cpp.
References DBG_ENTRY_LVL.
00028 { 00029 DBG_ENTRY_LVL("TransportControlElement","~TransportControlElement",6); 00030 }
ACE_INLINE void OpenDDS::DCPS::TransportControlElement::data_delivered | ( | ) | [protected, virtual] |
Invoked when the sample has been sent by a DataLink. The return value indicates if this element is released.
Reimplemented from OpenDDS::DCPS::TransportQueueElement.
Definition at line 20 of file TransportControlElement.inl.
References DBG_ENTRY_LVL.
00021 { 00022 DBG_ENTRY_LVL("TransportControlElement","data_delivered",6); 00023 }
ACE_INLINE const ACE_Message_Block * OpenDDS::DCPS::TransportControlElement::msg | ( | ) | const [protected, virtual] |
The marshalled sample (sample header + sample data).
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 34 of file TransportControlElement.inl.
References msg_.
00035 { 00036 return this->msg_; 00037 }
ACE_INLINE const ACE_Message_Block * OpenDDS::DCPS::TransportControlElement::msg_payload | ( | ) | const [protected, virtual] |
The marshalled payload only (sample data).
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 41 of file TransportControlElement.inl.
References msg_.
00042 { 00043 return this->msg_->cont(); 00044 }
ACE_INLINE bool OpenDDS::DCPS::TransportControlElement::owned_by_transport | ( | ) | [virtual] |
Is the sample created by the transport?
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 48 of file TransportControlElement.inl.
ACE_INLINE OpenDDS::DCPS::RepoId OpenDDS::DCPS::TransportControlElement::publication_id | ( | ) | const [protected, virtual] |
Accessor for the publication id that sent the sample.
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 27 of file TransportControlElement.inl.
References OpenDDS::DCPS::GUID_UNKNOWN.
00028 { 00029 return GUID_UNKNOWN; 00030 }
void OpenDDS::DCPS::TransportControlElement::release_element | ( | bool | dropped_by_transport | ) | [protected, virtual] |
Invoked when the counter reaches 0.
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 33 of file TransportControlElement.cpp.
References msg_.
00036 { 00037 if (this->msg_) { 00038 this->msg_->release(); 00039 this->msg_ = 0; 00040 } 00041 00042 if (this->owner_) { 00043 delete this; 00044 } 00045 }
ACE_INLINE bool OpenDDS::DCPS::TransportControlElement::requires_exclusive_packet | ( | ) | const [protected, virtual] |
Does the sample require an exclusive transport packet?
Reimplemented from OpenDDS::DCPS::TransportQueueElement.
Definition at line 12 of file TransportControlElement.inl.
References DBG_ENTRY_LVL.
00013 { 00014 DBG_ENTRY_LVL("TransportControlElement","requires_exclusive_packet",6); 00015 return true; 00016 }
ACE_Message_Block* OpenDDS::DCPS::TransportControlElement::msg_ [private] |
The control message.
Definition at line 62 of file TransportControlElement.h.
Referenced by msg(), msg_payload(), and release_element().
bool OpenDDS::DCPS::TransportControlElement::owner_ [private] |