OpenDDS  Snapshot(2023/04/28-20:55)
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Attributes | List of all members
OpenDDS::DCPS::TransportCustomizedElement Class Reference

#include <TransportCustomizedElement.h>

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

Public Member Functions

 TransportCustomizedElement (TransportQueueElement *orig)
 
void set_fragment (TransportQueueElement *orig)
 
virtual GUID_t publication_id () const
 Accessor for the publication id that sent the sample. More...
 
void set_publication_id (const GUID_t &id)
 
GUID_t subscription_id () const
 Accessor for the subscription id, if sent the sample is sent to 1 sub. More...
 
void set_subscription_id (const GUID_t &id)
 
SequenceNumber sequence () const
 
void set_sequence (const SequenceNumber &value)
 
virtual ACE_Message_Blockduplicate_msg () const
 A reference-incremented duplicate of the marshalled sample (sample header + sample data) More...
 
virtual const ACE_Message_Blockmsg () const
 The marshalled sample (sample header + sample data) More...
 
void set_msg (Message_Block_Ptr m)
 
virtual const ACE_Message_Blockmsg_payload () const
 The marshalled payload only (sample data) More...
 
virtual bool owned_by_transport ()
 Is the sample created by the transport? More...
 
virtual bool is_fragment () const
 Is this QueueElement the result of fragmentation? More...
 
const TransportSendElementoriginal_send_element () const
 
virtual bool is_last_fragment () const
 Is this QueueElement the last result of fragmentation? More...
 
- Public Member Functions inherited from OpenDDS::DCPS::TransportQueueElement
virtual ~TransportQueueElement ()
 
bool data_dropped (bool dropped_by_transport=false)
 
bool data_delivered ()
 
void increment_loan ()
 
virtual bool is_control (GUID_t pub_id) const
 Is the element a "control" sample from the specified pub_id? More...
 
bool released () const
 Is the listener get called ? More...
 
void released (bool flag)
 
virtual TqePair fragment (size_t size)
 
virtual bool is_request_ack () const
 
virtual bool is_retained_replaced () const
 

Protected Member Functions

virtual void release_element (bool dropped_by_transport)
 Invoked when the counter reaches 0. More...
 
virtual bool requires_exclusive_packet () const
 Does the sample require an exclusive transport packet? More...
 
void set_requires_exclusive ()
 
virtual ~TransportCustomizedElement ()
 
- Protected Member Functions inherited from OpenDDS::DCPS::TransportQueueElement
 TransportQueueElement (unsigned long initial_count)
 
bool was_dropped () const
 

Static Protected Member Functions

static const TransportSendElementfind_original_send_element (TransportQueueElement *orig)
 

Private Attributes

TransportQueueElementorig_
 
const TransportSendElementoriginal_send_element_
 
Message_Block_Ptr msg_
 
GUID_t publication_id_
 
GUID_t subscription_id_
 
SequenceNumber sequence_
 
bool fragment_
 
bool exclusive_
 

Additional Inherited Members

- Static Public Member Functions inherited from OpenDDS::DCPS::TransportQueueElement
static ACE_Message_Blockclone_mb (const ACE_Message_Block *msg, MessageBlockAllocator *mb_allocator, DataBlockAllocator *db_allocator)
 

Detailed Description

Definition at line 22 of file TransportCustomizedElement.h.

Constructor & Destructor Documentation

◆ TransportCustomizedElement()

ACE_INLINE OpenDDS::DCPS::TransportCustomizedElement::TransportCustomizedElement ( TransportQueueElement orig)
explicit

Definition at line 17 of file TransportCustomizedElement.inl.

References ACE_INLINE, and DBG_ENTRY_LVL.

20  orig_(orig),
22  publication_id_(orig ? orig->publication_id() : GUID_UNKNOWN),
25  fragment_(false),
26  exclusive_(false)
27 {
28  DBG_ENTRY_LVL("TransportCustomizedElement", "TransportCustomizedElement", 6);
29 }
const GUID_t GUID_UNKNOWN
Nil value for GUID.
Definition: GuidUtils.h:59
TransportQueueElement(unsigned long initial_count)
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68
static SequenceNumber SEQUENCENUMBER_UNKNOWN()
static const TransportSendElement * find_original_send_element(TransportQueueElement *orig)

◆ ~TransportCustomizedElement()

OpenDDS::DCPS::TransportCustomizedElement::~TransportCustomizedElement ( )
protectedvirtual

Definition at line 22 of file TransportCustomizedElement.cpp.

References DBG_ENTRY_LVL.

