OpenDDS  Snapshot(2023/04/07-19:43)
Public Member Functions | List of all members
OpenDDS::DCPS::TransportRetainedElement Class Reference

#include <TransportRetainedElement.h>

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

Public Member Functions

 TransportRetainedElement (ACE_Message_Block *message, const GUID_t &pubId)
 Construct with message block chain and Id values. More...
 
 TransportRetainedElement (const ACE_Message_Block *message, const GUID_t &pubId, MessageBlockAllocator *mb_allocator_=0, DataBlockAllocator *db_allocator_=0)
 Construct with message block chain and Id values. More...
 
 TransportRetainedElement (const TransportRetainedElement &source)
 Copy constructor. More...
 
virtual ~TransportRetainedElement ()
 
- 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 requires_exclusive_packet () const
 Does the sample require an exclusive transport packet? More...
 
virtual GUID_t subscription_id () const
 Accessor for the subscription id, if sent the sample is sent to 1 sub. More...
 
virtual SequenceNumber sequence () const
 
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_fragment () const
 Is this QueueElement the result of fragmentation? More...
 
virtual bool is_last_fragment () const
 Is this QueueElement the last result of fragmentation? More...
 
virtual bool is_request_ack () const
 

TransportQueueElement methods

{

Message_Block_Ptr msg_
 } More...
 
GUID_t publication_id_
 Originating publication Id, if any. More...
 
MessageBlockAllocatormb_allocator_
 Cached allocator for DataSampleHeader message block. More...
 
DataBlockAllocatordb_allocator_
 Cached allocator for DataSampleHeader data block. More...
 
bool is_duplicate_
 } More...
 
virtual GUID_t publication_id () const
 } More...
 
virtual ACE_Message_Blockduplicate_msg () const
 } More...
 
virtual const ACE_Message_Blockmsg () const
 } More...
 
virtual const ACE_Message_Blockmsg_payload () const
 } More...
 
virtual bool owned_by_transport ()
 } More...
 
virtual bool is_retained_replaced () const
 } More...
 
virtual void release_element (bool dropped_by_transport)
 } More...
 

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)
 
- Protected Member Functions inherited from OpenDDS::DCPS::TransportQueueElement
 TransportQueueElement (unsigned long initial_count)
 
bool was_dropped () const
 

Detailed Description

Definition at line 23 of file TransportRetainedElement.h.

Constructor & Destructor Documentation

◆ TransportRetainedElement() [1/3]

OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE OpenDDS::DCPS::TransportRetainedElement::TransportRetainedElement ( ACE_Message_Block message,
const GUID_t pubId 
)

Construct with message block chain and Id values.

Definition at line 13 of file TransportRetainedElement.inl.

References ACE_INLINE.

17  msg_(message),
18  publication_id_(pubId),
19  mb_allocator_(0),
20  db_allocator_(0),
21  is_duplicate_(true)
22 {
23 }
GUID_t publication_id_
Originating publication Id, if any.
MessageBlockAllocator * mb_allocator_
Cached allocator for DataSampleHeader message block.
TransportQueueElement(unsigned long initial_count)
DataBlockAllocator * db_allocator_
Cached allocator for DataSampleHeader data block.

◆ TransportRetainedElement() [2/3]

ACE_INLINE OpenDDS::DCPS::TransportRetainedElement::TransportRetainedElement ( const ACE_Message_Block message,
const GUID_t pubId,
MessageBlockAllocator mb_allocator_ = 0,
DataBlockAllocator db_allocator_ = 0 
)

Construct with message block chain and Id values.

Definition at line 26 of file TransportRetainedElement.inl.

References ACE_INLINE.

32  msg_(message ? TransportQueueElement::clone_mb(message,
33  mb_allocator,
34  db_allocator) : 0),
35  publication_id_(pubId),
36  mb_allocator_(mb_allocator),
37  db_allocator_(db_allocator),
38  is_duplicate_(false)
39 {
40 }
GUID_t publication_id_
Originating publication Id, if any.
MessageBlockAllocator * mb_allocator_
Cached allocator for DataSampleHeader message block.
TransportQueueElement(unsigned long initial_count)
DataBlockAllocator * db_allocator_
Cached allocator for DataSampleHeader data block.
static ACE_Message_Block * clone_mb(const ACE_Message_Block *msg, MessageBlockAllocator *mb_allocator, DataBlockAllocator *db_allocator)

◆ TransportRetainedElement() [3/3]

ACE_INLINE OpenDDS::DCPS::TransportRetainedElement::TransportRetainedElement ( const TransportRetainedElement source)

Copy constructor.

Definition at line 43 of file TransportRetainedElement.inl.

References ACE_INLINE, and DBG_ENTRY_LVL.

