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

#include <TransportControlElement.h>

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

Public Member Functions

 TransportControlElement (Message_Block_Ptr msg_block)
 
virtual ~TransportControlElement ()
 
virtual bool owned_by_transport ()
 Is the sample created by the transport? 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 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
 
virtual bool is_retained_replaced () const
 

Protected Member Functions

virtual bool requires_exclusive_packet () const
 Does the sample require an exclusive transport packet? More...
 
virtual GUID_t publication_id () const
 Accessor for the publication id that sent the sample. More...
 
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...
 
virtual const ACE_Message_Blockmsg_payload () const
 The marshalled payload only (sample data) More...
 
virtual void release_element (bool dropped_by_transport)
 Invoked when the counter reaches 0. More...
 
virtual void data_delivered ()
 
- Protected Member Functions inherited from OpenDDS::DCPS::TransportQueueElement
 TransportQueueElement (unsigned long initial_count)
 
bool was_dropped () const
 

Private Member Functions

 TransportControlElement (const TransportControlElement &)
 

Private Attributes

Message_Block_Ptr msg_
 The control message. 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)
 

Detailed Description

Definition at line 26 of file TransportControlElement.h.

Constructor & Destructor Documentation

◆ TransportControlElement() [1/2]

OpenDDS::DCPS::TransportControlElement::TransportControlElement ( Message_Block_Ptr  msg_block)
explicit

msg_block - chain of ACE_Message_Blocks containing the control sample held by this queue element, if any.

Definition at line 16 of file TransportControlElement.cpp.

References DBG_ENTRY_LVL, and release().

19  msg_( msg_block.release())
20 {
21  DBG_ENTRY_LVL("TransportControlElement", "TransportControlElement", 6);
22 }
TransportQueueElement(unsigned long initial_count)
Message_Block_Ptr msg_
The control message.
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

◆ ~TransportControlElement()

OpenDDS::DCPS::TransportControlElement::~TransportControlElement ( )
virtual

Definition at line 24 of file TransportControlElement.cpp.

References DBG_ENTRY_LVL.

25 {
26  DBG_ENTRY_LVL("TransportControlElement", "~TransportControlElement", 6);
27 }
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

◆ TransportControlElement() [2/2]

OpenDDS::DCPS::TransportControlElement::TransportControlElement ( const TransportControlElement )
private

Member Function Documentation

◆ data_delivered()

ACE_INLINE void OpenDDS::DCPS::TransportControlElement::data_delivered ( )
protectedvirtual

Definition at line 20 of file TransportControlElement.inl.

References ACE_INLINE, and DBG_ENTRY_LVL.

21 {
22  DBG_ENTRY_LVL("TransportControlElement", "data_delivered", 6);
23 }
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

◆ duplicate_msg()

ACE_INLINE ACE_Message_Block * OpenDDS::DCPS::TransportControlElement::duplicate_msg ( ) const
protectedvirtual

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

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 34 of file TransportControlElement.inl.

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

35 {
36  return msg_->duplicate();
37 }
virtual ACE_Message_Block * duplicate(void) const
Message_Block_Ptr msg_
The control message.

◆ msg()

ACE_INLINE const ACE_Message_Block * OpenDDS::DCPS::TransportControlElement::msg ( ) const
protectedvirtual

The marshalled sample (sample header + sample data)

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 41 of file TransportControlElement.inl.

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

42 {
43  return msg_.get();
44 }
Message_Block_Ptr msg_
The control message.

◆ msg_payload()

ACE_INLINE const ACE_Message_Block * OpenDDS::DCPS::TransportControlElement::msg_payload ( ) const
protectedvirtual

The marshalled payload only (sample data)

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 48 of file TransportControlElement.inl.

References ACE_INLINE, ACE_Message_Block::cont(), and msg_.

49 {
50  return msg_->cont();
51 }
ACE_Message_Block * cont(void) const
Message_Block_Ptr msg_
The control message.

◆ owned_by_transport()

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

Is the sample created by the transport?

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 55 of file TransportControlElement.inl.

56 {
57  return true;
58 }

◆ publication_id()

ACE_INLINE OpenDDS::DCPS::GUID_t OpenDDS::DCPS::TransportControlElement::publication_id ( ) const
protectedvirtual

Accessor for the publication id that sent the sample.

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 27 of file TransportControlElement.inl.

References ACE_INLINE, and OpenDDS::DCPS::GUID_UNKNOWN.

28 {
29  return GUID_UNKNOWN;
30 }
const GUID_t GUID_UNKNOWN
Nil value for GUID.
Definition: GuidUtils.h:59

◆ release_element()

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

Invoked when the counter reaches 0.

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 30 of file TransportControlElement.cpp.

33 {
34  delete this;
35 }

◆ requires_exclusive_packet()

ACE_INLINE bool OpenDDS::DCPS::TransportControlElement::requires_exclusive_packet ( ) const
protectedvirtual

Does the sample require an exclusive transport packet?

Reimplemented from OpenDDS::DCPS::TransportQueueElement.

Definition at line 12 of file TransportControlElement.inl.

References ACE_INLINE, and DBG_ENTRY_LVL.

13 {
14  DBG_ENTRY_LVL("TransportControlElement", "requires_exclusive_packet", 6);
15  return true;
16 }
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

Member Data Documentation

◆ msg_

Message_Block_Ptr OpenDDS::DCPS::TransportControlElement::msg_
private

The control message.

Definition at line 59 of file TransportControlElement.h.

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


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