23 {
24  DBG_ENTRY_LVL("TransportCustomizedElement", "~TransportCustomizedElement", 6);
25 }
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

Member Function Documentation

◆ duplicate_msg()

ACE_Message_Block * OpenDDS::DCPS::TransportCustomizedElement::duplicate_msg ( ) const
virtual

A reference-incremented duplicate of the marshalled sample (sample header + sample data)

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 44 of file TransportCustomizedElement.cpp.

References DBG_ENTRY_LVL, ACE_Message_Block::duplicate(), and msg_.

45 {
46  DBG_ENTRY_LVL("TransportCustomizedElement", "duplicate_msg", 6);
47  return msg_->duplicate();
48 }
virtual ACE_Message_Block * duplicate(void) const
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

◆ find_original_send_element()

const TransportSendElement * OpenDDS::DCPS::TransportCustomizedElement::find_original_send_element ( TransportQueueElement orig)
staticprotected

Definition at line 72 of file TransportCustomizedElement.cpp.

References original_send_element().

73 {
74  const TransportSendElement* ose =
75  dynamic_cast<const TransportSendElement*>(orig);
76  if (!ose) {
77  const TransportCustomizedElement* tce =
78  dynamic_cast<const TransportCustomizedElement*>(orig);
79  return tce ? tce->original_send_element() : 0;
80  }
81  return ose;
82 }

◆ is_fragment()

virtual bool OpenDDS::DCPS::TransportCustomizedElement::is_fragment ( ) const
inlinevirtual

Is this QueueElement the result of fragmentation?

Reimplemented from OpenDDS::DCPS::TransportQueueElement.

Definition at line 48 of file TransportCustomizedElement.h.

◆ is_last_fragment()

bool OpenDDS::DCPS::TransportCustomizedElement::is_last_fragment ( ) const
virtual

Is this QueueElement the last result of fragmentation?

Reimplemented from OpenDDS::DCPS::TransportQueueElement.

Definition at line 91 of file TransportCustomizedElement.cpp.

References OpenDDS::DCPS::TransportSendElement::is_last_fragment(), OPENDDS_END_VERSIONED_NAMESPACE_DECL, and original_send_element_.

Referenced by OpenDDS::DCPS::RtpsUdpDataLink::MultiSendBuffer::insert().

92 {
94 }
virtual bool is_last_fragment() const
Is this QueueElement the last result of fragmentation?

◆ msg()

const ACE_Message_Block * OpenDDS::DCPS::TransportCustomizedElement::msg ( ) const
virtual

The marshalled sample (sample header + sample data)

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 51 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().

52 {
53  DBG_ENTRY_LVL("TransportCustomizedElement", "msg", 6);
54  return msg_.get();
55 }
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

◆ msg_payload()

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 65 of file TransportCustomizedElement.cpp.

References DBG_ENTRY_LVL, OpenDDS::DCPS::TransportQueueElement::msg_payload(), and orig_.

66 {
67  DBG_ENTRY_LVL("TransportCustomizedElement", "msg_payload", 6);
68  return orig_ ? orig_->msg_payload() : 0;
69 }
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68
virtual const ACE_Message_Block * msg_payload() const =0
The marshalled payload only (sample data)

◆ original_send_element()

const TransportSendElement * OpenDDS::DCPS::TransportCustomizedElement::original_send_element ( ) const

◆ owned_by_transport()

virtual bool OpenDDS::DCPS::TransportCustomizedElement::owned_by_transport ( )
inlinevirtual

Is the sample created by the transport?

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 46 of file TransportCustomizedElement.h.

46 { return false; }

◆ publication_id()

ACE_INLINE GUID_t OpenDDS::DCPS::TransportCustomizedElement::publication_id ( ) const
virtual

Accessor for the publication id that sent the sample.

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 32 of file TransportCustomizedElement.inl.

References ACE_INLINE, DBG_ENTRY_LVL, and publication_id_.

33 {
34  DBG_ENTRY_LVL("TransportCustomizedElement", "publication_id", 6);
35  return publication_id_;
36 }
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

◆ release_element()

void OpenDDS::DCPS::TransportCustomizedElement::release_element ( bool  dropped_by_transport)
protectedvirtual

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_.

29 {
30  DBG_ENTRY_LVL("TransportCustomizedElement", "release_element", 6);
31  TransportQueueElement* decided = 0;
32  if (orig_) {
33  decided = orig_;
34  }
35 
36  delete this;
37 
38  if (decided) {
39  decided->decision_made(dropped_by_transport);
40  }
41 }
TransportQueueElement(unsigned long initial_count)
bool decision_made(bool dropped_by_transport)
Common logic for data_dropped() and data_delivered().
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