46  msg_(source.duplicate_msg()),
47  publication_id_(source.publication_id()),
48  mb_allocator_(source.mb_allocator_),
49  db_allocator_(source.db_allocator_),
50  is_duplicate_(source.is_duplicate_)
51 {
52  DBG_ENTRY_LVL("TransportRetainedElement", "TransportRetainedElement", 6);
53 }
GUID_t publication_id_
Originating publication Id, if any.
MessageBlockAllocator * mb_allocator_
Cached allocator for DataSampleHeader message block.
TransportQueueElement(unsigned long initial_count)
DataBlockAllocator * db_allocator_
Cached allocator for DataSampleHeader data block.
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

◆ ~TransportRetainedElement()

OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL OpenDDS::DCPS::TransportRetainedElement::~TransportRetainedElement ( )
virtual

Definition at line 17 of file TransportRetainedElement.cpp.

References DBG_ENTRY_LVL.

18 {
19  DBG_ENTRY_LVL("TransportRetainedElement", "~TransportRetainedElement", 6);
20 }
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

Member Function Documentation

◆ duplicate_msg()

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

}

Sample data, if any.

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 39 of file TransportRetainedElement.cpp.

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

40 {
41  DBG_ENTRY_LVL("TransportRetainedElement", "duplicate_msg", 6);
42  return msg_->duplicate();
43 }
virtual ACE_Message_Block * duplicate(void) const
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

◆ is_retained_replaced()

ACE_INLINE bool OpenDDS::DCPS::TransportRetainedElement::is_retained_replaced ( ) const
virtual

}

Sample data, if any.

Reimplemented from OpenDDS::DCPS::TransportQueueElement.

Definition at line 65 of file TransportRetainedElement.inl.

References is_duplicate_, and OPENDDS_END_VERSIONED_NAMESPACE_DECL.

◆ msg()

const ACE_Message_Block * OpenDDS::DCPS::TransportRetainedElement::msg ( void  ) const
virtual

}

Sample data, if any.

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 46 of file TransportRetainedElement.cpp.

References DBG_ENTRY_LVL, OpenDDS::DCPS::unique_ptr< T, Deleter >::get(), and msg_.

47 {
48  DBG_ENTRY_LVL("TransportRetainedElement", "msg", 6);
49  return msg_.get();
50 }
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

◆ msg_payload()

const ACE_Message_Block * OpenDDS::DCPS::TransportRetainedElement::msg_payload ( ) const
virtual

}

Sample data, if any.

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 53 of file TransportRetainedElement.cpp.

References ACE_Message_Block::cont(), DBG_ENTRY_LVL, msg_, and OPENDDS_END_VERSIONED_NAMESPACE_DECL.

54 {
55  DBG_ENTRY_LVL("TransportRetainedElement", "msg_payload", 6);
56  return msg_->cont();
57 }
ACE_Message_Block * cont(void) const
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

◆ owned_by_transport()

ACE_INLINE bool OpenDDS::DCPS::TransportRetainedElement::owned_by_transport ( )
virtual

}

Sample data, if any.

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 58 of file TransportRetainedElement.inl.

References ACE_INLINE, and is_duplicate_.

◆ publication_id()

OpenDDS::DCPS::GUID_t OpenDDS::DCPS::TransportRetainedElement::publication_id ( ) const
virtual

}

Sample data, if any.

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 32 of file TransportRetainedElement.cpp.

References DBG_ENTRY_LVL, and publication_id_.

33 {
34  DBG_ENTRY_LVL("TransportRetainedElement", "publication_id", 6);
35  return publication_id_;
36 }
GUID_t publication_id_
Originating publication Id, if any.
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

◆ release_element()

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

}

Sample data, if any.

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 23 of file TransportRetainedElement.cpp.

References DBG_ENTRY_LVL.

26 {
27  DBG_ENTRY_LVL("TransportRetainedElement", "release_element", 6);
28  delete this;
29 }
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

Member Data Documentation

◆ db_allocator_

DataBlockAllocator* OpenDDS::DCPS::TransportRetainedElement::db_allocator_
private

Cached allocator for DataSampleHeader data block.

Definition at line 73 of file TransportRetainedElement.h.

◆ is_duplicate_

bool OpenDDS::DCPS::TransportRetainedElement::is_duplicate_
private

}

Sample data, if any.

Definition at line 75 of file TransportRetainedElement.h.

Referenced by is_retained_replaced(), and owned_by_transport().

◆ mb_allocator_

MessageBlockAllocator* OpenDDS::DCPS::TransportRetainedElement::mb_allocator_
private

Cached allocator for DataSampleHeader message block.

Definition at line 71 of file TransportRetainedElement.h.

◆ msg_

Message_Block_Ptr OpenDDS::DCPS::TransportRetainedElement::msg_
private

}

Sample data, if any.

Definition at line 65 of file TransportRetainedElement.h.

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

◆ publication_id_

GUID_t OpenDDS::DCPS::TransportRetainedElement::publication_id_
private

Originating publication Id, if any.

Definition at line 68 of file TransportRetainedElement.h.

Referenced by publication_id().


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