OpenDDS::DCPS::TransportSendElement Class Reference

#include <TransportSendElement.h>

Inheritance diagram for OpenDDS::DCPS::TransportSendElement:
Inheritance graph
[legend]
Collaboration diagram for OpenDDS::DCPS::TransportSendElement:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TransportSendElement (int initial_count, const DataSampleElement *sample)
virtual ~TransportSendElement ()
virtual RepoId publication_id () const
 Accessor for the publisher id.
virtual RepoId subscription_id () const
 Accessor for the subscription id, if sent the sample is sent to 1 sub.
virtual const ACE_Message_Blockmsg () const
 Accessor for the ACE_Message_Block.
virtual const ACE_Message_Blockmsg_payload () const
 The marshalled payload only (sample data).
virtual SequenceNumber sequence () const
const DataSampleElementsample () const
 Original sample from send listener.
virtual bool owned_by_transport ()
 Is the sample created by the transport?

Protected Member Functions

virtual void release_element (bool dropped_by_transport)
 Invoked when the counter reaches 0.

Private Attributes

const DataSampleElementelement_

Detailed Description

Definition at line 20 of file TransportSendElement.h.


Constructor & Destructor Documentation

OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE OpenDDS::DCPS::TransportSendElement::TransportSendElement ( int  initial_count,
const DataSampleElement sample 
)

Definition at line 13 of file TransportSendElement.inl.

References DBG_ENTRY_LVL.

00015   : TransportQueueElement(initial_count),
00016     element_(sample)
00017 {
00018   DBG_ENTRY_LVL("TransportSendElement","TransportSendElement",6);
00019 }

OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL OpenDDS::DCPS::TransportSendElement::~TransportSendElement (  )  [virtual]

Definition at line 18 of file TransportSendElement.cpp.

References DBG_ENTRY_LVL.

00019 {
00020   DBG_ENTRY_LVL("TransportSendElement","~TransportSendElement",6);
00021 }


Member Function Documentation

const ACE_Message_Block * OpenDDS::DCPS::TransportSendElement::msg ( void   )  const [virtual]

Accessor for the ACE_Message_Block.

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 57 of file TransportSendElement.cpp.

References DBG_ENTRY_LVL, element_, and OpenDDS::DCPS::DataSampleElement::get_sample().

00058 {
00059   DBG_ENTRY_LVL("TransportSendElement","msg",6);
00060   return this->element_->get_sample();
00061 }

Here is the call graph for this function:

const ACE_Message_Block * OpenDDS::DCPS::TransportSendElement::msg_payload (  )  const [virtual]

The marshalled payload only (sample data).

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 64 of file TransportSendElement.cpp.

References ACE_Message_Block::cont(), DBG_ENTRY_LVL, element_, and OpenDDS::DCPS::DataSampleElement::get_sample().

00065 {
00066   DBG_ENTRY_LVL("TransportSendElement", "msg_payload", 6);
00067   return this->element_->get_sample() ? this->element_->get_sample()->cont() : 0;
00068 }

Here is the call graph for this function:

ACE_INLINE bool OpenDDS::DCPS::TransportSendElement::owned_by_transport (  )  [virtual]

Is the sample created by the transport?

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 24 of file TransportSendElement.inl.

00025 {
00026   return false;
00027 }

OpenDDS::DCPS::RepoId OpenDDS::DCPS::TransportSendElement::publication_id (  )  const [virtual]

Accessor for the publisher id.

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 41 of file TransportSendElement.cpp.

References DBG_ENTRY_LVL, element_, and OpenDDS::DCPS::DataSampleElement::get_pub_id().

00042 {
00043   DBG_ENTRY_LVL("TransportSendElement","publication_id",6);
00044   return this->element_->get_pub_id();
00045 }

Here is the call graph for this function:

void OpenDDS::DCPS::TransportSendElement::release_element ( bool  dropped_by_transport  )  [protected, virtual]

Invoked when the counter reaches 0.

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 24 of file TransportSendElement.cpp.

References OpenDDS::DCPS::TransportSendListener::data_delivered(), OpenDDS::DCPS::TransportSendListener::data_dropped(), DBG_ENTRY_LVL, element_, OpenDDS::DCPS::DataSampleElement::get_send_listener(), and OpenDDS::DCPS::TransportQueueElement::was_dropped().

00025 {
00026   DBG_ENTRY_LVL("TransportSendElement","release_element",6);
00027 
00028   if (this->was_dropped()) {
00029     this->element_->get_send_listener()->data_dropped(this->element_,
00030                                                  dropped_by_transport);
00031 
00032   } else {
00033     this->element_->get_send_listener()->data_delivered(this->element_);
00034   }
00035 
00036 
00037   delete this;
00038 }

Here is the call graph for this function:

ACE_INLINE const OpenDDS::DCPS::DataSampleElement * OpenDDS::DCPS::TransportSendElement::sample (  )  const

Original sample from send listener.

Definition at line 38 of file TransportSendElement.inl.

References element_.

Referenced by OpenDDS::DCPS::RtpsUdpDataLink::customize_queue_element().

00039 {
00040   return this->element_;
00041 }

Here is the caller graph for this function:

ACE_INLINE OpenDDS::DCPS::SequenceNumber OpenDDS::DCPS::TransportSendElement::sequence (  )  const [virtual]

Reimplemented from OpenDDS::DCPS::TransportQueueElement.

Definition at line 31 of file TransportSendElement.inl.

References element_, OpenDDS::DCPS::DataSampleElement::get_header(), and OpenDDS::DCPS::DataSampleHeader::sequence_.

00032 {
00033   return this->element_->get_header().sequence_;
00034 }

Here is the call graph for this function:

OpenDDS::DCPS::RepoId OpenDDS::DCPS::TransportSendElement::subscription_id (  )  const [virtual]

Accessor for the subscription id, if sent the sample is sent to 1 sub.

Reimplemented from OpenDDS::DCPS::TransportQueueElement.

Definition at line 48 of file TransportSendElement.cpp.

References element_, OpenDDS::DCPS::DataSampleElement::get_num_subs(), OpenDDS::DCPS::DataSampleElement::get_sub_id(), and OpenDDS::DCPS::GUID_UNKNOWN.

Referenced by OpenDDS::DCPS::TransportCustomizedElement::subscription_id().

00049 {
00050   if (this->element_->get_num_subs() == 1) {
00051     return this->element_->get_sub_id(0);
00052   }
00053   return GUID_UNKNOWN;
00054 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

This is the actual element that the transport framework was asked to send.

Definition at line 53 of file TransportSendElement.h.

Referenced by msg(), msg_payload(), publication_id(), release_element(), sample(), sequence(), and subscription_id().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1