◆ requires_exclusive_packet()

virtual bool OpenDDS::DCPS::TransportCustomizedElement::requires_exclusive_packet ( ) const
inlineprotectedvirtual

Does the sample require an exclusive transport packet?

Reimplemented from OpenDDS::DCPS::TransportQueueElement.

Definition at line 57 of file TransportCustomizedElement.h.

◆ sequence()

ACE_INLINE SequenceNumber OpenDDS::DCPS::TransportCustomizedElement::sequence ( ) const
virtual

◆ set_fragment()

ACE_INLINE void OpenDDS::DCPS::TransportCustomizedElement::set_fragment ( TransportQueueElement orig)

◆ set_msg()

void OpenDDS::DCPS::TransportCustomizedElement::set_msg ( Message_Block_Ptr  m)

◆ set_publication_id()

ACE_INLINE void OpenDDS::DCPS::TransportCustomizedElement::set_publication_id ( const GUID_t id)

Definition at line 39 of file TransportCustomizedElement.inl.

References ACE_INLINE, and publication_id_.

Referenced by set_fragment().

◆ set_requires_exclusive()

void OpenDDS::DCPS::TransportCustomizedElement::set_requires_exclusive ( )
inlineprotected

◆ set_sequence()

ACE_INLINE void OpenDDS::DCPS::TransportCustomizedElement::set_sequence ( const SequenceNumber value)

Definition at line 73 of file TransportCustomizedElement.inl.

References ACE_INLINE, sequence_, and value.

Referenced by set_fragment().

74 {
75  sequence_ = value;
76 }
const LogLevel::Value value
Definition: debug.cpp:61

◆ set_subscription_id()

ACE_INLINE void OpenDDS::DCPS::TransportCustomizedElement::set_subscription_id ( const GUID_t id)

Definition at line 56 of file TransportCustomizedElement.inl.

References ACE_INLINE, and subscription_id_.

Referenced by set_fragment().

◆ subscription_id()

ACE_INLINE GUID_t OpenDDS::DCPS::TransportCustomizedElement::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 45 of file TransportCustomizedElement.inl.

References ACE_INLINE, DBG_ENTRY_LVL, OpenDDS::DCPS::GUID_UNKNOWN, original_send_element(), OpenDDS::DCPS::TransportSendElement::subscription_id(), and subscription_id_.

46 {
48  return subscription_id_;
49  }
50  DBG_ENTRY_LVL("TransportCustomizedElement", "subscription_id", 6);
51  const TransportSendElement* ose = original_send_element();
52  return ose ? ose->subscription_id() : GUID_UNKNOWN;
53 }
const TransportSendElement * original_send_element() const
const GUID_t GUID_UNKNOWN
Nil value for GUID.
Definition: GuidUtils.h:59
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

Member Data Documentation

◆ exclusive_

bool OpenDDS::DCPS::TransportCustomizedElement::exclusive_
private

Definition at line 71 of file TransportCustomizedElement.h.

◆ fragment_

bool OpenDDS::DCPS::TransportCustomizedElement::fragment_
private

Definition at line 71 of file TransportCustomizedElement.h.

Referenced by set_fragment().

◆ msg_

Message_Block_Ptr OpenDDS::DCPS::TransportCustomizedElement::msg_
private

Definition at line 67 of file TransportCustomizedElement.h.

Referenced by duplicate_msg(), msg(), and set_msg().

◆ orig_

TransportQueueElement* OpenDDS::DCPS::TransportCustomizedElement::orig_
private

Definition at line 65 of file TransportCustomizedElement.h.

Referenced by msg_payload(), release_element(), and sequence().

◆ original_send_element_

const TransportSendElement* OpenDDS::DCPS::TransportCustomizedElement::original_send_element_
private

Definition at line 66 of file TransportCustomizedElement.h.

Referenced by is_last_fragment(), and original_send_element().

◆ publication_id_

GUID_t OpenDDS::DCPS::TransportCustomizedElement::publication_id_
private

Definition at line 68 of file TransportCustomizedElement.h.

Referenced by publication_id(), and set_publication_id().

◆ sequence_

SequenceNumber OpenDDS::DCPS::TransportCustomizedElement::sequence_
private

Definition at line 70 of file TransportCustomizedElement.h.

Referenced by sequence(), and set_sequence().

◆ subscription_id_

GUID_t OpenDDS::DCPS::TransportCustomizedElement::subscription_id_
private

Definition at line 69 of file TransportCustomizedElement.h.

Referenced by set_subscription_id(), and subscription_id().


The documentation for this class was generated from the following files: